1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-04 18:06:22 +03:00

2658 Commits

Author SHA1 Message Date
kgv
b8db9379fe 0032203: Draw Harness, ViewerTest - drop dependency from OpenGL
Added TKOpenGlTest and TKD3DHostTest Draw Harness plugins.
TKOpenGlTest is automatically loaded by ViewerTest::ViewerInit().

Commands vgldebug, vvbo, vcaps and vuserdraw have been moved to TKOpenGlTest.
New command vglshaders lists GLSL programs defined by OpenGl_GraphicDriver,
previously implemented by "vshaderprog -list".

Added new command vdriver for graphic driver selection.
Removed erroneous code from command vstereo.
2021-03-17 19:56:54 +03:00
kgv
61a05a3658 0032198: Visualization, TKOpenGl - per-vertex lighting ignores back/front material colors
Graphic3d_ShaderManager::stdComputeLighting() now multiplies vertex color by material color.
2021-03-17 19:53:13 +03:00
emv
58210e5983 0032136: Modeling Algorithms - Boolean fuse fails and corrupts the argument-shape
Avoid increasing tolerance of the vertex before the check on valid range is passed.
2021-03-05 18:00:28 +03:00
kgv
19ed08fda6 0031794: Visualization - Highlighting of AIS_Shape works incorrectly when AddChild() used
PrsMgr_PresentationManager::Display(), PrsMgr_PresentationManager::Color(),
and SelectMgr_SelectionManager::Activate() now skip children in Erased state.
2021-03-05 17:49:17 +03:00
kgv
e70625d6b1 0030640: Visualization, Graphic3d_Camera - add option creating Projection matrix with [0,1] depth range
Added new property Graphic3d_Camera::IsZeroToOneDepth() and OpenGl_Caps::useZeroToOneDepth
for activating [0,1] depth range instead of [-1,1] range using glClipControl() within OpenGL 4.5+.
2021-03-05 17:41:27 +03:00
mkrylova
395d00e058 0032144: Draw Harness - add -silent option to command Close
- Extended command Close with an option -silent
- Extended command Close to handle */-ALL for closing ALL document
- Replaced catch {Close D} by Close D -silent in tests
2021-03-05 17:31:07 +03:00
mpv
6498be7036 0032109: Application Framework: Test case bugs caf bug31546 works extremely unstable
In test it should be taken into account that
  lappend listmem [meminfo h]
  checktrend $listmem 0 0 "Memory leak"
also gets memory (also about 100 bytes per iteration).
2021-03-04 19:49:35 +03:00
mkrylova
e3d4b87912 0031779: Visualization, AIS_ViewController - controller should handle selection schemes
Added AIS_ViewController::MouseSelectionSchemes() property defining map of selection schemes for mouse+modifier combinations.
IsXOR flag has been replaced by AIS_SelectionScheme in interfaces.

Rubber-band selection with Shift key pressed now applies XOR selection scheme in in Draw Harness.
Command vselect has been extended to specify selection scheme by name.
2021-03-04 19:43:13 +03:00
kgv
42ddd0028c 0032184: Visualization - remove ambiguous AIS_GlobalStatus constructor
Auxiliary AIS_GlobalStatus constructor has been removed.
AIS_InteractiveContext::setObjectStatus() no more adds
an invalid -1 mode to AIS_GlobalStatus.

Never updated property AIS_GlobalStatus::GetLayerIndex() has been removed;
AIS_InteractiveContext::SetTransformPersistence() has been corrected to use
ZLayer defined within object itself.
2021-03-04 19:39:20 +03:00
kgv
33425a46b8 0032143: Visualization - add option excluding transparent object from sorting
Added option Graphic3d_AlphaMode_MaskBlend combining Mask (no sorting)
and Blend (enable blending with background) behavior.
2021-03-04 19:38:16 +03:00
kgv
ba590cbf15 0032180: Visualization - StdSelect_BRepOwner::SetLocation() does not update selected sub-shape
StdSelect_BRepOwner::SetLocation() now propagates location to sub-shape presentation instead of invalidating it.
2021-02-27 15:36:19 +03:00
kgv
53219061ca 0032165: Visualization - remove obsolete method AIS_InteractiveContext::PurgeViewer() 2021-02-26 10:56:32 +03:00
kgv
79d49683d6 0032155: Tests - remove broken command OCC280
Command OCC280 and a couple of useless tests have been removed.
Test case bug349 has been updated to reproduce scenario using standard commands.
2021-02-25 18:55:30 +03:00
kgv
72ed06442e 0032154: Tests - include vglinfo into Tests Summary
Command testgrid now includes vglinfo into summary.
Command vinit has been extended by -virtual option creating an offscreen window.
Command vglinfo now splits long values into multiple lines.
Added test case v3d/glsl/glinfo dumping OpenGL context creation info.

OpenGl_Window - fixed initialization of OpenGL 4.6 Core Profile (was limited to 4.5).
2021-02-25 18:55:29 +03:00
kgv
4464c6b591 0032149: Draw Harness, ViewerTest - remove obsolete command vfeedback 2021-02-25 18:55:27 +03:00
dpasukhi
930b466c9b 0032087: Data Exchange, STEPCAFControl_Reader - NULL representation of shape for DGT
- Fixed problem with find a Path for the DimensionType_Location_WithPath
- Added check for the null object within FindShapeIndexForDGT
2021-02-20 10:43:17 +03:00
kgv
008210c3e2 0032129: Visualization, TKOpenGl - shadowmap is broken for ZLayer having non-zero origin
OpenGl_LayerList::renderLayer() - fixed usage of wrong camera while rendering shadowmap,
and apply Z-Layer origin shift to shadowmap matrix while applying shadow.
2021-02-14 01:11:37 +03:00
emv
8d55cb22a8 0031974: Modeling Algorithms - Strange behavior of boolean operations on this BREP
Problem is fixed by #0031995. Integrating test case only.
2021-02-11 20:06:14 +03:00
mkrylova
2daa5d95a5 0031704: Visualization - add an interactive object AIS_LightSource representing a light source
Added new class AIS_LightSource representing a light source presentation.

Graphic3d_TMF_CameraPers - added new mode to Graphic3d_TransformPers
defining 3D point relative to camera Eye position
2021-02-11 20:06:14 +03:00
kgv
9779ff75fd 0032095: Tests - drop comparison in unstable perf/ncollection group
Mark performance deviations compared to STL collections as warnings instead of errors.
2021-02-11 20:06:13 +03:00
dpasukhi
0c38be8f8d 0031970: Data Exchange, STEP reader - parser syntax error messages are inaccessible
- Upgraded files using new version of WinFlexBison
 - Removed global variables within StepFile_Read.cxx
 - Upgraded error message during bison analyzing ( added a expected expression information )
 - Used 'Interface_ParamType' as argument type for the StepFile_ReadData::Argument
 for a compatibility with the StepData/StepData_StepReaderData
 - Added handling parse errors and transferring it to the StepData_StepReaderData
 - Now parsing and referencing errors save in the check and non output by default
 - Step_file's and Step_Data's output info prints according by trace level of printer
 - Removed useless location.hxx
 - Removed TraceLevel for the StepFile_Reader ( now it useless,
  it is 0 by default and newer and nowhere change )
 - Translate error message into English within StepData_StepReaderData
 - Replace "Error" word in the output messages
2021-02-05 20:35:19 +03:00
emv
a36a30b724 0032108: Modeling Algorithms - BRepAlgoAPI_Section is too slow
Fixed by 0029711. Integrating test case only.
2021-02-03 18:32:55 +03:00
luz paz
4551e1be75 0031939: Coding - correction of spelling errors in comments [part 8]
Fix various typos

Fixed via codespell v2.1.dev
2021-02-03 18:31:42 +03:00
emv
961c002c46 0031912: Modeling Algorithms - Boolean Cut can't build resulting shape
Problem is fixed by #0032058. Integrating test case only.
2021-01-29 19:44:58 +03:00
jgv
8948e18df8 0031845: Modeling Algorithms - BRepOffsetAPI_MakeThickSolid fails
Multiple changes in BRepOffset_MakeOffset algorithm:
- correct fusing vertices;
- correct building intersection edges;
- correct intersecting new edges in 2D;
- correct building wire on a new face;
- correct building history.
2021-01-22 19:09:02 +03:00
dpasukhi
96049f2e3d 0032049: Data Exchange - STEP file import problems
- Added checking for null objects
- Added support to find layers according to visible attr
- Fixed problem with same names of layers:
 Now, layers are grouped by names and visibility parameter
2021-01-22 13:16:22 +03:00
ifv
b007889efd 0032058: Modeling Data - Extrema curve-surface gives wrong result for planar surface of revolunion and circle
Extrema_GenExtCS.cxx : added solution refinement, if solution seems to be "bad" according to special criteria.
Extrema_FuncExtCS.cxx : "cosmetic" modifications
BOPAlgo_PaveFiller_3.cxx : adding control of shape index to prevent exception in ShapeInfo
bugs/moddata_3/bug32058 : new test
2021-01-21 20:36:28 +03:00
luz paz
7b5e532f83 0031939: Coding - correction of spelling errors in comments [part 7]
Fix various typos

Fixed via codespell v2.1.dev
2021-01-20 21:27:44 +03:00
akaftasev
5bae0bebe4 0028026: Modeling Data - BRepTools::Clean() does not clean all triangulation from shape
Added flag for force clean triangulation and treatment for it
Command "trinfo" now show number of polygons on triangulation
2021-01-20 21:25:44 +03:00
kgv
4925946065 0032061: Data Exchange, RWGltf_CafWriter - exporting XBF file produces an invalid glTF document
Empty Nodes are now skipped while filling in Scene node map.
2021-01-20 21:24:17 +03:00
kgv
78c4e836b1 0031571: Visualization, TKOpenGl - provide depth peeling OIT option
Graphic3d_RenderTransparentMethod has been extended by Graphic3d_RTM_DEPTH_PEELING_OIT,
which is handled by OpenGl_LayerList::renderTransparent().

OpenGl_FrameBuffer::Init() now does not silently ignore unknown color attachment format and return failure.
OpenGl_FrameBuffer::InitWrapper() - added constructor wrapping existing color textures.

v3d/transparency/oit: test case added
2021-01-20 21:21:59 +03:00
asuraven
9f45d35b6b 0031136: Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces
Information about normals are stored in BinOCAF, XmlOCAF, BRep and BBRep (in case of triangulation-only Faces).
Versions of formats have been changed (11 for TDocStd, 4 for BRep Shape and 3 for Binary BRep Shape)
theWithNormals parameter added to BRepTools::Write()
IsWithNormals()/SetWithNormals() function added to BRepTools_ShapeSet
-normals/-noNormals option added to StoreTriangulation DRAW command
-normals/-noNormals option added to writebrep DRAW command
Tests for writing to brep/binary brep/BinXCaf/XmlXCaf added
Test for StoreTriangulation options -normals/-noNormals added
2021-01-20 21:20:43 +03:00
aavtamon
6fab0b3428 0031172: Unexpected result of BRepTools::OuterWire()
In BRepTools::OuterWire() compare of parameters was rewritten using Precision.
The test case bug31172 has been created
2021-01-15 18:52:11 +03:00
kgv
ff6122e008 0032055: Draw Harness, ViewerTest - add more vmanipulator position adjusting options
Draw::ParseOnOffIterator() - added auxiliary wrapper over Draw::ParseOnOff() for more compact syntax.
strncasecmp() definition for msvc compilers has been moved to Standard_CString for consistency with strcasecmp().
vmanipulator command has been refactored to use more straightforward parser.

vmanipulator now accepts "-adjustPosition {0|center|location|shapeLocation}" options
adjusting position to object's AABB center (existed before), object's local transformation or TopoDS_Shape location.
2021-01-14 19:21:54 +03:00
akaftasev
607f045954 0025055: Modeling Algorithms - Incorrect shape copying in BRepBuilderAPI_Copy
Correct test case: exclude "fixshape" calls
2021-01-13 17:18:49 +03:00
kgv
d84e866973 0032039: Visualization, TKOpenGl - implement simple shadow mapping for a direct light source
Graphic3d_CLight::ToCastShadows() - added new property defining if light should cast shadows (ignored by Ray-Tracing).

OpenGl_ShaderManager::stdComputeLighting() now implements shadow mapping for directional lights.
OpenGl_ShaderManager::prepareGeomMainSrc() now handles copying of arrays.
OpenGl_Context::ShadowMapTexUnit() - added property defining an offset for shadow map texture units.
OpenGl_ShadowMap - added new class storing shadow map FBO with parameters.
OpenGl_View::prepareFrameBuffers() - added resizing of shadow map FBOs.
OpenGl_View::Redraw() - added section redrawing scene into shadow map FBOs via OpenGl_View::renderShadowMap() method.

vrenderparams - added new parameters -shadowMapResolution and -shadowMapBias.
2021-01-13 17:10:26 +03:00
kgv
83746de803 0032041: Modeling Data - Access violation ExchangeUV in Geom_BezierSurface
Added missing NULL-checks to Geom_BezierSurface::ExchangeUV() and Geom_BSplineSurface::ExchangeUV().
2021-01-12 13:30:35 +03:00
kgv
41046145c4 0032009: Coding Rules, TKQADraw - suppress msvc10 compilation warning C4748
Added a workaround for msvc10 misbehavior.
2020-12-25 12:34:20 +03:00
kgv
ba562b2b7a 0031999: Tests - request Core Profile on macOS for Ray-Tracing tests 2020-12-23 19:45:32 +03:00
asuraven
3b1129a546 0029723: Modeling Data - Get rid of second writing format (additional save of UV points)
Default BinTools_ShapeSet format version has been changed from 3 to 1.
BinMNaming_NamedShapeDriver (Bin OCAF) now writes shapes in 1st version of Binary format instead of 3rd.
XmlMNaming_NamedShapeDriver (Xml OCAF) now writes shapes in 1st version of ASCII  format instead of 2nd.

writebrep now by default writes into 1st binary format version instead of 3rd.
2020-12-23 19:30:48 +03:00
dpasukhi
2057c37b67 0031756: Data Exchange - broken parsing of STEP entity in case of missing last parameter
- Parser is corrected to handle case of missing arguments properly (report error without corruption of the next entity)
- Added counter of entity arguments for appropriate error messages
- Plain C tools and data structures (recfile.*, stepfile.*) are converted to C++ class (StepFile_ReadData) to avoid use of static variables, so that reader can be safely used in a multi-threaded environment
2020-12-23 19:30:47 +03:00
mkrylova
d45edf248c 0031226: Foundation Classes - TCollection_AsciiString::IsRealValue() returns true if a string contains a non-real value
- Added comment to the method
- Added Boolean argument indicating the need for a strict
- Extended OCC11758 command in QABugs_19.cxx to verify IsRealValue()
- Updated existing places of IsRealValue() usage in ViewerTest to use new flag
2020-12-21 20:30:06 +03:00
asuraven
e529b67d19 0031998: Tests - unexpected file artifact at the root of repository
Saving path for .obj file changed
2020-12-18 19:48:03 +03:00
ifv
2fda738623 0031995: Modeling Data - Bounding box wrong for face
BndLib/BndLib_AddSurface.cxx : algorithm of building bounding box for BSpline surfaces is improved

Test cases are modified according to current state of algorithm
Test case bug31995 added
2020-12-17 21:17:44 +03:00
kgv
7fb9d6d573 0030762: Foundation Classes - include backtrace within OSD_SIGSEGV
Standard_Failure now holds an optional stack trace dump.
Added function Standard::StackTrace() dumping backtrace to the string.
SegvHandler within OSD_signal now appends backtrace to the message
if OSD::SignalStackTraceLength() is set to non-zero value
or environment variable "CSF_DEBUG_MODE" is set for debugging.

Added auxiliary macros Standard_NOINLINE disallowing function inlining.

Command "dsetsignal" has been extended by -strackTraceLength argument
for defining stack trace length within signals redirected to C++ exceptions.
Added "ddebugtraces" command for debugging purposes (adding stack traces to all exceptions).
2020-12-17 21:17:43 +03:00
asuraven
14eea8293d 0031946: Modeling Data - replace version numbers with enumerations in TopTools and BinTools
Added enumerations BinTools_FormatVersion & TopTools_FormatVersion for more clear version tracking in the code.
Added new BinTools::Write() & BRepTools::Write() overloaded functions with version & isWithTriangles parameters.

Added new "readbrep"/"writebrep" DRAW commands handling reading and writing of both Binary and ASCII .brep formats
and providing arguments to setup writing of triangulation data and of format version.
"binrestore" is made an alias to new command "readbrep".
"binsave" now is an alias to new "writebrep" saving into binary format by default ("writebrep" writes into ASCII format by default).
2020-12-17 21:17:42 +03:00
mkrylova
6eb502b27b 0031703: Data Exchange, RWGltf_CafWriter - add option putting textures inside GLB file as alternative to external references
RWGltf_CafWriter::ToEmbedTexturesInGlb() - added option embedding textures
into GLB file enabled by default.
Fixed uninitialized class field RWGltf_CafWriter::myIsForcedUVExport.

Image_Texture::MimeType() - added method returning MIME type based on image file format.
Image_Texture::WriteImage() - added method writing image into stream.
2020-12-17 21:05:05 +03:00
ifv
a2cb8561eb 0029441: Modeling Algorithms - Incorrect intersection curves between faces
ApproxInt/ApproxInt_SvSurfaces.hxx : adding field myUseSolver in order to manage calculations of characteristics of intersection points.
ApproxInt/ApproxInt_MultiLine.gxx : implementation of using myUseSolver for treatment points of MultiLine.
ApproxInt/ApproxInt_ImpPrmSvSurfaces.gxx : implementation of using myUseSolver for case intersection of implicit and parametric surfaces.

Test cases added
2020-12-17 21:05:04 +03:00
vro
a8d3a0b102 0029901: Support save to and restore from Stream interface in TObj package
Storage and retrieval of a document by means of a stream is distributed to TObj model.
Modified files:
-TObj_Model.hxx, cxx - the virtual methods Load() and SaveAs() obtained a stream as an argument instead of a file name.
-TObj_Application.hxx, cxx - same extension: the virtual methods LoadDocument() and SaveDocument() use a stream to open and save a document.
-TObjDRAW.cxx - draw-commands TObjSave and TObjLoad are extended for -stream parameter, which allows usage of a file input or output stream instead of a file name.

A new test:
- bugs caf bug29901 - it creates a simple TObj-model, saves it on disk using a file stream, loads it by means of a file stream and checks the content.

Modified test:
- bugs caf bug28425 - just improved to proper manipulate a test-file on disk.
2020-12-17 21:05:03 +03:00
dpasukhi
465ffe2840 0031000: Data Exchange - STEP file cannot be opened due to lower-case special token End-ISO-10303-21
Update flex lexical scanner (step.lex lex.step.cxx) to parse special tokens in a case insensitive manner
2020-12-14 18:39:00 +03:00