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 -- c) Operation required.
30 -- Steps: a) Fill myShapes, myRemoved maps;
31 -- b) Rebuild edges and faces;
32 -- c) Build images of the object;
33 -- d) Build the result of the operation.
34 -- Result: Result shape of the operation required.
39 ListOfShape from TopTools,
40 MapOfOrientedShape from BOPCol,
41 MapOfShape from BOPCol,
42 IndexedMapOfShape from BOPCol,
43 DataMapOfShapeListOfShape from BOPCol,
44 DataMapOfShapeShape from BOPCol,
45 BaseAllocator from BOPCol,
46 ListOfShape from BOPCol,
51 returns Builder from BRepFeat;
52 ---C++: alias "Standard_EXPORT virtual ~BRepFeat_Builder();"
56 ---Purpose: Clears internal fields and arguments.
59 theShape : Shape from TopoDS);
60 ---Purpose: Initialyzes the object of local boolean operation.
64 theShape : Shape from TopoDS;
65 theTool : Shape from TopoDS);
66 ---Purpose: Initialyzes the arguments of local boolean operation.
70 theFuse : Integer from Standard);
71 ---Purpose: Sets the operation of local boolean operation.
72 -- If theFuse = 0 than the operation is CUT, otherwise FUSE.
75 theFuse : Integer from Standard;
76 theFlag : Boolean from Standard);
77 ---Purpose: Sets the operation of local boolean operation.
78 -- If theFlag = TRUE it means that no selection of parts
79 -- of the tool is needed, t.e. no second part. In that case
80 -- if theFuse = 0 than operation is COMMON, otherwise CUT21.
81 -- If theFlag = FALSE SetOperation(theFuse) function is called.
84 is redefined protected;
85 ---Purpose: Prepares builder of local operation.
89 theLT : out ListOfShape from TopTools);
90 ---Purpose: Collects parts of the tool.
93 theIm : ListOfShape from TopTools);
94 ---Purpose: Initialyzes parts of the tool for second step of algorithm.
95 -- Collects shapes and all sub-shapes into myShapes map.
98 theS : Shape from TopoDS);
99 ---Purpose: Adds shape theS and all its sub-shapes into myShapes map.
102 PerformResult(me:out);
103 ---Purpose: Main function to build the result of the
104 -- local operation required.
106 RebuildFaces(me:out);
107 ---Purpose: Rebuilds faces in accordance with the kept parts of the tool.
111 theE:Shape from TopoDS;
112 theF:Face from TopoDS;
113 theME:MapOfShape from BOPCol;
114 aLEIm:out ListOfShape from BOPCol);
115 ---Purpose: Rebuilds edges in accordance with the kept parts of the tool.
118 CheckSolidImages(me:out);
119 ---Purpose: Collects the images of the object, that contains in
120 -- the images of the tool.
123 ---Purpose: Collects the removed parts of the tool into myRemoved map.
127 theS : Shape from TopoDS;
128 theM : in out MapOfShape from BOPCol);
129 ---Purpose: Adds the shape S and its sub-shapes into myRemoved map.
132 FillIn3DParts(me:out;
133 theInParts:out DataMapOfShapeListOfShape from BOPCol;
134 theDraftSolids:out DataMapOfShapeShape from BOPCol;
135 theAllocator:BaseAllocator from BOPCol)
136 is redefined protected;
137 ---Purpose: Function is redefined to avoid the usage of removed faces.
141 myShapes : MapOfShape from BOPCol is protected;
142 myRemoved : MapOfShape from BOPCol is protected;
143 myFuse : Integer from Standard is protected;