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()
0028966: Coding Rules - remove Adaptor2d_HCurve2d, Adaptor3d_HCurve and Adaptor3d_HSurface classes 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.
0029843: Modeling Algorithms - Boolean FUSE produces incorrect result When splitting the shell/face with internal faces/edges use the 'internal' criteria of the face to choose the way to create loops. Side effect changes: - When performing Boolean operation - move the objects located far from Origin to the Origin to increase the accuracy of intersections.
0030618: Modeling Algorithms, BOPTools_Parallel - avoid using map for thread-local contexts without TBB OSD_Parallel::ToUseOcctThreads() - new flag allowing to use OCCT threads implementation even when compiled with TBB (for testing). Added new command dparallel for managing default Thread Pool. OSD_Parallel::For() now avoid creation of universal iterator in simplest case. BOPTools_Parallel - eliminated redundant typedefs/explicit instantiations of templates. Added functor using array of per-thread context instead of a map.
0025609: Clean up the duplicate classes in TKBO project 1. The package BOPCol has been fully removed: - *BOPCol_BaseAllocator* is replaced with *Handle(NCollection_BaseAllocator)*; - *BOPCol_BoxBndTree* is replaced with *BOPTools_BoxBndTree*; - *BOPCol_Box2DBndTree* is removed as unused; - *BOPCol_DataMapOfIntegerInteger* is replaced with *TColStd_DataMapOfIntegerInteger*; - *BOPCol_DataMapOfIntegerListOfInteger* is replaced with *TColStd_DataMapOfIntegerListOfInteger*; - *BOPCol_DataMapOfIntegerListOfShape* is replaced with *TopTools_DataMapOfIntegerListOfShape*; - *BOPCol_DataMapOfIntegerMapOfInteger.hxx* is removed as unused; - *BOPCol_DataMapOfIntegerReal* is replaced with *TColStd_DataMapOfIntegerReal*; - *BOPCol_DataMapOfIntegerShape* is replaced with *TopTools_DataMapOfIntegerShape*; - *BOPCol_DataMapOfShapeBox* is replaced with *TopTools_DataMapOfShapeBox*; - *BOPCol_DataMapOfShapeInteger* is replaced with *TopTools_DataMapOfShapeInteger*; - *BOPCol_DataMapOfShapeListOfShape* is replaced with *TopTools_DataMapOfShapeListOfShape*; - *BOPCol_DataMapOfShapeReal* is replaced with *TopTools_DataMapOfShapeReal*; - *BOPCol_DataMapOfShapeShape* is replaced with *TopTools_DataMapOfShapeShape*; - *BOPCol_DataMapOfTransientAddress* is removed as unused; - *BOPCol_IndexedDataMapOfIntegerListOfInteger* is removed as unused; - *BOPCol_IndexedDataMapOfShapeBox* is removed as unused; - *BOPCol_IndexedDataMapOfShapeInteger* is removed as unused; - *BOPCol_IndexedDataMapOfShapeListOfShape* is replaced with *TopTools_IndexedDataMapOfShapeListOfShape*; - *BOPCol_IndexedDataMapOfShapeReal* is removed as unused; - *BOPCol_IndexedDataMapOfShapeShape* is replaced with *TopTools_IndexedDataMapOfShapeShape*; - *BOPCol_IndexedMapOfInteger* is replaced with *TColStd_IndexedMapOfInteger*; - *BOPCol_IndexedMapOfOrientedShape* is replaced with *TopTools_IndexedMapOfOrientedShape*; - *BOPCol_IndexedMapOfShape* is replaced with *TopTools_IndexedMapOfShape*; - *BOPCol_ListOfInteger* is replaced with *TColStd_ListOfInteger*; - *BOPCol_ListOfListOfShape* is replaced with *TopTools_ListOfListOfShape*; - *BOPCol_ListOfShape* is replaced with *TopTools_ListOfShape*; - *BOPCol_MapOfInteger* is replaced with *TColStd_MapOfInteger*; - *BOPCol_MapOfOrientedShape* is replaced with *TopTools_MapOfOrientedShape*; - *BOPCol_MapOfShape* is replaced with *TopTools_MapOfShape*; - *BOPCol_PListOfInteger* is removed as unused; - *BOPCol_PInteger* is removed as unused - *BOPCol_SequenceOfPnt2d* is replaced with *TColgp_SequenceOfPnt2d*; - *BOPCol_SequenceOfReal* is replaced with *TColStd_SequenceOfReal*; - *BOPCol_SequenceOfShape* is replaced with *TopTools_SequenceOfShape*; - *BOPCol_Parallel* is replaced with *BOPTools_Parallel*; - *BOPCol_NCVector* is replaced with *NCollection_Vector*; 2. The class *BOPDS_PassKey* and containers for it have been removed as unused; 3. The unused containers from *IntTools* package have been removed: - *IntTools_DataMapOfShapeAddress* is removed as unused; - *IntTools_IndexedDataMapOfTransientAddress* is removed as unused; 4. The container *BiTgte_DataMapOfShapeBox* is replaced with *TopTools_DataMapOfShapeBox*; 5. The class *BOPTools* has been removed as duplicate of the class *TopExp*;
0029237: Improve performance of Boolean Operations In order to improve performance of Boolean Operations on the relatively fast cases the following improvements have been made: 1. Initialization of the FaceInfo information for the faces participating in Face/Face interference, even when the gluing is ON, to take into account intersection of their sub-shapes. 2. Code simplification & duplication removal - the methods BOPAlgo_ShellSplitter::MakeConnexityBlocks and BOPAlgo_WireSplitter::MakeConnexityBlocks have been unified into BOPTools_AlgoTools::MakeConnexityBlocks. 3. Avoid unnecessary bounding box computation for solids during DS initialization. The bounding boxes for solids will be computed during the building stage to find faces located inside solids. For the shape self-interference check (performed by the BOPAlgo_CheckerSI), the bounding box is still computed, as it is necessary to resolve Shape/Solid intersections. 4. Use only three sample points to check coincidence of line and plane. 5. Perform necessity of planes intersection only when the gluing is off. 6. Avoid repeated initialization of 2D classifier while building splits of the faces. 7. Post treat stage: 7.1. Method CorrectWires: Save edge's data (PCurve, parameter of the vertex, range) to avoid its recalculation. 7.2. Method CheckEdge: While checking vertices on edges avoid unnecessary calculation of their location. 8. Provide possibility to disable the classification of the input solids on the inverted status (to be the holes in the space). 9. Avoid building of bounding boxes for faces/solids during splitting of the input arguments for their classification relatively hole faces/shells if there are no holes created. 10. Avoid rebuilding of the faces/solids from arguments which does not acquire any inside parts from other arguments during the operation by using their draft versions as their splits. Test cases for the issue. Correction of the test cases boolean gdml_public A9 and bugs modalg_7 bug28485 as they are improvements. Additional test case for the issue #28485 as it is fixed by the current changes.
0028017: Unexpected result of General Fuse operation Several improvements have been made in BO code to fix the bug: - Create empty edge-edge interference if intersection is close to an end vertex. This will help to avoid creation of unnecessary edge-face intersections. - Improve PutPaveOnCurve() method to join nearly located vertices when they are put on the same section curve. - Add processing of same-domain vertices for section edges in UpdatePaveBlocks() method. - Improve the method CorrectWires() in order to not increase vertex tolerance if it will cover the major part of an edge. - Replace vertices of section edges by same-domain equivalents. - In the algorithm BOPAlgo_WireSplitter, correct angles computation and evaluation, taking into account periodicity. - Modify PostTreatFF to properly take into account the orientations of coinciding section edges. - In IntTools_Context::ComputePE, check distance from the point to vertices of the edge if the projection to the curve is failure. Tests update: - test offset\faces_type_i\C9 has been updated; now instead of returning bad shape it returns null result. Notes for porting: - Modify BopAlgo_PaveFiller so that on output each interference refers to the new vertex that will hit in the result (same-domain of the initial new vertex). - Make the method BOPDS_DS::Index() returning valid index for new shapes. // eliminate compile warning on VC14
0026738: Make Boolean operations safely treating arguments when running with fuzzy option When fuzzy option is in force prevent increasing tolerance of input shapes. Instead pass increased by fuzzy value the tolerances of sub-shapes everywhere where it is needed by intersection algorithms. The following changes in API have been made: - The methods SetFuzzyValue and FuzzyValue have been moved from the classes BOPAlgo_ArgumentAnalyzer, BOPAlgo_Builder, and BOPAlgo_PaveFiller to the base class BOPAlgo_Algo. - The public method BOPDS_DS::VerticesOnIn has been renamed to SubShapesOnIn, and the new output parameter theCommonPB has been added. - In BOPTools_AlgoTools, a new argument "theFuzzyValue" has been added in the methods ComputeVV and AreFacesSameDomain. - In IntTools_Context, a new argument "theFuzzyValue" has been added in the methods ComputeVE and ComputeVF. - The methods SetFuzzyValue and FuzzyValue have been added in the classes IntTools_EdgeEdge, IntTools_FaceFace. - In the class IntTools_EdgeFace, the methods SetTolE, SetTolF, TolE, TolF have been removed, and the methods SetFuzzyValue, FuzzyValue have been added. - The new argument "theTol" has been added in the method IntTools_WLineTool::DecompositionOfWLine. Some improvements in algorithms have been made during fighting with regressions: - Correct initialization of pave blocks for degenerated edges. - In BOPAlgo_PaveFiller::MakeBlocks(), filter out paves on intersection curve that were put on the curve accidentally due to wide range of E-F intersection vertex. - In the method IntTools_Tools::ComputeTolerance the margin added to the computed tolerance has been increased up to 0.001%. - The method BOPAlgo_PaveFiller::PutPaveOnCurve has been corrected in order to use the original vertex tolerance instead of the value increased during putting it on other curves. - The new method BOPDS_PaveBlock::RemoveExtPave has been added. - The vertex tolerance computation in BOPTools_AlgoTools::CorrectCurveOnSurface has been improved, taking into account intersection segments between p-curves (to avoid regression on "bugs modalg_6 bug22794"). - Improve IsExistingPaveBlock to make more stable catching of coincidence of common block with section curve (against regression "bugs modalg_4 bug697_2" on Linux). Test case for the bug has been added. The following test cases have been updated as improvements: boolean gdml_private ZH2 ZI7 ZJ7 boolean volumemaker C4 The test case bugs/modalg_4/pro19653 has been corrected to make it stable. See comment inside the script for details. The test case bugs/modalg_6/bug25880 has been corrected to suppress wrong bfuse commands. The test bugs/modalg_6/bug26954_3 has been corrected to compare the result with more precise reference value. The "faulty" TODO in boolean/volumemaker/A8 has been made actual for Linux as well. //Eliminate compilation error on Linux.
0026619: Tolerances of operands are modified using bop 0026796: The result of General Fuse operation is self-intersecting shape The fix forces creation of new sub-shapes (vertex, edge) when the tolerance of some sub-shape of an argument is to be increased. This new behavior is turned off by default. It can be turned on using two ways: 1) Setting 'locking' flag of the arguments. 2) Calling the method SetNonDestructive(Standard_True) of the API classes. Various bug fixes in the algorithm: - Compute correct tolerance values for intersections of type Line/Line, Line/Plane, Plane/Plane. - In case of Line/Plane intersection check if line's vertices lie on the plane. - Do not allow decreasing of the tolerance value of the Line/Line intersection vertex. - In IntTools_EdgeEdge, call the method FindParameters with proper 3D tolerance of the curve. - Force making copy of a degenerated edge if its vertex is touched but no 2D intersection with other curves is found. - Remove pave blocks both ends of which became referring to the same vertex after vertices substitution. - Avoid exception in IntTools_Context::IsVertexOnLine if Extrema is not done. - Reduce tolerance of vertex/edge using actual distances to interfered shapes if it was increased due to line/line, line/plane, or plane/plane small intersection angle. - Update tolerance of edges to reach all representations in a common block. - In V-E intersections, check if a vertex hits beyond shrunk range, in such case create V-V interference. - Do not put a section edge to the result if it becomes to be a micro edge after updating its vertex. - Correctly make vertices same-domain during the work of MakeBlocks. - Decrease shrunk range at least on a Precision::Confusion() in addition to vertex tolerance. - Add Confusion to bounding boxes of new shapes in DS - Add tolerance Precision::Confusion() to compare distances of touching cases to fix regressions. TODO marks have been removed from (or modified in) the following test cases (Improvements): boolean bsection M3 N2 R2 boolean gdml_private B6 C2 C6 G7 I6 F6 J1 J4 M7 N1 N8 N9 O3 O4 O6 O8 O9 P1 P2 P5 Q1 Q3 Q5 S9 T2 U4 U5 U9 ZB5 ZB6 ZC1 ZC5 ZD3 ZD6 ZD7 ZH2 ZH5 ZI2 ZI5 ZI7 ZI9 ZJ3 ZJ4 ZJ7 F8 I6 G1 boolean volumemaker A5 A6 B3 B4 B7 B9 D3 D4 D7 F1 boolean bopcut_2d D5 bugs modalg_5 bug25043 bugs modalg_2 bug472_1 bug472_2 bug472_3 Test cases updated because they are still bad but can be accepted as non-regression: boolean volumemaker C4 A3 A7 E6 bugs modalg_1 bug10232 boolean bsection N2 Put new TODO in the scripts: bugs modalg_5 bug25232_9 bugs modalg_6 bug26619 bugs modalg_1 buc60462_2 bugs modalg_4 bug772 For the following tests the result in fix became better, so take fix result as the reference: bugs modalg_5 bug24628 bugs modalg_6 bug26954_3 boolean volumemaker A4 B5 B6 C3 C8 D2 D5 F2 bugs modalg_2 bug472_2 bugs modalg_1 buc60776_1 - Add the method SetNonDestructive to API classes of user level
0024002: Overall code and build procedure refactoring -- automatic Automatic upgrade of OCCT code by command "occt_upgrade . -nocdl": - WOK-generated header files from inc and sources from drv are moved to src - CDL files removed - All packages are converted to nocdlpack
0024023: Revamp the OCCT Handle -- ambiguity Code corrected to avoid ambiguous situations due to changed implementation of Handle (overloaded methods accepting handles of different types). In Adaptor3d_CurveOnSurface added method Load() with two parameters, allowing to avoid ambiguity of cast of handles when calling separate methods Load() for curve and surface, replacing by single call. In DrawTrSurf and IGESData_IGESWriter, template variants of methods Set() and Send(), respectively, are added to avoid ambiguity when these methods are called with handles to derived types (using SFINAE). In NCollection_DefineHSequence, method Append() accepting handle to another HSequence is made template, to be available only if argument has compatible type.
0024023: Revamp the OCCT Handle -- downcast (automatic) Automatic update by command "occt_upgrade . -downcast" C-style cast of Handle to that of derived type (now illegal) is replaced by call to DownCast() Const reference local variables of Handle type initialized by result of DownCast are replaced by normal variables.
0024682: Move out B-spline cache from curves and surfaces to dedicated classes BSplCLib_Cache and BSplSLib_Cache 1. B-spline cache was moved into separated classes: BSplCLib_Cache for 2D and 3D curves and BSplSLib_Cache for surfaces. 2. The cache is used now in corresponding adaptor classes (Geom2dAdaptor_Curve, GeomAdaptor_Curve and GeomAdaptor_Surface) when the curve or surface is a B-spline. 3. Algorithms were changed to use adaptors for B-spline calculations instead of curves or surfaces. 4. Precised calculation of derivatives of surface of revolution is implemented for the points of surface placed on the axis of revolution (Geom_SurfaceOfRevolution.cxx) 5. Small modifications are made to adjust algorithms to new behavior of B-spline calculation. 6. Test cases were modified according to the modern behavior. 7. Changes in BOPAlgo_WireSplitter, BOPTools_AlgoTools, BRepLib_CheckCurveOnSurface and ShapeAnalysis_Wire to use adaptors instead of geometric entities 8. Allow Geom2dAdaptor and GeomAdaptor in case of offset curve to use corresponding adaptor for basis curve Modification of test-cases according to the new behavior.
0026098: The result of General Fuse operation is self-interfered shape class BOPTools_AlgoTools method static Standard_Real IntersectCurves2d(const gp_Pnt& aPV, const TopoDS_Face& aF, const Handle(Geom_Surface)& aS, const TopoDS_Edge& aE1, const TopoDS_Edge& aE2) Check the validity of the 2d intersection before applying the result. Test case for issue CR26098
0024646: Wrong result done by Boolean Operation algorithm 1. class BOPAlgo_PaveFiller method void BOPAlgo_PaveFiller::PerformEF() Do not create intersection vertices in case if it lies ON the boundary of the face. 2. class IntTools_Context New method Standard_Boolean IntTools_Context::IsPointInFace (const gp_Pnt& aP, const TopoDS_Face& aF, const Standard_Real aTol) has been implemented to check if the point IN the face. 3. class IntTools_EdgeFace method void IntTools_EdgeEdge::FindBestSolution(const Standard_Real aT11, const Standard_Real aT12, const Standard_Real aT21, const Standard_Real aT22, Standard_Real& aT1, Standard_Real& aT2) Treatment of the touching cases. Test cases for issue CR24646 Correction of test cases for issue CR24646
0024826: Wrapping of parallelisation algorithms Simple primitives to parallelize loops type "for" and "foreach" were implemented. The primitives encapsulates complete logic for creating and managing parallel context of loops. Moreover the primitives may be a wrapper for some primitives from 3rd-party library - TBB. To use it is necessary to implement TBB like interface which is based on functors. For example: Class Functor { public: void operator() ([proccesing instance]) const { //... } }; In the body of the operator () should be implemented thread-safe logic of computations that can be performed in parallel context. If parallelized loop iterates on the collections with direct access by index (such as Vector, Array), it is more efficient to use the primitive ParallelFor (because it has no critical section). All parts of OCC code which are using tbb were changed on new primitives. 0024826: Wrapping of parallelisation algorithms Small fix.
0025597: Invalid curve on surface in the result of General Fuse operation 1. The tool of computing the max distance between 3D curve and its 2d representation on the face has been moved from static methods in BOPTools_AlgoTools class to BRepLib_CheckCurveOnSurface class. 2. The tools has been applied to 2d curves built during Boolean Operation and to some intersection curves. 3. The functions Standard_Boolean BOPTools_AlgoTools::ComputeTolerance (const TopoDS_Face& theFace, const TopoDS_Edge& theEdge, Standard_Real& theMaxDist, Standard_Real& theMaxPar) and Standard_Boolean IntTools_Tools::ComputeTolerance (const Handle(Geom_Curve)& theCurve3D, const Handle(Geom2d_Curve)& theCurve2D, const Handle(Geom_Surface)& theSurf, const Standard_Real theFirst, const Standard_Real theLast, Standard_Real& theMaxDist, Standard_Real& theMaxPar) have been developed for easy access to BRepLib_CheckCurveOnSurface functionality. class IntTools_FaceFace method void IntTools_FaceFace::ComputeTolReached3d() Case for Plane/BSpline intersection added for treatment. Test case for issue CR25597 Fix for regression boolean bsection N7. class BOPAlgo_PaveFiller method void BOPAlgo_PaveFiller::UpdateFaceInfo (BOPDS_DataMapOfPaveBlockListOfPaveBlock& theDME, const BOPCol_DataMapOfIntegerInteger& theDMV) Updating Face Info information with new vertices created in PostTreatFF. Correction boolean/bsection/N2 Updated test cases.