mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-07 18:30:55 +03:00
10 Commits
Author | SHA1 | Message | Date | |
---|---|---|---|---|
|
948fe6ca88 |
0028747: Incorrect result of the section operation after edge refinement
Implementation of the method for simplification of the result of Boolean Operation on the API level. The method BRepAlgoAPI_BuilderAlgo::SimplifyResult has been added, so the derived classes such as BooleanOpeation and Splitter can also use this method. The result shape simplification should be called after the operation is done. The simplification is performed by the means of ShapeUpgrade_UnifySameDomain algorithm. Draw command "bsimplify" has been added to control the simplification options. Documentation for new functionality and draw commands controlling the options of Boolean operations. Test cases for the new functionality. Side-effect change: The algorithms in Boolean component have been changed to use the BRepTools_History as a History tool. Now it became possible to disable the collection of shapes modifications during Boolean Operations, which may be useful for performance sake (in draw the option is controlled by *setfillhistory* command). Draw command "unifysamedom" has been changed to accept the angular tolerance in degrees instead of radians. |
||
|
944768d277 |
0029312: Using OBB to speed up Boolean Operations
1. Implementation of the user-defined option for usage of Oriented Bounding Boxes (OBB) in Boolean Operations for additional filtering (rejection) of selected for intersection pairs of sub-shapes. By default the usage of OBB is turned off. To enable/disable its usage the method SetUseOBB(flag) should be used. This method is available for all operations in Boolean Component. To enable/disable it in draw the command "buseobb 0/1" should be used. Note, that this will affect all subsequent operations. The OBB for the shapes are built by first necessity and stored into operation context (IntTools_Context). 2. Usage of the OBB in some test cases. |
||
|
98b3765966 |
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. |
||
|
33ba856502 |
0028786: Refactoring of the Warning/Error reporting system of Boolean Operations Algorithm
0. Basic tools for defining classes representing alerts (errors, warnings etc.) and collecting them during execution of algorithms are added in Message package. 1. Refactoring of the Error/Warning reporting system of the algorithms in Boolean Component. To dump the description of the Error/Warning status of the algorithm the DumpErrors/DumpWarnings method should be called. Also, the methods GerErrorMsg(int Error) and GetWarningMsg(int Warning) have been implemented to get the description for the given Error/Warning. All Error/Warning statuses are now listed in the enumeration ErrorStatusEnum/WarningStatusEnum of the algorithm. It is also possible to get the shapes for which the warning has been set by using the method GetWarningShapes(). 2. The new class BOPAlgo_Options has been created to unify the options of the BOPAlgo_* and BRepAlgoAPI* algorithms. 3. The new checks across the algorithms have been added to detect and report errors and warnings. 4. Test cases boolean bopcut_complex B9 E1 E5 E8 boolean bopfuse_complex B4 B5 C9 D1 D4 D5 D6 D7 have been rewritten to use Cells Builder algorithm instead of Boolean Operations algorithm, because latter always returns error "Unsupported Boolean operation" for these cases. 5. New chapter has been added in the user guide for Boolean Operations - Error / Warning reporting system. 6. Added comment to NCollection_List::Remove(Iterator&) |
||
|
483ce1bd89 |
0027878: Development of the Gluing operations based on the new Boolean component
The Gluing operation is an additional option for the algorithms in the Boolean Component such as General Fuse, Boolean operations, Section operation, Maker Volume and Cells Builder algorithms. The Gluing options have been designed to speed up the computation of the interference among arguments of the operations on special cases, in which the arguments may be overlapping but do not have real intersections between their sub-shapes. This option cannot be used on the shapes having real intersections, like intersection vertex between edges, or intersection vertex between edge and a face or intersection line between faces. The Gluing option is an enumeration implemented in BOPAlgo_GlueEnum.hxx. There are following items in the enum: * BOPAlgo_GlueOff - default value for the algorithms, Gluing is switched off; * BOPAlgo_GlueShift - Glue option for shapes with partial coincidence; * BOPAlgo_GlueFull - Glue option for shapes with full coincidence. For setting the Gluing options for the algorithm it is just necessary to call the SetGlue(BOPAlgo_GlueEnum) method with appropriate Glue value. For using this option in DRAW the command bglue has been implemented: * 0 - default value, Gluing is off; * 1 - for partial coincidence; * 2 - for full coincidence Elimination of the warnings. |
||
|
dde6883382 |
0027772: Foundation Classes - define Standard_Boolean using C++ type "bool" instead of "unsigned int"
Code has been updated to remove no-op casts and implicit casts to Standard_Boolean. Places of inproper use of Standard_Boolean instead of Standard_Integer have been corrected: - Bnd_Box, Bnd_Box2d Bit flags are now defined as private enum - HLRAlgo_BiPoint, HLRAlgo_EdgesBlock, HLRBRep_EdgeData, HLRBRep_FaceData Bit flags are now defined as enum - HLRAlgo_EdgeStatus, HLRBRep_BiPnt2D, HLRBRep_BiPoint Bit flags are now defined as bool fields - HLRAlgo_PolyData Bit flags are now defined as Standard_Integer - OSD_DirectoryIterator, OSD_FileIterator Boolean flag is now defined as Standard_Boolean - ShapeAnalysis_Surface::SurfaceNewton() now returns Standard_Integer (values 0, 1 or 3) - ChFi2d_FilletAlgo now uses TColStd_SequenceOfBoolean instead of TColStd_SequenceOfInteger for storing boolean flags Method IFSelect_Dispatch::PacketsCount() has been dropped from interface. ShapeFix_Solid::Status() has been fixed to decode requested status instead of returning integer value. TopOpeBRepBuild_Builder1 now defines map storing Standard_Boolean values instead of Standard_Integer. Persistence for Standard_Boolean type has been corrected to keep backward compatibility: - BinMDataStd, BinTools, FSD_BinaryFile Broken Draw Harness commands vdisplaymode and verasemode have been removed. BRepMesh_FastDiscretFace::initDataStructure() - workaround old gcc limitations BRepMesh_IncrementalMesh::clear() - avoid ambiguity |
||
|
3510db6201 |
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 |
||
|
42cf5bc1ca |
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 |
||
|
43cb001124 |
0025700: Ensuring uniform control of the functionalities of the Boolean operations algorithm at the level of DRAW application
Changes: 1. Class BOPTest_Chronometer The class definition that depends on TBB has been removed 2. For the following commands: >bop s1 s2 [tol] >bopcommon r s1 s2 [tol] >bfuse r s1 s2 [tol] >bcut s1 s2 [tol] >btuc r s1 s2 [tol] >bsection r s1 s2 [-n2d/-n2d1/-n2d2] [-na] [tol] >mkvolume r b1 b2 ... [-c] [-ni] [-s] [tol] >bopcheck Shape [level of check: 0 - 9] [-t -s] [-tol tol] >bopargcheck Shape1 [[Shape2] [-F/O/C/T/S/U] [/R|F|T|V|E|I|P|C|S]] [#BF] [-tol tol] >bfillds [-s -t] [tol] the syntax has been changed. Parameter [tol] has been removed. The value "tol" (i.e. Fuzzy Value) is option for the algorithm. If it is necessary, the value "tol" can be set by the command: >bfuzzyvalue value see http://tracker.dev.opencascade.org/view.php?id=25614 for more details 3. For the following commands: >bopcheck Shape [level of check: 0 - 9] [-t -s] [-tol tol] >bfillds [-s -t] [tol] >bbuild r [-s -t] >bbop r op [-s -t] the syntax has been changed. Parameter [-s] has been removed. Parameter [-s] was to provide the sequential mode of the computations. The mode of the computations is option for the algorithm. The mode of the computations can be set by the command: >brunparallel [0/1] 1 -sets the parallel mode of the computations 0 -sets the sequential mode of the computations see http://tracker.dev.opencascade.org/view.php?id=25614 for more details |
||
|
49b0c452e2 |
0025614: Provide API access to the new fuctionalities of Boolean Components
I. New features: 1.1. class BOPAlgo_PaveFiller method: void BOPAlgo_PaveFiller::SetArguments(const TopTools_ListOfShape& theLS) has been added to provide the setting argumemts through TopTools_ListOfShape 1.2. class BOPAlgo_Builder method: void BOPAlgo_Builder::SetArguments(const TopTools_ListOfShape& theLS) has been added to provide the setting argumemts through TopTools_ListOfShape 1.3. class BOPAlgo_BOP method: void BOPAlgo_BOP::SetTools(const TopTools_ListOfShape& theLS) has been added to provide the setting tools through TopTools_ListOfShape 1.4. class BRepAlgoAPI_BuilderAlgo construcror: BRepAlgoAPI_BuilderAlgo::BRepAlgoAPI_BuilderAlgo (const BOPAlgo_PaveFiller& aPF) has been added to provide the construction of the object using BOPAlgo_PaveFiller object method: void BRepAlgoAPI_BuilderAlgo::SetArguments (const TopTools_ListOfShape& theLS) has been added to provide the setting argumemts method: const TopTools_ListOfShape& BRepAlgoAPI_BuilderAlgo::Arguments()const has been added to provide access to the argumemts 1.5. class BRepAlgoAPI_BooleanOperation method: void BRepAlgoAPI_BooleanOperation::SetTools (const TopTools_ListOfShape& theLS) has been added to provide the setting tools method: const TopTools_ListOfShape& BRepAlgoAPI_BooleanOperation::Tools()const has been added to provide access to the tools 1.6. class BRepAlgoAPI_Common construcror: BRepAlgoAPI_Common::BRepAlgoAPI_Common (const BOPAlgo_PaveFiller& aPF) has been added to provide the construction of the object using BOPAlgo_PaveFiller object 1.7. class BRepAlgoAPI_Cut construcror: BRepAlgoAPI_Cut::BRepAlgoAPI_Cut (const BOPAlgo_PaveFiller& aPF) has been added to provide the construction of the object using BOPAlgo_PaveFiller object 1.8. class BRepAlgoAPI_Fuse construcror: BRepAlgoAPI_Fuse::BRepAlgoAPI_Fuse (const BOPAlgo_PaveFiller& aPF) has been added to provide the construction of the object using BOPAlgo_PaveFiller object 1.9. class BRepAlgoAPI_Section construcror: BRepAlgoAPI_Section::BRepAlgoAPI_Section (const BOPAlgo_PaveFiller& aPF) has been added to provide the construction of the object using BOPAlgo_PaveFiller object 1.10. class BOPTest method: void BOPTest::APICommands(Draw_Interpretor& theCommands) has been added to provide tcl commands to launch the algorithms implemented in BRepAlgoAPI package using DRAWEXE application. Commands: >bapibuild r performs General Fuse algorithm. r -the result of the operation >bapibop r type performs Boolean Operation agorithm r -the result of the operation type -type of the operation: 0-common 1-fuse 2-cut 3-cut21 4-section method: void BOPTest::OptionCommands(Draw_Interpretor& theCommands) has been added to provide tcl commands to set/get the options that is necessary for the algorithms implemented in BRepAlgoAPI package. Commands: >boptions dump the state of current options >brunparallel [0/1] 1 -sets the parallel mode of the computations 0 -sets the sequential mode of the computations >bfuzzyvalue value sets the fuzzy value ------------------------------------------------------------------------------------------------------------- II. Changes: II.1. class BRepAlgoAPI_BuilderAlgo methods: const TopTools_ListOfShape& BRepAlgoAPI_BuilderAlgo::Generated (const TopoDS_Shape& aS) const TopTools_ListOfShape& BRepAlgoAPI_BuilderAlgo::Modified (const TopoDS_Shape& aS) Standard_Boolean BRepAlgoAPI_BuilderAlgo::IsDeleted (const TopoDS_Shape& aS) Standard_Boolean BRepAlgoAPI_BuilderAlgo::HasModified() const Standard_Boolean BRepAlgoAPI_BuilderAlgo::HasGenerated() const Standard_Boolean BRepAlgoAPI_BuilderAlgo::HasDeleted() const has been redefined to provide access to the history II.1. class BOPTest method: void BOPTest::APICommands(Draw_Interpretor& theCommands) has been added to provide tcl commands to launch the algorithms implemented in BRepAlgoAPI package using DRAWEXE application. method: void BOPTest::OptionCommands(Draw_Interpretor& theCommands) has been added to provide tcl commands to set/get the options that is necessary for the algorithms implemented in BRepAlgoAPI package. II.2. class BRepAlgoAPI method: void BRepAlgoAPI::DumpOper(const Standard_CString theFilePath, const TopoDS_Shape& theShape1, const TopoDS_Shape& theShape2, const TopoDS_Shape& theResult, BOPAlgo_Operation theOperation, Standard_Boolean isNonValidArgs) has been removed. The contents has been shifted into the file: BRepAlgoAPI_BooleanOperation.cxx II.3. classes QANewModTopOpe_Glue, QANewModTopOpe_Intersection the modifications have been done to provide the consistency with the modifications in BRepAlgoAPI package [I]. ------------------------------------------------------------------------------------------------------------- III. Modified entities: packages: BOPAlgo BRepAlgoAPI BOPTest QANewModTopOpe Test cases for issue CR25614 |