Update empty method guards to new style with regex (see PR).
Used clang-format 18.1.8.
New actions to validate code formatting is added.
Update .clang-format with disabling of include sorting.
It is temporary changes, then include will be sorted.
Apply formatting for /src and /tools folder.
The files with .hxx,.cxx,.lxx,.h,.pxx,.hpp,*.cpp extensions.
NCollection containers update:
- NCollection_Array1 - updated functionality
- NCollection_Array2 - NCollection_Array1 as a wrapper for 2array
- NCollection_Vector -> NCollection_DynamicArray was renamed and reworked.
TCollection:
- Use static empty string to avoid allocations on empty string
NCollection allocators update:
- NCollection_Allocator - allocator that used Standard::Allocate
- NCollection_OccAllocator - allocator-wrapper that used OCC BaseAllocator objects
- NCollection_IncAllocator - rework to increase performance
Standard:
- Rework functionality to use different allocation libs
- Implement basic of new way to wrap allocations tools
- Define 4 ways to allocation (defines in configure stage)
Additional changes:
- Hash function uses std::hash functionality
- size_t as a hash value
- New HashUtils with Murmur and FVN hash algo for x32 and x64
- Deprecated _0.cxx and .gxx DE classes reorganized
- Create own utility for std memory
- Update Standard_Transient to be more platform-independent
Math TK changes:
- math_Vector -> match_BaseVector<>
- Buffer decreased to cash 32 elements instead of 512
Removed double healing of Iges group entities
Added ShapeBuild_ReShape member to the IGESData_IGESModel class, shapes which are registered in ShapeBuild_ReShape class does not process to healing
Problem: From the point of view of the STEP format (and others), it is allowed
to describe a face on a surface with natural boundaries (torus, sphere) without
specifying these boundaries. Thus, a face on a closed surface and containing
an inner wire (or several) is correctly defined and describes a face with a
cutout defined by this wire. At the same time, there is a function
(ShapeFix_Face::FixOrientation) in the ShapeHealing procedure that corrects the
orientation of the wires, and it starts before the function of adding natural
boundaries (ShapeFix_Face::FixAddNaturalBound). There are many shapes that have
incorrectly oriented wires and this procedure successfully heals them, but on a
correctly specified face with single inner wire on closed surface, we do not get
the entire surface with a cutout, but a part of the surface defined by the wire.
This fix is intended to resolve this ambiguity.
Change:
1. Added function isNeedAddNaturalBound that returns TRUE if face needs to add
natural bounds.
2. Corrected condition in FixOrientation to ignoring faces that needs to add
natural bounds.
3. For tests in which one wire was incorrectly oriented on a closed surface,
flag AddNaturalBound was disabled.
5. Test with cutout from torus was created: bugs step bug28414.
Result: By default, it is correct to add natural boundaries, because this case
is correct from the point of view of the STEP format and others.
- ShapeFix_Face::FixMissingSeam method is fixed in order to handle degenerated torus
- Calculation of degenerated torus bounding box is fixed
- Test reference data is changed
Problem: the complete surface of the torus is not stored correctly in STEP format due to the fact that the edges are not properly ordered.
Change: added a mode for reordering edges in the wire with simultaneous use of 2d and 3d information (ShapeAnalysis_WireOrder). The new mode is used for torus-like surfaces before saving to STEP format.
Result: Torus correctly stored.
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.
Adaptor2d_Curve2d, Adaptor3d_Curve and Adaptor3d_Surface now inherit Standard_Transient.
Interfaces Adaptor2d_HCurve2d, Adaptor3d_HCurve, Adaptor3d_HSurface and their subclasses
are now aliases to Adaptor2d_Curve2d, Adaptor3d_Curve and Adaptor3d_Surface.
Removed numerous unsafe reinterpret casts.
Generic classes Adaptor3d_GenHCurve, Adaptor3d_GenHSurface, Adaptor2d_GenHCurve2d have been removed.
Several redundant .lxx files have been merged into .hxx.
Removed obsolete adaptor classes with H suffix.
In the result of translation one face lying on the spherical surface converted to the two separate faces due to method IsSurfaceUVPeriodic returned false for spherical surface.
Now method IsSurfaceUVPeriodic returns true for spherical surface in order to natural bounds can be added for spherical surface too.
Method ShapeFix_Face::FixOrientation was corrected to avoid reversing inner wire for case when spherical face has only one inner bound without outer bound.
Check that wire has bounding box equal to bounding box of surface was added in the method ShapeFix_Face::FixAddNaturalBound in order to avoid addition of the natural bounds ( test bugs xde bug22535_2 1 for face 2 lying on the torus)
In order to avoid regressions fix for translation "VERTEX_LOOP" entities was added. Natural bounds for "VERTEX_LOOP" lying on the Spherical and BSpline surface is added only if face does not have any other bounds.
In other case natural bounds were added during ShapeFix operation after translation in order take into account mutual position of the all bounds in the UV space of the face.
Progress indication mechanism is refactored to support incrementing progress within multithreaded algorithms.
The class Message_ProgressIndicator is only an interface to the user application.
It accumulates the progress provided by progress scopes.
The counter is protected by mutex for thread-safety.
The new class Message_ProgressScope replacing Message_ProgressSentry should be used to advance the progress.
The scopes are nested to each other to reflect the nested nature of operations.
The new class Message_ProgressRange should be used to pass the progress to sub-scopes.
All OCCT algorithms involving progress indication have been updated to new API.
Improvements in Draw_ProgressIndicator:
- Separate console mode has been added in order to make possible to put the progress into std::cout instead
or in addition to the draw interpreter, instead of trigger option "-tclOutput".
- Treatment of Ctrl-Break signal has been added.
Now any operation can be aborted by Ctrl-C or Ctrl-Break keystroke.
Added new test case 'perf fclasses progr_par' for testing of parallel work of the progress.
Changes made for #31233 are reverted.
Correction in the ShapeFix_ComposeShell:
Modification of the method SplitByLine in order to find all points of the intersection for case when initial curve shifts in the positive or negative direction
to avoid splitting edge when split point lies in the limits of the tolerance of the vertex.
to correct shift of the pcurves for case when initial shift is more than 1 in the method ShapeFix_ComposeShell::SplitByLine
In the method ShapeFix_Face::FixMissingSeam added removing small edges having length less than working precision and removing wires having area less than working precision
Modified test cases; added test for related issue: bugs step bug31301
Method ShapeFix_Wire::FixNotchedEdges() is corrected to handle the case of closed notched edges: on such edges split parameter may fall to wrong end of the curve due to projection.
In class ShapeFix_ComposeShell the U- and V-closedness of input face is taken immediately avoiding the error when the face is small in any of these dimensions.
Test case for bug 0030831
- Fix FixSmallAreaWire for the reversed faces.
- Add nullptr check for FixOrient...
- Test bugs heal bug25923 is corrected to avoid relying on wrong orientation of face after fixing small wire
"endl" manipulator for Message_Messenger is renamed to "Message_EndLine".
The following entities from std namespace are now used
with std:: explicitly specified (from Standard_Stream.hxx):
std::istream,std::ostream,std::ofstream,std::ifstream,std::fstream,
std::filebuf,std::streambuf,std::streampos,std::ios,std::cout,std::cerr,
std::cin,std::endl,std::ends,std::flush,std::setw,std::setprecision,
std::hex,std::dec.
TopoDS_Shape::NbChildren() - new method has been introduced.
TopoDS_Shape.lxx, TopoDS_TShape.lxx - inline methods have been moved to hxx.
TopoDS_TShape_Flags has been redeclared as enumeration instead of preprocessor macros.
Cyclic dependency between headers TopoDS_Shape.hxx and TopoDS_TShape.hxx eliminated.
Places where TopoDS_Iterator is used only for calculation of number of sub-shapes are updated to use NbChildren() instead
Avoid splitting of wrong edge in ShapeFix_IntersectionTool.
Added protection for case when index of edge to be split is out of range.
Added test bugs heal bug29695
All occurrences of Standard_EXPORT attached to inline methods in OCCT code are eliminated.
Some unused classes and C++ files producing no code are deleted.
An extended draw-command trotate (ttranslate, tmirror, ...) by an additional parameter "-copy".
New check of edge range is added in BRepCheck/BRepCheck_Edge.cxx
The same checking is added in ShapeAnalysis_Edge.cxx
Fixing this problem is added in ShapeFix_Wire.cxx
GeomLib::SameRange(...) and BRepTools_TrsfModification::NewCurve2d(...) are modified to avoid exception in TrimmedCurve
Corrections: to use fixed shape as result in the non-manifold mode was made.
Regression was due to using modified initial shape as result in the previous version OCCT. At present initial shape is not modified during ShapeProcessing. Therefore modification to use fixed result was made.
Additionally using of nonManifold flag is added to ShapeProcessing.
1. Method Approx_ComputeLine::Perform is modified: now it contains also recursive calls after new line computation made by new method ApproxInt_MultiLine::MakeMLOneMorePoint.
2. New method MakeMLOneMorePoint is added to ApproxInt_MultiLine: it builds new sub-line as a part of main line with new point added into the middle of the longest interval between existing points.
3. Method ShapeConstruct_ProjectCurveOnSurface::ApproxPCurve is modified to avoid regressions: now it takes care of the set of initial points to be enough close to each other so that an interval between two adjacent points is less than half-period of the surface.
4. Modification in ShapeConstruct_ProjectCurveOnSurface: correction of pcurves of edges which extremities are in the singularities of surface.
The macros Status, Convex, Opposite, FillSolid (coming from X11 headers)
are now undefined in place of definition of methods with same name in OCCT headers.
The usage of variables with name Status is now avoided.
GL_GLEXT_LEGACY is now defined only if not already defined.
The macros AddPrinter (coming from WinAPI headers) is now undefined
within Message_Messenger class definition having method with the same name.
CurrentDirectory macro is now undefined in OSD_Process.hxx.
1. The static method Standard_Real MinStep3D(...) in the class BOPTools_AlgoTools is
now checks if the computed 3D step is too big (relatively UV range of the faces)
for any of the faces.
2. The method PointInFace(...) of the class BOPTools_AlgoTools3D has been redesigned.
The new PointInFace(...) methods have been implemented to add possibility for looking the point
inside the face in necessary direction and distance from the edge of the face.
Note: old implementation is also functional.
3. Make methods for finding points near edges and computing normal directions on faces
return error status (0 in case of success).
4. Test case for the issue.
5. Test cases offset shape_type_i_c XJ2,XJ4,XJ5,XJ6 are improvements.
Removing useless file
Added option ShapeFix_Solid::FixShellOrientationMode allowing to switch off analysis and fixing of orientations of shell(s) in solid.
Options FixVertexToleranceMode, FixShellOrientationMode, FixFaceOrientationMode are added to Shepe Processing resource file so that they can be manipulated.
Macro NO_CXX_EXCEPTION was removed from code.
Method Raise() was replaced by explicit throw statement.
Method Standard_Failure::Caught() was replaced by normal C++mechanism of exception transfer.
Method Standard_Failure::Caught() is deprecated now.
Eliminated empty constructors.
Updated samples.
Eliminate empty method ChangeValue from NCollection_Map class.
Removed not operable methods from NCollection classes.
1. There has been implemented calculation of all possible types of continuity for shared edges:
* G1 is set if tangential planes are the same for connected faces in each control points through the edge;
* C1 is set in addition to G1 conditions if derivatives, orthogonal to the edge on each face, are equal vectors;
* G2 is set in addition to G1 if the centers of principal curvatures are the same for connected faces in each control points through the edge;
* C2 is set in addition to C1 and G2 if directions of principal curvatures are equal;
* CN continuity is set only if both connected faces are based on elementary surfaces (the conditions for this case are similar to C2 continuity).
2. ShapeFix::EncodeRegularity() is merged into BRepLib::EncodeRegularity().
3. Implemented several test cases to check correct handling of regularity.
4. Fix incorrect usage of BRepLib::EncodeRegularity() in BRepBuilderAPI_Sewing.
5. Implement a method for calculation of regularity on the given list of edges.
6. Documentation updates
Class ShapeAnalysis::Surface is initialized by transformed surface in the method
ShapeFix_Edge::FixAddPCurve (const TopoDS_Edge& edge,const TopoDS_Face& face, const Standard_Boolean isSeam, const Standard_Real prec) in the case when face has location.