1 -- Created on: 2012-06-01
2 -- Created by: Eugeny MALTCHIKOV
3 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
5 -- This file is part of Open CASCADE Technology software library.
7 -- This library is free software; you can redistribute it and / or modify it
8 -- under the terms of the GNU Lesser General Public version 2.1 as published
9 -- by the Free Software Foundation, with special exception defined in the file
10 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 -- distribution for complete text of the license and disclaimer of any warranty.
13 -- Alternatively, this file may be used under the terms of Open CASCADE
14 -- commercial license or contractual agreement.
16 class Builder from BRepFeat
17 inherits BOP from BOPAlgo
19 ---Purpose: Provides a basic tool to implement features topological
20 -- operations. The main goal of the algorithm is to perform
21 -- the result of the operation according to the
22 -- kept parts of the tool.
24 -- b) The kept parts of the tool;
25 -- If the map of the kept parts of the tool
26 -- is not filled boolean operation of the
27 -- given type will be performed;
28 -- c) Operation required.
29 -- Steps: a) Fill myShapes, myRemoved maps;
30 -- b) Rebuild edges and faces;
31 -- c) Build images of the object;
32 -- d) Build the result of the operation.
33 -- Result: Result shape of the operation required.
38 ListOfShape from TopTools,
39 MapOfOrientedShape from BOPCol,
40 MapOfShape from BOPCol,
41 IndexedMapOfShape from BOPCol,
42 DataMapOfShapeListOfShape from BOPCol,
43 DataMapOfShapeShape from BOPCol,
44 BaseAllocator from BOPCol,
45 ListOfShape from BOPCol,
50 returns Builder from BRepFeat;
51 ---C++: alias "Standard_EXPORT virtual ~BRepFeat_Builder();"
55 ---Purpose: Clears internal fields and arguments.
58 theShape : Shape from TopoDS);
59 ---Purpose: Initialyzes the object of local boolean operation.
63 theShape : Shape from TopoDS;
64 theTool : Shape from TopoDS);
65 ---Purpose: Initialyzes the arguments of local boolean operation.
69 theFuse : Integer from Standard);
70 ---Purpose: Sets the operation of local boolean operation.
71 -- If theFuse = 0 than the operation is CUT, otherwise FUSE.
74 theFuse : Integer from Standard;
75 theFlag : Boolean from Standard);
76 ---Purpose: Sets the operation of local boolean operation.
77 -- If theFlag = TRUE it means that no selection of parts
78 -- of the tool is needed, t.e. no second part. In that case
79 -- if theFuse = 0 than operation is COMMON, otherwise CUT21.
80 -- If theFlag = FALSE SetOperation(theFuse) function is called.
83 is redefined protected;
84 ---Purpose: Prepares builder of local operation.
88 theLT : out ListOfShape from TopTools);
89 ---Purpose: Collects parts of the tool.
92 theIm : ListOfShape from TopTools);
93 ---Purpose: Initialyzes parts of the tool for second step of algorithm.
94 -- Collects shapes and all sub-shapes into myShapes map.
97 theS : Shape from TopoDS);
98 ---Purpose: Adds shape theS and all its sub-shapes into myShapes map.
101 PerformResult(me:out);
102 ---Purpose: Main function to build the result of the
103 -- local operation required.
105 RebuildFaces(me:out);
106 ---Purpose: Rebuilds faces in accordance with the kept parts of the tool.
110 theE:Shape from TopoDS;
111 theF:Face from TopoDS;
112 theME:MapOfShape from BOPCol;
113 aLEIm:out ListOfShape from BOPCol);
114 ---Purpose: Rebuilds edges in accordance with the kept parts of the tool.
117 CheckSolidImages(me:out);
118 ---Purpose: Collects the images of the object, that contains in
119 -- the images of the tool.
122 ---Purpose: Collects the removed parts of the tool into myRemoved map.
126 theS : Shape from TopoDS;
127 theM : in out MapOfShape from BOPCol);
128 ---Purpose: Adds the shape S and its sub-shapes into myRemoved map.
131 FillIn3DParts(me:out;
132 theInParts:out DataMapOfShapeListOfShape from BOPCol;
133 theDraftSolids:out DataMapOfShapeShape from BOPCol;
134 theAllocator:BaseAllocator from BOPCol)
135 is redefined protected;
136 ---Purpose: Function is redefined to avoid the usage of removed faces.
140 myShapes : MapOfShape from BOPCol is protected;
141 myRemoved : MapOfShape from BOPCol is protected;
142 myFuse : Integer from Standard is protected;