b311480e |
1 | -- Created on: 1995-09-04 |
2 | -- Created by: Jacques GOUSSARD |
3 | -- Copyright (c) 1995-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 SplitShape from BRepFeat inherits MakeShape from BRepBuilderAPI |
18 | |
19 | ---Purpose: One of the most significant aspects of BRepFeat functionality is the use of local |
20 | -- operations as opposed to global ones. In a global operation, you would first construct a |
21 | -- form of the type you wanted in your final feature, and then remove matter so that it could |
22 | -- fit into your initial basis object. In a local operation, however, you specify the domain of |
23 | -- the feature construction with aspects of the shape on which the feature is being created. |
24 | -- These semantics are expressed in terms of a member shape of the basis shape from which - |
25 | -- or up to which - matter will be added or removed. As a result, local operations make |
26 | -- calculations simpler and faster than global operations. |
27 | -- In BRepFeat, the semantics of local operations define features constructed from a contour or a |
28 | -- part of the basis shape referred to as the tool. In a SplitShape object, wires or edges of a |
29 | -- face in the basis shape to be used as a part of the feature are cut out and projected to a plane |
30 | -- outside or inside the basis shape. By rebuilding the initial shape incorporating the edges and |
31 | -- the faces of the tool, protrusion or depression features can be constructed. |
32 | |
33 | |
34 | uses Spliter from LocOpe, |
35 | WiresOnShape from LocOpe, |
36 | Shape from TopoDS, |
37 | Face from TopoDS, |
38 | Wire from TopoDS, |
39 | Edge from TopoDS, |
ed60a55e |
40 | Compound from TopoDS, |
7fd59977 |
41 | Vertex from TopoDS, |
42 | ListOfShape from TopTools, |
43 | ShapeModification from BRepBuilderAPI |
44 | |
45 | raises NotDone from StdFail, |
46 | ConstructionError from Standard, |
47 | NoSuchObject from Standard |
48 | |
49 | is |
50 | |
51 | |
52 | Create |
53 | ---Purpose: Empty constructor |
54 | returns SplitShape from BRepFeat; |
55 | ---C++: inline |
56 | |
57 | |
58 | Create(S: Shape from TopoDS) |
59 | ---Purpose: Creates the process with the shape <S>. |
60 | returns SplitShape from BRepFeat; |
61 | ---C++: inline |
62 | |
63 | |
64 | Init(me: in out; S: Shape from TopoDS) |
65 | ---Purpose: Initializes the process on the shape <S>. |
66 | ---C++: inline |
67 | is static; |
68 | |
7c104885 |
69 | SetCheckInterior(me: in out; ToCheckInterior: Boolean from Standard) |
70 | ---Purpose: Set the flag of check internal intersections |
71 | -- default value is True (to check) |
72 | ---C++: inline |
73 | is static; |
7fd59977 |
74 | |
75 | Add(me: in out; W: Wire from TopoDS; |
76 | F: Face from TopoDS) |
77 | ---Purpose: Adds the wire <W> on the face <F>. |
78 | -- Raises NoSuchObject if <F> does not belong to the original shape. |
79 | ---C++: inline |
80 | raises NoSuchObject from Standard, |
81 | ConstructionError from Standard |
82 | |
83 | is static; |
84 | |
85 | |
86 | |
87 | Add(me: in out; E: Edge from TopoDS; |
88 | F: Face from TopoDS) |
89 | ---Purpose: Adds the edge <E> on the face <F>. |
90 | ---C++: inline |
91 | raises NoSuchObject from Standard, |
92 | -- if <F> does not belong to the original shape. |
93 | ConstructionError from Standard |
94 | |
95 | is static; |
96 | |
ed60a55e |
97 | Add(me: in out; Comp: Compound from TopoDS; |
98 | F: Face from TopoDS) |
99 | ---Purpose: Adds the compound <Comp> on the face <F>. The |
100 | -- compound <Comp> must consist of edges lying on the |
101 | -- face <F>. If edges are geometrically connected, |
102 | -- they must be connected topologically, i.e. they |
103 | -- must share common vertices. |
104 | -- |
105 | -- Raises NoSuchObject if <F> does not belong to the original shape. |
106 | ---C++: inline |
107 | raises NoSuchObject from Standard, |
108 | ConstructionError from Standard |
109 | |
110 | is static; |
7fd59977 |
111 | |
112 | |
113 | Add(me: in out; E : Edge from TopoDS; |
114 | EOn: Edge from TopoDS) |
115 | ---Purpose: Adds the edge <E> on the existing edge <EOn>. |
116 | ---C++: inline |
117 | raises NoSuchObject from Standard, |
118 | -- if <EOn> does not belong to the original shape. |
119 | ConstructionError from Standard |
120 | |
121 | is static; |
122 | |
123 | |
124 | DirectLeft(me) |
125 | ---Purpose: Returns the faces which are the left of the |
126 | -- projected wires. |
127 | returns ListOfShape from TopTools |
128 | ---C++: return const& |
129 | raises NotDone from StdFail |
130 | --- The exception is raised when IsDone returns <Standard_False>. |
131 | is static; |
132 | |
133 | |
134 | Left(me) |
135 | ---Purpose: Returns the faces of the "left" part on the shape. |
136 | -- (It is build from DirectLeft, with the faces |
137 | -- connected to this set, and so on...). |
138 | -- Raises NotDone if IsDone returns <Standard_False>. |
139 | ---C++: return const& |
140 | returns ListOfShape from TopTools |
141 | raises NotDone from StdFail |
142 | is static; |
143 | |
144 | |
145 | --- Methods inherited from MakeShape, that must be redefined. |
146 | |
147 | |
148 | Build(me: in out) |
149 | |
150 | is redefined static; |
151 | --- Purpose: Builds the cut and the resulting faces and edges as well. |
152 | IsDeleted (me: in out; S : Shape from TopoDS) |
153 | returns Boolean |
154 | is redefined; |
155 | ---Purpose: Returns true if the shape has been deleted. |
156 | |
157 | Modified(me: in out; F: Shape from TopoDS) |
158 | ---Purpose: Returns the list of generated Faces. |
159 | ---C++: return const & |
160 | returns ListOfShape from TopTools |
161 | is redefined static; |
162 | |
163 | fields |
164 | |
165 | mySShape : Spliter from LocOpe; |
166 | myWOnShape : WiresOnShape from LocOpe; |
167 | |
168 | end SplitShape; |