mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
0030145: Modeling Algorithms - Boolean Operations on open solids
Provide possibility to perform Boolean operations on open solids. Implementation of the new method *BOPAlgo_Builder::BuildBOP* performing the construction of the result shape for the given type of Boolean operation. This approach does not rely on the splits of solid to be correct and looks for the faces with necessary state relatively opposite solids to build the result solid. The call to this method is performed from BOP algorithm in case there were open solids in the arguments. Implementation of the draw command *buildbop* performing a call to the method above.
This commit is contained in:
@@ -1891,6 +1891,21 @@ The input data for this step is as follows:
|
||||
| 2.3 | Build solids <i>(SDi)</i> from *SFS*. | *BOPAlgo_BuilderSolid* |
|
||||
| 2.4 | Add the solids <i>(SDi)</i> to the result | |
|
||||
|
||||
@subsection occt_algorithms_bop_on_opensolids Boolean operations on open solids
|
||||
|
||||
The Boolean operations on open solids are tricky enough that the standard approach of Boolean operations for building the result, based on the splits of solids does not work.
|
||||
It happens because the algorithm for splitting solids (*BOPAlgo_BuilderSolid*) always tries to create the closed loops (shells) and make solids from them. But if the input solid is not closed, what can be expected from its splits?
|
||||
For performing Boolean Operations on open solids another approach is used, which does not rely on the splits of the solids to be correct, but tries to select the splits of faces, which are necessary for the given type of operation.
|
||||
The point here is that the type of Boolean operation clearly defines the states for the faces to be taken into result:
|
||||
- For **COMMON** operation all the faces from the arguments located inside any solid of the opposite group must be taken;
|
||||
- For **FUSE** operation all the faces from the arguments located outside of all solids of the opposite group must be taken;
|
||||
- For **CUT** operation all the faces from the Objects located outside of all solids of the Tools and all faces from the Tools located inside any solid of the Objects must be taken;
|
||||
- For **CUT21** operation all the faces from the Objects located inside any solid of the Tools and all faces from the Tools located outside of all solids of the Objects must be taken.
|
||||
From the selected faces the result solids are built. Please note, that the result may contain as normal (closed) solids as the open ones.
|
||||
|
||||
Even with this approach, the correct result of Boolean operation on open solids cannot be always guaranteed.
|
||||
This is explained by non-manifold nature of open solids: in some cases classification of a face depends on the point of the face chosen for classification.
|
||||
|
||||
@section occt_algorithms_10a Section Algorithm
|
||||
|
||||
@subsection occt_algorithms_10a_1 Arguments
|
||||
|
Reference in New Issue
Block a user