occt.git
2 years ago0032585: Data Exchange, RWGltf_CafWriter - include OCCT version IR-2021-09-24
kgv [Thu, 23 Sep 2021 20:52:42 +0000 (23:52 +0300)]
0032585: Data Exchange, RWGltf_CafWriter - include OCCT version

2 years ago0032582: Configuration, genproj - make CSF_OPT_LIB64D configurable by genconf
kgv [Wed, 22 Sep 2021 21:50:20 +0000 (00:50 +0300)]
0032582: Configuration, genproj - make CSF_OPT_LIB64D configurable by genconf

2 years ago0032579: Draw Harness, ViewerTest - extend vbackground -cubemap syntax to configure...
kgv [Tue, 21 Sep 2021 21:18:35 +0000 (00:18 +0300)]
0032579: Draw Harness, ViewerTest - extend vbackground -cubemap syntax to configure sRGB flag

Command vbackground has been refactored to simplify logic and relax syntax.
Added -srgb argument to vbackground and vtexture commands.

2 years ago0032580: Data Exchange, STL - add option splitting nodes at sharp corners
kgv [Tue, 21 Sep 2021 08:56:09 +0000 (11:56 +0300)]
0032580: Data Exchange, STL - add option splitting nodes at sharp corners

Added Poly_MergeNodesTool tool for merging nodes within triangulation.
Added RWStl_Reader::MergeAngle() property managing merging behavior.

2 years ago0029478: Crash because bSplineSurfaceWithKnots is NULL.
asemenov [Fri, 17 Sep 2021 15:46:43 +0000 (18:46 +0300)]
0029478: Crash because bSplineSurfaceWithKnots is NULL.

Modified the method void RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface::ReadStep
Added processing B spline surface with knots and rational B spline surface with empty data in the name field
Added test

2 years ago0031631: Modeling Algorithms - Invalid result of Pipe builder
abulyche [Thu, 16 Sep 2021 06:29:49 +0000 (09:29 +0300)]
0031631: Modeling Algorithms - Invalid result of Pipe builder

Added the ability to operate the algorithm with different types of curves.

2 years ago0031388: Data Exchange - support kinematics data in STEP format IR-2021-09-17
dpasukhi [Thu, 12 Mar 2020 16:29:21 +0000 (19:29 +0300)]
0031388: Data Exchange - support kinematics data in STEP format

- add new STEP entities.

2 years ago0032552: Modeling Algorithms - BRepExtrema_DistShapeShape algorithm consumes too...
asuraven [Thu, 2 Sep 2021 10:59:04 +0000 (13:59 +0300)]
0032552: Modeling Algorithms - BRepExtrema_DistShapeShape algorithm consumes too much memory

Used a new BRepExtrema_DistShapeShape::DistanceVertVert() function to replace DistanceMapMap() to calculate vertex/vertex distance

2 years ago0032566: Modeling Algorithms - Incorrect result of offset operation in mode "Complete...
emv [Fri, 10 Sep 2021 13:06:50 +0000 (16:06 +0300)]
0032566: Modeling Algorithms - Incorrect result of offset operation in mode "Complete" join type "Intersection"

Before removal of the part make sure that it was not filled due to overlapping of opposite parts.
Improve procedure of checking for inverted edges by taking into account that the original edges may not be connected.

Correct test case offset/shape_type_i_c/YL5, as it was working incorrectly - some parts were missing.

2 years ago0032236: Modeling Algorithms - Exception on calculation optimal bounding box
kgv [Wed, 24 Mar 2021 07:37:29 +0000 (10:37 +0300)]
0032236: Modeling Algorithms - Exception on calculation optimal bounding box

 - BRepBndLib - added VOID box checks to AdjustFaceBox() method.
 - added the test

2 years ago0032089: Visualization, TKOpenGl - support GL_EXT_sRGB extension to OpenGL ES 2.0
kgv [Thu, 16 Sep 2021 07:50:18 +0000 (10:50 +0300)]
0032089: Visualization, TKOpenGl - support GL_EXT_sRGB extension to OpenGL ES 2.0

2 years ago0032461: Visualization - expensive call of glGetTexEnviv/glTexEnvi in each render...
sshutina [Wed, 15 Sep 2021 10:48:51 +0000 (13:48 +0300)]
0032461: Visualization - expensive call of glGetTexEnviv/glTexEnvi in each render of OpenGl_Text

 - removed the call of glGetTexEnviv, glTexEnvi
 - replaced on the OpenGl_Sampler::applyGlobalTextureParams/resetGlobalTextureParams
 - added the method in OpenGl_Font returning first texture

2 years ago0032330: Modeling Algorithms - Extend Offset algorithm with Progress Indicator and...
akaftasev [Thu, 18 Mar 2021 16:44:11 +0000 (19:44 +0300)]
0032330: Modeling Algorithms - Extend Offset algorithm with Progress Indicator and User Break

Add progress indicator to BRepOffset_MakeOffset::MakeOffsetShape().

2 years ago0032567: Coding Rules - rename Graphic3d_TypeOfShadingModel values to include full...
kgv [Mon, 13 Sep 2021 19:19:54 +0000 (22:19 +0300)]
0032567: Coding Rules - rename Graphic3d_TypeOfShadingModel values to include full enumeration name

2 years ago0030422: Random behaviour of BRepAdaptor_CompCurve
ifv [Thu, 19 Aug 2021 12:05:53 +0000 (15:05 +0300)]
0030422: Random behaviour of BRepAdaptor_CompCurve

BRepTools/BRepTools_WireExplorer.cxx - replace MapOfShape vmap by IndexedMapOfShape
to avoid random behavior of algorithm

bugs/moddata_3/bug30422 - new test case added

2 years ago0032561: Modelling Algorithms - UnifySameDomain does nothing while it is expected...
jgv [Fri, 10 Sep 2021 16:30:38 +0000 (19:30 +0300)]
0032561: Modelling Algorithms - UnifySameDomain does nothing while it is expected to union two pairs of faces

Correct method ShapeUpgrade_UnifySameDomain::UnifyFaces: when creating the Edge-Face map of initial shape, count each face only once.

2 years ago0032423: Coding Rules - NSOpenGLContext deprecation warnings during compilation for...
kgv [Fri, 10 Sep 2021 18:45:03 +0000 (21:45 +0300)]
0032423: Coding Rules - NSOpenGLContext deprecation warnings during compilation for macOS 10.14+

The warning has been suppressed for building TKOpenGl.

2 years ago0032450: Modeling Algorithms - change BRepLib_CheckCurveOnSurface & GeomLib_CheckCurv... IR-2021-09-10
asuraven [Tue, 13 Jul 2021 14:17:51 +0000 (17:17 +0300)]
0032450: Modeling Algorithms - change BRepLib_CheckCurveOnSurface & GeomLib_CheckCurveOnSurface interfaces to adapters

2 years ago0029233: Incorrect result of conversion to the STEP format.
asemenov [Thu, 2 Sep 2021 12:32:11 +0000 (15:32 +0300)]
0029233: Incorrect result of conversion to the STEP format.

Modified the method TopoDSToStep_MakeStepFace::Init
Added processing of degenerate toroidal surfaces, which are the base surfaces of offset surfaces
Added test

2 years ago0032565: Foundation Classes, OSD_FileSystem - expose interface for registering global...
kgv [Thu, 9 Sep 2021 18:04:21 +0000 (21:04 +0300)]
0032565: Foundation Classes, OSD_FileSystem - expose interface for registering global protocols

Added methods OSD_FileSystem::AddDefaultProtocol()/::RemoveDefaultProtocol()
and fixed misleading description of OSD_FileSystemSelector::AddProtocol().

2 years ago0032540: RWGltf_CafReader - optional "scene" parameter encoded as mandatory
kgv [Thu, 9 Sep 2021 18:59:18 +0000 (21:59 +0300)]
0032540: RWGltf_CafReader - optional "scene" parameter encoded as mandatory

First scene is now loaded when default one is undefined.

2 years ago0031337: Inspectors - user guide update
sshutina [Thu, 9 Sep 2021 15:28:31 +0000 (18:28 +0300)]
0031337: Inspectors - user guide update

 - Modifyed 3D view:
     Added the trihedron, view cube
     Removed the scene manipulation actions (Fit all isn't removed)
 - Added the new MessageView plugin to display content of Message_Report
 - DFBrowser plugin improvements:
     Added the  button to switch ON DumpJson in DFBrowser(OFF by default, for better performance)
     Renamed in DFBrowser "Property Panel" into "Property Panel (custom)
     Removed the selection controls
 - ShapeView plugin improvements:
     Property View content based on DumpJson (columns in tree view for properties are removed),
     Properties for TopoDS_Shape are displayed
 - VInspector plugin imrovements:
      Property View content based on DumpJson (columns in tree view for properties are removed),
      Properties for AIS_InteractiveContext and AIS_InteractiveObject are displayed
      Removed History panel in VInspector as not used
      Implemented the item and actions in VInspector for setting Lights in the view

2 years ago0032092: Visualization, TKService - Image_VideoRecorder writes garbage from Grayscale...
kgv [Thu, 9 Sep 2021 19:34:48 +0000 (22:34 +0300)]
0032092: Visualization, TKService - Image_VideoRecorder writes garbage from Grayscale image

Image_VideoRecorder::writeVideoFrame(), added protection from API misuse.

2 years ago0032564: Foundation Classes, OSD_CachedFileSystem - allow referring to non-default...
kgv [Thu, 9 Sep 2021 15:00:38 +0000 (18:00 +0300)]
0032564: Foundation Classes, OSD_CachedFileSystem - allow referring to non-default File System

Linked file system can be now customized within OSD_CachedFileSystem.

2 years ago0032507: Visualization, TKOpenGl - topmost text disappears with Graphic3d_RTM_DEPTH_P...
sshutina [Thu, 9 Sep 2021 14:54:13 +0000 (17:54 +0300)]
0032507: Visualization, TKOpenGl - topmost text disappears with Graphic3d_RTM_DEPTH_PEELING_OIT enabled

2 years ago0032531: Application Framework - There should be methods to get explanations of PCDM_...
vro [Wed, 8 Sep 2021 06:49:52 +0000 (09:49 +0300)]
0032531: Application Framework - There should be methods to get explanations of PCDM_StoreStatus and PCDM_ReaderStatus values

Documentation is added for PCDM_ReaderStatus enumeration.

Modified:
- PCDM_ReaderStatus.hxx: each value received a short explanation.

2 years ago0030206: Improve API of commands bbop and bapibop
emv [Tue, 7 Sep 2021 13:00:25 +0000 (16:00 +0300)]
0030206: Improve API of commands bbop and bapibop
0030620: Tests - perf/bop/buildfaces does not match description (broken)

Allow using meaningful parameters for the commands bbop and bapibop:
* common - for Common operation
* fuse - for Fuse operation
* cut - for Cut operation
* tuc/cut21 - for Cut21 operation
* section - for Section operation

Add description for the commands dealing with Boolean/GF/Split operations.
Validate arguments of these commands.

Correct test case perf/bop/buildfaces to perform GF execution in parallel and serial modes - compare the results.

2 years ago0030151: Modeling Algorithms - Removal of the API level of old Boolean operations...
emv [Fri, 21 Sep 2018 08:43:16 +0000 (11:43 +0300)]
0030151: Modeling Algorithms - Removal of the API level of old Boolean operations algorithm (BRepAlgo_BooleanOperation)

The following classes have been removed as obsolete:
- BRepAlgo_BooleanOperation
- BRepAlgo_Fuse
- BRepAlgo_Cut
- BRepAlgo_Common
- BRepAlgo_Section

The corresponding classes from BRepAlgoAPI package have to be used instead.

Draw commands:
- fuse
- cut
- common
- section/psection
have also been removed as obsolete.

The corresponding commands for modern Boolean operations algorithm (bfuse/bcut/bcommon/bsection) have to be used instead.

Adjustment of the test cases to use the commands for modern algorithm.

2 years ago0032107: Data Exchange, RWGltf_CafReader - reading glTF document back loses sharing
kgv [Sun, 5 Sep 2021 15:40:55 +0000 (18:40 +0300)]
0032107: Data Exchange, RWGltf_CafReader - reading glTF document back loses sharing

RWGltf_CafWriter has been fixed to write shared Faces having a different style.
RWGltf_GltfJsonParser::gltfParsePrimArray() now tries to create a shared TopoDS_Face
from the same primitive array definition.

RWGltf_CafReader - improved name generation.

2 years ago0030788: Modeling Algorithms - BRepAlgoAPI_Defeaturing does not propagate progress...
akaftasev [Tue, 7 Sep 2021 15:03:20 +0000 (18:03 +0300)]
0030788: Modeling Algorithms - BRepAlgoAPI_Defeaturing does not propagate progress indicator to underlying algorithms

Added progress indicator to BRepAlgoAPI_Defeaturing

2 years ago0032328: Missing include of TopoDS_Edge.hxx in ShapeUpgrade_UnifySameDomain.hxx
kgv [Mon, 6 Sep 2021 07:36:38 +0000 (10:36 +0300)]
0032328: Missing include of TopoDS_Edge.hxx in ShapeUpgrade_UnifySameDomain.hxx

2 years ago0030722: Modeling Algorithms - BRepExtrema_DistShapeShape computes wrong distances
abulyche [Wed, 1 Sep 2021 14:45:52 +0000 (17:45 +0300)]
0030722: Modeling Algorithms - BRepExtrema_DistShapeShape computes wrong distances

Updated the math_DirectPolynomialRoots.cxx
Added the test case "bug30722"
Updated the command "b2dclassify" in the BOPTest_LowCommands.cxx

2 years ago0018170: Modeling Data - crash in TopExp_Explorer::Init if Clear was called after...
msv [Fri, 3 Sep 2021 13:11:35 +0000 (16:11 +0300)]
0018170: Modeling Data - crash in TopExp_Explorer::Init if Clear was called after empty constructor

TopExp_Explorer::Clear() now sets myTop=-1 with align to TopExp_Explorer::Init() logic.

2 years ago0029792: Add ::IsParallel method to GeomAPI_Extrema* classes IR-2021-09-03
asuraven [Wed, 18 Aug 2021 13:54:40 +0000 (16:54 +0300)]
0029792: Add ::IsParallel method to GeomAPI_Extrema* classes

Add IsParallel() methods for classes:
- GeomAPI_ExtremaCurveCurve
- GeomAPI_ExtremaCurveSurface
- GeomAPI_ExtremaSurfaceSurface

2 years ago0026269: Modeling Data - Analytical extrema does not take into account trimmed input...
ifv [Fri, 6 Aug 2021 11:49:14 +0000 (14:49 +0300)]
0026269: Modeling Data - Analytical extrema does not take into account trimmed input data

Treatment of trimmed data is added
Extrema/Extrema_ExtCC.cxx

Test cases added
tests/lowalgos/extcc/bug26269_1
tests/lowalgos/extcc/bug26269_2

Test cases are modified according to new behavior of algorithm

2 years ago0032485: Modeling Algorithms - Add Clone() function for adapters
asuraven [Tue, 20 Jul 2021 15:44:23 +0000 (18:44 +0300)]
0032485: Modeling Algorithms - Add Clone() function for adapters

Provide ShallowCopy() functions for adapters & evaluators of curves, 2d curves and surfaces. This will allow using copies of the same adapter in multi-thread calculations.

2 years ago0031942: Modeling Algorithms - add possibility to abort the BRepExtrema_DistShapeShap...
asuraven [Wed, 18 Aug 2021 12:05:58 +0000 (15:05 +0300)]
0031942: Modeling Algorithms - add possibility to abort the BRepExtrema_DistShapeShape algorithm

- Now available to interrupt the DRAW 'distmini' command by Ctrl/C
- Message_ProgressRange/Message_ProgressScope used in BRepExtrema_DistShapeShape::Perform() to provide user break

2 years ago0021264: Modeling Algorithms - Progress indicator for Boolean operations
akaftasev [Wed, 1 Sep 2021 09:48:54 +0000 (12:48 +0300)]
0021264: Modeling Algorithms - Progress indicator for Boolean operations

Update BOP commands to use progress indicator
Deleted wrong usage of progress indicator from bop operations
Added UserBreak() method to break execution boolean operation if progress indicator is used
Added method AnalyzeProgress() to calculate steps of progress indicator
Introduce BOPAlgo_ParallelAlgo which has myRange as a field to be used in parallel vector.
Provide suitable way of keeping the progress steps of operations.
Give meaningful names to progress scopes.
Propagate progress indicator into deeper methods of BOA.
Add progress indicator to BOPAlgo_BuilderFace and BOPAlgo_WireSplitter, BOPAlgo_BuilderSolid and BOPAlgo_ShellSplitter

2 years ago0032125: Application Framework, OCAF - need to have adequate message if document...
vro [Wed, 1 Sep 2021 08:47:41 +0000 (11:47 +0300)]
0032125: Application Framework, OCAF - need to have adequate message if document cannot be saved due to unrecognized format

A list of storage statuses (PCDM_StoreStatus) is extended for PCDM_SS_UnrecognizedFormat. It is set if
- extension of a document file name is not defined (the extension doesn't correspond to any declared file formats) or
- a storage driver is not found for the document storage format.

Modified:
CDF_StoreList.cxx: the mechanism of raising and catching exceptions is replaced by direct setting the status and error message for each particular error.
PCDM_StoreStatus.hxx: a new enumeration value is added - PCDM_SS_UnrecognizedFormat. Also, a short explanation is added to each enumeration value.
DDocStd_ApplicationCommands.cxx: processing of a new enumeration value by the draw-command.
XDEDRAW.cxx: processed a new enumeration value PCDM_SS_UnrecognizedFormat by saveDoc draw-command.

Deleted:
CDF_MetaDataDriverError.hxx: It is not used anywhere and it seems it will not be used by someone.

2 years ago0032556: Data Exchange - A toroidal part of solid is corrupted while writing or readi...
dpasukhi [Fri, 3 Sep 2021 11:42:02 +0000 (14:42 +0300)]
0032556: Data Exchange - A toroidal part of solid is corrupted while writing or reading STEP file

Fix STEP writing Wire for periodic surface

2 years ago0032495: Coding rules - eliminate CLang UndefinedBehaviorSanitizer warnings
mkrylova [Wed, 28 Jul 2021 06:32:34 +0000 (09:32 +0300)]
0032495: Coding rules - eliminate CLang UndefinedBehaviorSanitizer warnings

- fixed CLang UndefinedBehaviorSanitizer warnings

2 years ago0030976: Configuration, CMake - Build failure with static FreeType dependency
kgv [Fri, 3 Sep 2021 12:22:22 +0000 (15:22 +0300)]
0030976: Configuration, CMake - Build failure with static FreeType dependency

Removed linkage with "freetype.lib" with help of pragma lib specific to msvc.
FreeType library should be configured as a normal external dependency via CSF_FreeType
by CMake and genproj, which is already done (information was duplicated).

2 years ago0032553: Configuration, CMake - unable to building with ActiveTcl
kgv [Thu, 2 Sep 2021 06:03:55 +0000 (09:03 +0300)]
0032553: Configuration, CMake - unable to building with ActiveTcl

Removed linkage with "tcl8.6.lib" with help of pragma lib specific to msvc.
Tcl libraries should be configured as normal external dependencies via CSF_TclLibs
by CMake and genproj, which is already done (information was duplicated).

2 years ago0031351: Inspectors - thread in DFBrowser removing
sshutina [Wed, 1 Sep 2021 12:43:40 +0000 (15:43 +0300)]
0031351: Inspectors - thread in DFBrowser removing

 - DFBrowser_Thread and connected are removed from the package as obsolete

2 years ago0032502: Modeling Algorithms - BOP wrong result on sphere and cylinder
jgv [Fri, 27 Aug 2021 09:53:29 +0000 (12:53 +0300)]
0032502: Modeling Algorithms - BOP wrong result on sphere and cylinder

Modifications in the method IntPatch_ALineToWLine::MakeWLine:
correct setting parameters to vertices on IntPatch_WLine curve.

2 years ago0032549: Configuration - fix misprint in adm/scripts/android_build.bat for Draco...
kgv [Tue, 31 Aug 2021 07:58:00 +0000 (10:58 +0300)]
0032549: Configuration - fix misprint in adm/scripts/android_build.bat for Draco library name

2 years ago0032546: Data Exchange, XCAF - mark material as defined XCAFDoc_VisMaterialPBR::IsDef...
kgv [Mon, 30 Aug 2021 17:53:33 +0000 (20:53 +0300)]
0032546: Data Exchange, XCAF - mark material as defined XCAFDoc_VisMaterialPBR::IsDefined=true within default constructor

XCAFDoc_VisMaterialCommon and XCAFDoc_VisMaterialPBR default constructors now set IsDefined property to TRUE.
So that it is required to set IsDefined=false explicitly to create an undefined material,
which is done by XCAFDoc_VisMaterial constructor.

Existing application code shouldn't require any modifications in most cases
(IsDefined=true required before to setup material could be now removed).

2 years ago0032545: Configuration, CMake - add BUILD_FORCE_RelWithDebInfo option for generating...
kgv [Fri, 27 Aug 2021 22:42:10 +0000 (01:42 +0300)]
0032545: Configuration, CMake - add BUILD_FORCE_RelWithDebInfo option for generating VS project files with Debug info in Release mode

2 years ago0028687: Offset for open wire is built with incorrect direction
akaftasev [Thu, 26 Aug 2021 11:33:56 +0000 (14:33 +0300)]
0028687: Offset for open wire is built with incorrect direction

Added new condition to exclude offsetting non closed part of circle as complete circle

2 years ago0028684: BRepOffsetAPI_MakeOffset produces wire with another orientation in compare...
akaftasev [Tue, 24 Aug 2021 19:47:18 +0000 (22:47 +0300)]
0028684: BRepOffsetAPI_MakeOffset produces wire with another orientation in compare with source wire

Added flag to reverse resulting shape, if it was reverse in BuildDomains() to bringing to the same direction as the original shape

2 years ago0032464: Draw Harness, ViewerTest - rely on AIS_ViewController within vanimation... IR-2021-08-27
kgv [Sun, 27 Jun 2021 17:13:49 +0000 (20:13 +0300)]
0032464: Draw Harness, ViewerTest - rely on AIS_ViewController within vanimation command

Added AIS_ViewController::ObjectsAnimation() property
similar to AIS_ViewController::ViewAnimation() but designed for objects animation.

2 years ago0032281: Visualization - add Select3D_SensitiveCylinder
mkrylova [Mon, 5 Jul 2021 12:06:50 +0000 (15:06 +0300)]
0032281: Visualization - add Select3D_SensitiveCylinder

- implemented Select3D_SensitiveCylinder class performing an analytical intersection with an untriangulated cone/cylinder
- added tests

2 years ago0032403: Visualization - RayTracing renders all object as white color in view with...
kgv [Wed, 25 Aug 2021 07:55:38 +0000 (10:55 +0300)]
0032403: Visualization - RayTracing renders all object as white color in view with white background

OpenGl_Caps::buffersOpaqueAlpha is now set to TRUE by default.
OpenGl_View::runPathtrace - fixed higlighting with PathTracing turned on and buffersOpaqueAlpha=true.

2 years ago0031514: Foundation Classes - Add Base64 encoding function
msv [Thu, 23 Apr 2020 10:13:11 +0000 (13:13 +0300)]
0031514: Foundation Classes - Add Base64 encoding function

The class FSD_Base64Decoder has been renamed to FSD_Base64.
The new method FSD_Base64::Encode has been added.
The method Decode has been improved for performance.

2 years ago0031382: Data Exchange - BinXCAF should preserve length unit information IR-2021-08-20
dpasukhi [Tue, 10 Nov 2020 04:52:30 +0000 (07:52 +0300)]
0031382: Data Exchange - BinXCAF should preserve length unit information

Possibility for adding LengthUnit info to XCAF document using special class XCAFDoc_LenghtUnit and XCAFDoc_LenghtUnitTool is implemented.
Package UnitsMethods is split: geom methods were placed to new file GeomConvert_Units which is in the toolkit TKXSBase, internal step scale factors was placed to StepData.
Updated UnitMethods to convert scale factor to different unit types.
Now, XSAlgo::XSAlgo_AlgoContainer is used to update unit info from static interface values.
New Draw command "XSetLengthUnit" and "XGetLengthUnit" for set or get XDE attribute.
Upgraded tests for STEP, IGES, OBJ, glTF, VRML formats to check area regressing with used unit.
Upgraded tests\de test cases to use any units in the "loop back" algorithms.

2 years ago0027457: Modeling - Raise exception if scaled transformation is used for shape location
ifv [Mon, 5 Apr 2021 08:15:45 +0000 (11:15 +0300)]
0027457: Modeling - Raise exception if scaled transformation is used for shape location

Implementation of raising exception while using scale and mirror transformation in shape location
TopLoc/TopLoc_Location.hxx
TopoDS/TopoDS_Shape.hxx

Implementation of new tools for removing forbidden locations from shapes:
BRepTools/BRepTools_PurgeLocations.cxx
BRepTools/BRepTools_PurgeLocations.hxx
BRepTools/BRepTools.cxx
BRepTools/BRepTools.hxx

Draw commands for transforming shapes are corrected, new draw commands: purgeloc, checkloc added
BRepTest/BRepTest_BasicCommands.cxx

Fixing unstable test bug xde bug24759
StepToGeom/StepToGeom.cxx

All other C++ commits are modification of algorithms used mainly in import/export operations in order to allows these operations if shape locations contains scale and mirror transformations.

New test for command purgeloc added
tests/bugs/moddata_3/bug27457
tests/bugs/moddata_3/bug27457_1
tests/bugs/moddata_3/bug27457_2

Some test corrected according to modifications.

2 years ago0032536: Configuration - extend adm/scripts with USE_DRACO option
kgv [Sat, 14 Aug 2021 15:00:19 +0000 (18:00 +0300)]
0032536: Configuration - extend adm/scripts with USE_DRACO option

2 years ago0026979: Parabola curve intersection with variety of surfaces produces incorrect... IR-2021-08-13
knosulko [Thu, 29 Jul 2021 08:00:09 +0000 (11:00 +0300)]
0026979: Parabola curve intersection with variety of surfaces produces incorrect results.

Method Intf_Tool::ParabBox now properly estimates the number of segments for a 3D parabola.
Fix input arguments of called Bnd_Box::Get method in Intf_Tool::HyprBox method.

2 years ago0027884: Modeling Algorithms - Possible improvement for 2d classifier
abulyche [Wed, 14 Jul 2021 20:40:32 +0000 (23:40 +0300)]
0027884: Modeling Algorithms - Possible improvement for 2d classifier

Added the implementation of bndbox<->line and bndbox<->segment intersections for 2D to Bnd_Box2d
Added the speedup for 2d classification to BRepClass_Intersector.cxx
Added the test for our improvement

2 years ago0032533: Visualization, TKOpenGl - suppress error reported on Intel drivers due to...
kgv [Thu, 12 Aug 2021 12:50:16 +0000 (15:50 +0300)]
0032533: Visualization, TKOpenGl - suppress error reported on Intel drivers due to OpenGL 4.5 specs violation

OpenGl_GlCore45 - removed a couple of FFP-related functions introduced by OpenGL 4.5 Compatible Profile, but not Core Profile.

OpenGl_GlFunctions::load() now tries to load a set of functions
from GL_ARB_robustness extension (having ARB suffix) to fill OpenGL 4.5 function table,
and from GL_ARB_indirect_parameters extension to fill missing items in OpenGL 4.6 function table on Intel drivers.
Warning message (trace level) is now reported instead of error in case of fallback usage.

2 years ago0032530: Data Exchange, RWGltf_CafWriter - add option merging Faces within the Part
kgv [Wed, 11 Aug 2021 15:48:23 +0000 (18:48 +0300)]
0032530: Data Exchange, RWGltf_CafWriter - add option merging Faces within the Part

Added RWGltf_CafWriter::ToMergeFaces() property disabled by default.
RWMesh_MaterialMap - fixed creation of texture folder within working dir ".".
XCAFDoc_VisMaterial::FillMaterialAspect() - added clamping of too small shininess values.

Added options -mergefaces and -splitindices16 to WriteGltf for new feature.
Added -systemCoordSys option to WriteGltf for consistency with WriteObj.

2 years ago0032527: Data Exchange, RWGltf_CafWriter - make name format configurable
kgv [Wed, 11 Aug 2021 13:11:45 +0000 (16:11 +0300)]
0032527: Data Exchange, RWGltf_CafWriter - make name format configurable

Added properties RWGltf_CafWriter::NodeNameFormat() and ::MeshNameFormat().

2 years ago0032525: Data Exchange, RWGltf_CafReader - support KHR_draco_mesh_compression
kgv [Tue, 10 Aug 2021 17:35:14 +0000 (20:35 +0300)]
0032525: Data Exchange, RWGltf_CafReader - support KHR_draco_mesh_compression

Added new optional dependency - Draco library.
RWGltf_GltfJsonParser now detects KHR_draco_mesh_compression extension,
marks accessor being compressed and redirects to compressed buffer view.
RWGltf_TriangulationReader now handles decoding of buffer view compressed using Draco.

env.bat template for genproj has been modified to allow specifying dedicated folders
with debug versions of libraries (CSF_OPT_LIB64D / CSF_OPT_BIN64D) within custom.bat.
Removed unused CSF_FREETYPE from TKOpenGl.

2 years ago0032524: Data Exchange, RWGltf_CafWriter - avoid writing translucent metallic materials
kgv [Tue, 10 Aug 2021 14:23:44 +0000 (17:23 +0300)]
0032524: Data Exchange, RWGltf_CafWriter - avoid writing translucent metallic materials

RWGltf_GltfMaterialMap::DefineMaterial() and XCAFDoc_VisMaterial::ConvertToPbrMaterial()
now reset matallic factor to 0.0f in case of transparent color.

2 years ago0031220: Visualization - remove internal field of viewer selector in context
achesnok [Thu, 29 Jul 2021 10:28:19 +0000 (13:28 +0300)]
0031220: Visualization - remove internal field of viewer selector in context

- Removed myMainSel field from AIS_InteractiveContext and obtained this value from mgrSelector.
- Moved SelectMgr_ViewerSelector3d implementation into SelectMgr_ViewerSelector to get rid of redundant separation and extra DownCast's.
- Declared SelectMgr_ViewerSelector3d as deprecated.

2 years ago0032523: Draw Harness, ViewerTest - vrepaint -continuous has no effect
kgv [Fri, 6 Aug 2021 13:13:58 +0000 (16:13 +0300)]
0032523: Draw Harness, ViewerTest - vrepaint -continuous has no effect

ViewerTest_ContinuousRedrawer now explicitly invalidates V3d_View content
in addition to emitting window content redrawing request.

"vrepaint -continuous" now tries to avoid creation of dedicated thread
on Windows platform and relies on AIS_ViewController::SetContinuousRedraw().

2 years ago0026083: Coding Rules - Poor design of Graphic3d_GraduatedTrihedron
achesnok [Wed, 4 Aug 2021 11:37:46 +0000 (14:37 +0300)]
0026083: Coding Rules - Poor design of Graphic3d_GraduatedTrihedron

- Made class Graphic3d_AxisAspect publicly nested in Graphic3d_GraduatedTrihedron.
- Removed public PtrView field from trihedron and obtained it from OpenGL_Workspace while rendering.
- Made CubicAxesCallback protected and provided corresponding getter/setter.
- Renamed AxisAspect() to AxisAspectAt().

2 years ago0032490: Data Exchange - provide OSD_FileSystem::OpenOStream() for output streams IR-2021-08-06
mkrylova [Mon, 26 Jul 2021 08:09:57 +0000 (11:09 +0300)]
0032490: Data Exchange - provide OSD_FileSystem::OpenOStream() for output streams

- provided OSD_FileSystem::OpenOStream() for output streams
- replaced OSD_OpenStream() usage with OSD_FileSystem::DefaultFileSystem()

2 years ago0032518: Visualization - add AIS_InteractiveContext::SetDefaultDrawer()
kgv [Wed, 4 Aug 2021 06:42:04 +0000 (09:42 +0300)]
0032518: Visualization - add AIS_InteractiveContext::SetDefaultDrawer()

2 years ago0032470: Modeling Algorithms - BOP wrong result on sphere and box
jgv [Fri, 30 Jul 2021 00:09:09 +0000 (03:09 +0300)]
0032470: Modeling Algorithms - BOP wrong result on sphere and box

Correct adjusting pcurves on periodic surfaces: take the middle point as a reference point.

2 years ago0032508: Visualization - OpenGl_FrameBuffer::InitWrapper() should not fail on wrappin...
kgv [Sun, 1 Aug 2021 09:34:41 +0000 (12:34 +0300)]
0032508: Visualization - OpenGl_FrameBuffer::InitWrapper() should not fail on wrapping textured FBO

OpenGl_FrameBuffer::InitWrapper() now reads viewport from GL_VIEWPORT
and doesn't return error on GL_TEXTURE attachments.
OpenGl_FrameBuffer::Release() assertion is now skipped for wrapped FBOs.

2 years ago0032506: Visualization - add AIS_InteractiveContext::ObjectIterator() for iterating... IR-2021-07-30
kgv [Fri, 30 Jul 2021 19:35:28 +0000 (22:35 +0300)]
0032506: Visualization - add AIS_InteractiveContext::ObjectIterator() for iterating over objects in context

2 years ago0032482: Visualization - Object owner isn't removed from picked owner when object...
kgv [Mon, 26 Jul 2021 14:16:13 +0000 (17:16 +0300)]
0032482: Visualization - Object owner isn't removed from picked owner when object is removed

SelectMgr_ViewerSelector::RemoveSelectableObject() now removes object from picking results.

2 years ago0032492: Coding - New warnings after integration fix for 27814
asuraven [Tue, 27 Jul 2021 11:41:58 +0000 (14:41 +0300)]
0032492: Coding - New warnings after integration fix for 27814

2 years ago0027919: Visualization - support multiple transformation persistence groups within... IR-2021-07-23
nds [Mon, 19 Jul 2021 10:31:05 +0000 (13:31 +0300)]
0027919: Visualization - support multiple transformation persistence groups within single presentation

Added transform persistence property to Graphic3d_Group and Select3D_SensitiveEntity.
SelectMgr_ViewerSelector, Graphic3d_Layer and OpenGl_Structure have been updated
to process per-group transform persistence within picking, ZFit and rendering.

Added zoomable state to Prs3d_ArrowAspect supported by PrsDim_Dimension.

Added gp_GTrsf::SetMat4(), opposite to gp_GTrsf::GetMat4().

2 years ago0032455: Data Exchange - replace OSD_OpenStream() usage with OSD_FileSystem::DefaultF...
mkrylova [Wed, 14 Jul 2021 12:06:35 +0000 (15:06 +0300)]
0032455: Data Exchange - replace OSD_OpenStream() usage with OSD_FileSystem::DefaultFileSystem()

- replaced OSD_OpenStream() usage with OSD_FileSystem::DefaultFileSystem()

2 years ago0027814: Parallelize BRepCheck_Analyzer
asuraven [Mon, 21 Jun 2021 16:15:09 +0000 (19:15 +0300)]
0027814: Parallelize BRepCheck_Analyzer

Change BRepCheck_Analyzer::Perform algorithm from recursion to 'for' loop
Add parallelization to BRepCheck_Analyzer::Perform
Add '-parallel' option to checkshape command to use parallelization. Default mode is single-thread.

mutex as Handle

2 years ago0032471: Mesh - Deflection of the triangulation is not recomputed for planar face
oan [Wed, 21 Jul 2021 11:12:35 +0000 (14:12 +0300)]
0032471: Mesh - Deflection of the triangulation is not recomputed for planar face

Method EstimateDeflection has been added to BRepLib in order to check and update value of deflection provided by Poly_Triangulation;
Introduction of Poly_TriangulationParameters intended to keep info about initial parameters of mesh stored by Poly_Triangulation;
BRepMesh stores user-specified parameters to Poly_Triangulation via Poly_TriangulationParameters;
Prefer initial parameters of mesh generator stored in Poly_Triangulation during check of mesh consistency.

2 years ago0032183: Visualization - implement AIS_LightSource::ProcessDragging() for rotating...
mkrylova [Fri, 26 Mar 2021 09:31:22 +0000 (12:31 +0300)]
0032183: Visualization - implement AIS_LightSource::ProcessDragging() for rotating directional light

- Added sensitive sphere for a light source
- Implemented AIS_LightSource::ProcessDragging() interface for rotating directional light source
- Added possibility to turn on/off directional light source dragging
- Added test

2 years ago0032329: Modeling Algorithms - Refactoring of the BRepOffset_MakeOffset_1.cxx to...
emv [Mon, 12 Jul 2021 11:27:01 +0000 (14:27 +0300)]
0032329: Modeling Algorithms - Refactoring of the BRepOffset_MakeOffset_1.cxx to decrease number of static methods

Refactoring of the BRepOffset_MakeOffset_1.cxx - Introduce local class BRepOffset_BuildOffsetFaces to compute splits of offset faces.

Change of tests is caused by the correction of the misprint in the code (incorrect input parameter for CheckEdgesCreatedByVertex method).

2 years ago0032479: Application Framework - unnecessary API break within TDocStd_Application... IR-2021-07-16
kgv [Wed, 14 Jul 2021 08:31:16 +0000 (11:31 +0300)]
0032479: Application Framework - unnecessary API break within TDocStd_Application::Open()

Added aliases to Open() without theFilter argument for compatibility with old API.

2 years ago0032424: [Regression] Mesh - Slow triangulation of a simple shape.
oan [Thu, 8 Jul 2021 10:07:05 +0000 (13:07 +0300)]
0032424: [Regression] Mesh - Slow triangulation of a simple shape.

Check links produced by splitting of an initial link by the middle point for MinSize requirement.

2 years ago0032121: Draw Harness, ViewerTest - implement -reset option for vlight command
kgv [Fri, 9 Jul 2021 20:22:29 +0000 (23:22 +0300)]
0032121: Draw Harness, ViewerTest - implement -reset option for vlight command

vlight command has been revised to provide more friendly syntax.
Command now accepts light index or name as first argument.
Added arguments -enable/-disable for managing enabled state.
Added argument -reset to reset light parameters to default values.

V3d_Viewer::SetDefaultLights() now sets names "headlight" and "ambient" to created lights.
Graphic3d_TypeOfLightSource enumeration values have been renamed to avoid shortcuts.
Draw::Atof(), applied corrections to avoid explicit new/delete calls.

2 years ago0031047: Modeling Algorithms - BRepExtrema_DistShapeShape gives wrong result IR-2021-07-09
abulyche [Mon, 12 Apr 2021 10:13:14 +0000 (13:13 +0300)]
0031047: Modeling Algorithms - BRepExtrema_DistShapeShape gives wrong result

Added map of edges to BrepClass_Edge
Added searching of vertices with high tolerance to BrepClass_Intersector.cxx
Added check for hitting a vertex with high tolerance
Added the creation of a segment for the correct work of the classifier

2 years ago0032473: Visualization, WNT_Window::ProcessMessage() - handle WM_TOUCH
kgv [Mon, 5 Jul 2021 20:34:33 +0000 (23:34 +0300)]
0032473: Visualization, WNT_Window::ProcessMessage() - handle WM_TOUCH

WNT_Window::ProcessMessage() now redirects WM_TOUCH events to AIS_ViewController,
so that it is possible to use multitouch displays in Draw Harness on Windows platform.

_WIN32_WINNT in CMake configuration for MinGW has been raised from 0x0501 to 0x0601.

2 years ago0032475: Configuration, qmake - drop "-z defs" linker flag on macOS
kgv [Thu, 8 Jul 2021 11:02:40 +0000 (14:02 +0300)]
0032475: Configuration, qmake - drop "-z defs" linker flag on macOS

2 years ago0031890: Modeling Algorithms - Invalid result of common fuse BOP. Intersection has...
jgv [Sun, 6 Jun 2021 02:39:55 +0000 (05:39 +0300)]
0031890: Modeling Algorithms - Invalid result of common fuse BOP. Intersection has failed.

Modify the method BOPTools_AlgoTools3D::DoSplitSEAMOnFace: correct processing closed non-periodic surfaces.

2 years ago0031918: Application Framework - New binary format for fast reading part of OCAF...
mpv [Thu, 24 Jun 2021 14:26:52 +0000 (17:26 +0300)]
0031918: Application Framework - New binary format for fast reading part of OCAF document

Implementation of new format for quick reading and writing parts of the documents (sub-set of labels and sub-set of attributes). It consists in writing shapes and all their contents right in the TNaming_NamedShape attribute placement and skipping the shape section. New format 12 for Binary file types is assigned to this version.

Added PCDM_ReaderFilter class that could be used in Open methods of TDocStd_Application. If it is defined, it allows to read:
- into already opened document in append mode AppendMode_Protect (do not overwrite existing attributes) or AppendMode_Overwrite
- only specified sub-trees of the document using AddPath (const TCollection_AsciiString& theEntryToRead)
- only specified attributes using AddRead (const TCollection_AsciiString& theRead) where theRead could be "TDataStd_Name", for example
- to skip specified attributes read using AddSkipped (const TCollection_AsciiString& theSkipped) where theSkipped could be "TDF_Reference", for example

The current limitations:
- only in Bin format
- if shapes have in the document shared topology, loaded in "append" mode in different "load" operations, they will have no shared topology anymore

Modifications:
BinLDrivers and BinDrivers packages - modifications related to the quick part tree format flag usage, skipping shape section writing and adding labels sizes into the document to be able to pass labels during the reading quickly.
BinObjMgt_Persistent and BinObjMgt_Position - to add possibility to write directly into the stream some data just after the attribute. Before this record a data-size is recorded.
BinMXCAFDoc package modifications to write BinMXCAFDoc_LocationDriver location in the same way as shapes write location data right after the attribute (empty) data in this new format.
BinTools package: creation of ShapeReader and ShapeWriter classes with same root class ShapeSetBase with ShapeSet class. These classes allows to write/read shapes directly to the stream. If some object is already in the stream, write a reference - relative position of the duplicated object. The old format of documents is still supported by Bin_ToolsShapeSet class.
PCDM_ReaderFilter - Allows the user to create a reading filter. It contains algorithm to browse labels tree quickly, without usage of referencing by entry-strings.
TDocStd, CDF and some other packages are changed for supporting reading filters API and options.

Tests, documentation and upgrade information are also added for both issues: 31839 and 31918 related to this commit.

2 years ago0032429: Coding - Warnings during compilation on macosx arm64 with option BUILD_Inspe...
kgv [Tue, 6 Jul 2021 13:46:31 +0000 (16:46 +0300)]
0032429: Coding - Warnings during compilation on macosx arm64 with option BUILD_Inspector:BOOL=ON - part 2

2 years ago0032389: Visualization, AIS_Axis - simple ray creation and displaying IR-2021-07-02
mkrylova [Wed, 16 Jun 2021 13:21:17 +0000 (16:21 +0300)]
0032389: Visualization, AIS_Axis - simple ray creation and displaying

- Added constructor to create axis by gp_Ax1
- Added possibility to display axis as ray
- Added function SetDisplayAspect to set required visualization parameters

2 years ago0032441: Draw Harness - command readstl doesn't print error message on failure
mkrylova [Wed, 23 Jun 2021 14:08:56 +0000 (17:08 +0300)]
0032441: Draw Harness - command readstl doesn't print error message on failure

- added producing error message when passing an invalid file path

2 years ago0032465: Visualization, TKOpenGles - invalid enum on GL_RGBA16F initialization in...
kgv [Mon, 28 Jun 2021 19:58:37 +0000 (22:58 +0300)]
0032465: Visualization, TKOpenGles - invalid enum on GL_RGBA16F initialization in Edge 92

GL_HALF_FLOAT_OES from OpenGL ES 2.0 extension
is now avoided within OpenGL ES 3.0+ context in favor of GL_HALF_FLOAT.

emscripten_webgl_enable_extension() is now called for all extensions
checked by OpenGl_Context::CheckExtension().
So far this doesn't solve any problem, but looks more logical and provisional.

2 years ago0032463: Visualization - implement Image_AlienPixMap::Load() via emscripten_get_prelo...
kgv [Sun, 27 Jun 2021 14:32:27 +0000 (17:32 +0300)]
0032463: Visualization - implement Image_AlienPixMap::Load() via emscripten_get_preloaded_image_data()

2 years ago0032460: Coding Rules - eliminate CLang warning -Wunused-but-set-variable IR-2021-06-25
kgv [Thu, 24 Jun 2021 20:07:37 +0000 (23:07 +0300)]
0032460: Coding Rules - eliminate CLang warning -Wunused-but-set-variable

Code has been adjusted to suppress -Wunused-but-set-variable warnings.

DRAWEXE.wasm, compiler flags have been moved to linker flags
to eliminiate -Wunused-command-line-argument warnings.

2 years ago0032182: Visualization - add Select3D_SensitiveSphere
mkrylova [Wed, 17 Mar 2021 14:38:00 +0000 (17:38 +0300)]
0032182: Visualization - add Select3D_SensitiveSphere

- created Select3D_SensitiveSphere class
- implemented interfaces for intersection methods
- added tests

2 years ago0032459: Draw Harness, ViewerTest - fix description of vrenderparams -oit
kgv [Wed, 23 Jun 2021 18:33:43 +0000 (21:33 +0300)]
0032459: Draw Harness, ViewerTest - fix description of vrenderparams -oit

2 years ago0032458: Draw Harness, ViewerTest - fix misprint in vaspects -drawSilhouette
kgv [Wed, 23 Jun 2021 18:17:03 +0000 (21:17 +0300)]
0032458: Draw Harness, ViewerTest - fix misprint in vaspects -drawSilhouette

2 years ago0029059: It is necessary to have a unique way of checking of the validity of the...
asuraven [Wed, 28 Apr 2021 09:06:39 +0000 (12:06 +0300)]
0029059: It is necessary to have a unique way of checking of the validity of the edge and its 2D curves

Add new class BRepLib_ValidateEdge to use for edge checking instead of functions:
- Validate() from BOPTools_AlgoTools.cxx
- Validate() from BRepCheck_Edge.cxx
- ShapeAnalysis_Edge::ComputeDeviation()

2 years ago0032390: Visualization, SelectMgr_FrustumBuilder - use camera instead of duplicated...
osa [Fri, 28 May 2021 14:25:04 +0000 (17:25 +0300)]
0032390: Visualization, SelectMgr_FrustumBuilder - use camera instead of duplicated methods

Fix incorrect value of axis intersection with segment inside of SelectMgr_AxisIntersector::raySegmentDistance().
Move camera definition to base intersector (it is not possible to set it for axis intersector, is is not applicable).
Add method Graphic3d_Camera::SetIdentityOrientation() to set camera parameters to make current orientation matrix identity one.
Remove all matrices from selection intersectors and frustum builder and use camera instead of them.
Fix missed axis tests in vselect grid.

2 years ago0032429: Coding - Warnings during compilation on macosx arm64 with option BUILD_Inspe... IR-2021-06-18
kgv [Thu, 10 Jun 2021 14:46:20 +0000 (17:46 +0300)]
0032429: Coding - Warnings during compilation on macosx arm64 with option BUILD_Inspector:BOOL=ON