1 -- Created on: 2012-06-01
2 -- Created by: Eugeny MALTCHIKOV
3 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
5 -- The content of this file is subject to the Open CASCADE Technology Public
6 -- License Version 6.5 (the "License"). You may not use the content of this file
7 -- except in compliance with the License. Please obtain a copy of the License
8 -- at http://www.opencascade.org and read it completely before using this file.
10 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
11 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13 -- The Original Code and all software distributed under the License is
14 -- distributed on an "AS IS" basis, without warranty of any kind, and the
15 -- Initial Developer hereby disclaims all such warranties, including without
16 -- limitation, any warranties of merchantability, fitness for a particular
17 -- purpose or non-infringement. Please see the License for the specific terms
18 -- and conditions governing the rights and limitations under the License.
20 class Builder from BRepFeat
21 inherits BOP from BOPAlgo
23 ---Purpose: Provides a basic tool to implement features topological
24 -- operations. The main goal of the algorithm is to perform
25 -- the result of the operation according to the
26 -- kept parts of the tool.
28 -- b) The kept parts of the tool;
29 -- If the map of the kept parts of the tool
30 -- is not filled boolean operation of the
31 -- given type will be performed;
32 -- c) Operation required.
33 -- Steps: a) Fill myShapes, myRemoved maps;
34 -- b) Rebuild edges and faces;
35 -- c) Build images of the object;
36 -- d) Build the result of the operation.
37 -- Result: Result shape of the operation required.
42 ListOfShape from TopTools,
43 MapOfOrientedShape from BOPCol,
44 MapOfShape from BOPCol,
45 IndexedMapOfShape from BOPCol,
46 DataMapOfShapeListOfShape from BOPCol,
47 DataMapOfShapeShape from BOPCol,
48 BaseAllocator from BOPCol,
49 ListOfShape from BOPCol,
54 returns Builder from BRepFeat;
55 ---C++: alias "Standard_EXPORT virtual ~BRepFeat_Builder();"
59 ---Purpose: Clears internal fields and arguments.
62 theShape : Shape from TopoDS);
63 ---Purpose: Initialyzes the object of local boolean operation.
67 theShape : Shape from TopoDS;
68 theTool : Shape from TopoDS);
69 ---Purpose: Initialyzes the arguments of local boolean operation.
73 theFuse : Integer from Standard);
74 ---Purpose: Sets the operation of local boolean operation.
75 -- If theFuse = 0 than the operation is CUT, otherwise FUSE.
78 theFuse : Integer from Standard;
79 theFlag : Boolean from Standard);
80 ---Purpose: Sets the operation of local boolean operation.
81 -- If theFlag = TRUE it means that no selection of parts
82 -- of the tool is needed, t.e. no second part. In that case
83 -- if theFuse = 0 than operation is COMMON, otherwise CUT21.
84 -- If theFlag = FALSE SetOperation(theFuse) function is called.
87 is redefined protected;
88 ---Purpose: Prepares builder of local operation.
92 theLT : out ListOfShape from TopTools);
93 ---Purpose: Collects parts of the tool.
96 theIm : ListOfShape from TopTools);
97 ---Purpose: Initialyzes parts of the tool for second step of algorithm.
98 -- Collects shapes and all sub-shapes into myShapes map.
101 theS : Shape from TopoDS);
102 ---Purpose: Adds shape theS and all its sub-shapes into myShapes map.
105 PerformResult(me:out);
106 ---Purpose: Main function to build the result of the
107 -- local operation required.
109 RebuildFaces(me:out);
110 ---Purpose: Rebuilds faces in accordance with the kept parts of the tool.
114 theE:Shape from TopoDS;
115 theF:Face from TopoDS;
116 theME:MapOfShape from BOPCol;
117 aLEIm:out ListOfShape from BOPCol);
118 ---Purpose: Rebuilds edges in accordance with the kept parts of the tool.
121 CheckSolidImages(me:out);
122 ---Purpose: Collects the images of the object, that contains in
123 -- the images of the tool.
126 ---Purpose: Collects the removed parts of the tool into myRemoved map.
130 theS : Shape from TopoDS;
131 theM : in out MapOfShape from BOPCol);
132 ---Purpose: Adds the shape S and its sub-shapes into myRemoved map.
135 FillIn3DParts(me:out;
136 theInParts:out DataMapOfShapeListOfShape from BOPCol;
137 theDraftSolids:out DataMapOfShapeShape from BOPCol;
138 theAllocator:BaseAllocator from BOPCol)
139 is redefined protected;
140 ---Purpose: Function is redefined to avoid the usage of removed faces.
144 myShapes : MapOfShape from BOPCol is protected;
145 myRemoved : MapOfShape from BOPCol is protected;
146 myFuse : Integer from Standard is protected;