b311480e |
1 | -- Created on: 1993-10-14 |
2 | -- Created by: Prestataire Mary FABIEN |
3 | -- Copyright (c) 1993-1999 Matra Datavision |
973c2be1 |
4 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | -- |
973c2be1 |
6 | -- This file is part of Open CASCADE Technology software library. |
b311480e |
7 | -- |
973c2be1 |
8 | -- This library is free software; you can redistribute it and / or modify it |
9 | -- under the terms of the GNU Lesser General Public version 2.1 as published |
10 | -- by the Free Software Foundation, with special exception defined in the file |
11 | -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
12 | -- distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
13 | -- |
973c2be1 |
14 | -- Alternatively, this file may be used under the terms of Open CASCADE |
15 | -- commercial license or contractual agreement. |
7fd59977 |
16 | |
17 | class BooleanOperations from BRepAlgo |
18 | |
19 | uses |
20 | |
21 | State from TopAbs, |
22 | Shape from TopoDS, |
23 | Face from TopoDS, |
24 | Edge from TopoDS, |
25 | MapOfShape from TopTools, |
26 | ListOfShape from TopTools, |
27 | HBuilder from TopOpeBRepBuild, |
28 | HDataStructure from TopOpeBRepDS, |
29 | DSAccess from BRepAlgo |
30 | |
31 | is |
32 | |
33 | Create returns BooleanOperations from BRepAlgo; |
34 | |
35 | Shapes2d(me : in out; S1,S2 : Shape from TopoDS); |
36 | ---Purpose: S1 is a Shell with ALL faces supported by the SAME S2 is |
37 | -- an Edge INCLUDED in that surface with pcurve. |
38 | -- this avoids a time-consuming 3D operation, compared to Shapes. |
39 | |
40 | Shapes(me : in out; S1,S2 : Shape from TopoDS); |
41 | ---Purpose: Defines the arguments. |
42 | |
43 | SetApproxParameters(me : in out; NbPntMax : Integer from Standard; |
44 | Tol3D, Tol2D : Real from Standard; |
45 | RelativeTol : Boolean from Standard); |
46 | ---Purpose: Sets different parameters for the curve approximations : |
47 | -- NbPntMax : Maximum number of points to be approximated at |
48 | -- the same time in one curve. |
49 | -- Tol3D, Tol2D : Tolerances to be reached by the approximation. |
50 | -- RelativeTol : The given tolerances are relative. |
51 | |
52 | Perform(me : in out) |
53 | ---Purpose: Performs the global boolean operation. |
54 | is private ; |
55 | |
56 | Perform(me : in out; State1, State2 : State from TopAbs) |
57 | ---Purpose: Performs the global boolean operation and build the |
58 | -- result in regards of the given states. |
59 | is private ; |
60 | |
61 | Define(me : in out; S1,S2 : Shape from TopoDS; |
62 | HDS : in out HDataStructure from TopOpeBRepDS); |
63 | ---Purpose: |
64 | |
65 | Common(me : in out) |
66 | ---Purpose: returns the common part of the shapes. |
67 | ---C++: return const & |
68 | returns Shape from TopoDS; |
69 | |
70 | Fus(me : in out) |
71 | ---Purpose: returns the fuse part of the shapes. |
72 | ---C++: return const & |
73 | returns Shape from TopoDS; |
74 | |
75 | Cut(me : in out) |
76 | ---Purpose: returns the cut part of the shapes. |
77 | ---C++: return const & |
78 | returns Shape from TopoDS; |
79 | |
80 | Section(me : in out) |
81 | ---Purpose: returns the intersection of the shapes. |
82 | ---C++: return const & |
83 | returns Shape from TopoDS; |
84 | |
85 | Shape(me : in out) |
86 | ---Purpose: returns the result of the boolean operation. |
87 | ---C++: return const & |
88 | returns Shape from TopoDS; |
89 | |
90 | ShapeFrom(me : in out; S : Shape from TopoDS) |
91 | ---Purpose: Returns the shape(s) resulting of the boolean operation |
92 | -- issued from the shape <S>. |
93 | ---C++: return const & |
94 | returns Shape from TopoDS ; |
95 | |
96 | Modified (me: in out; S : Shape from TopoDS) |
97 | ---Purpose: Returns the list of the descendant shapes of the shape <S>. |
98 | ---C++: return const & |
99 | returns ListOfShape from TopTools ; |
100 | |
101 | IsDeleted (me: in out; S : Shape from TopoDS) |
102 | ---Purpose: Returns the fact that the shape <S> has been deleted or not |
103 | -- by the boolean operation. |
104 | returns Boolean; |
105 | |
106 | DataStructure(me) returns HDataStructure from TopOpeBRepDS; |
107 | ---C++: return const & |
108 | |
109 | ChangeDataStructure(me : in out) returns HDataStructure from TopOpeBRepDS; |
110 | ---C++: return & |
111 | |
112 | Builder(me) returns HBuilder from TopOpeBRepBuild; |
113 | ---C++: return const & |
114 | |
115 | ChangeBuilder(me : in out) returns HBuilder from TopOpeBRepBuild; |
116 | ---C++: return & |
117 | -- |
118 | DataStructureAccess(me : in out) returns DSAccess from BRepAlgo; |
119 | ---Purpose: returns the member myDSA. It is useful to then access |
120 | -- the method GetSectionEdgeSet (wich is a member of DSAccess) |
121 | ---C++: return & |
122 | |
123 | |
124 | fields |
125 | |
126 | myDSA : DSAccess from BRepAlgo; |
127 | myS1 : Shape from TopoDS; |
128 | myS2 : Shape from TopoDS; |
129 | myShape : Shape from TopoDS; |
130 | myMapShape : MapOfShape from TopTools; |
131 | -- myModified : ListOfShape from TopTools; |
132 | myResult : Shape from TopoDS; |
133 | myApproxNbPntMax : Integer from Standard; |
134 | myApproxTol3D : Real from Standard; |
135 | myApproxTol2D : Real from Standard; |
136 | myApproxRelativeTol : Boolean from Standard; |
137 | |
138 | end BooleanOperations from BRepAlgo; |