1 -- Created on: 1993-06-08
2 -- Created by: Laurent BOURESCHE
3 -- Copyright (c) 1993-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
8 -- This library is free software; you can redistribute it and/or modify it under
9 -- the terms of the GNU Lesser General Public License 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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 deferred class Trsf from BRepSweep inherits NumLinearRegularSweep
20 ---Purpose: This class is inherited from NumLinearRegularSweep
21 -- to implement the simple swept primitives built
22 -- moving a Shape with a Trsf. It often is possible
23 -- to build the constructed subshapes by a simple
24 -- move of the generating subshapes (shared topology
25 -- and geometry). So two ways of construction are
29 -- - sharing basis elements (the generatrice can be
30 -- modified , for exemples PCurves can be added on
33 -- - copying everything.
42 Orientation from TopAbs
46 Delete(me:out) is redefined;
47 ---C++: alias "Standard_EXPORT virtual ~BRepSweep_Trsf(){Delete() ; }"
49 Initialize(aBuilder : Builder from BRep;
50 aGenShape : Shape from TopoDS;
51 aDirWire : NumShape from Sweep;
52 aLocation : Location from TopLoc;
53 aCopy : Boolean from Standard);
54 ---Purpose: Initialize the Trsf BrepSweep, if aCopy is true
55 -- the basis elements are shared as often as
56 -- possible, else everything is copied.
60 ---Purpose: ends the construction of the swept primitive
61 -- calling the virtual geometric functions that can't
62 -- be called in the initialize.
66 aGenS : Shape from TopoDS;
67 aDirV : NumShape from Sweep)
68 returns Boolean from Standard
69 ---Purpose: function called to analize the way of construction
70 -- of the shapes generated by aGenS and aDirV.
73 -- """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
74 -- Deferred Methods supporting the creation of the geometric part.
75 -- """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
77 MakeEmptyVertex(me : in out;
78 aGenV : Shape from TopoDS;
79 aDirV : NumShape from Sweep)
80 returns Shape from TopoDS
81 ---Purpose: Builds the vertex addressed by [aGenV,aDirV], with its
82 -- geometric part, but without subcomponents.
85 MakeEmptyDirectingEdge(me : in out;
86 aGenV : Shape from TopoDS;
87 aDirE : NumShape from Sweep)
88 returns Shape from TopoDS
89 ---Purpose: Builds the edge addressed by [aGenV,aDirE], with its
90 -- geometric part, but without subcomponents.
93 MakeEmptyGeneratingEdge(me : in out;
94 aGenE : Shape from TopoDS;
95 aDirV : NumShape from Sweep)
96 returns Shape from TopoDS
97 ---Purpose: Builds the edge addressed by [aGenE,aDirV], with its
98 -- geometric part, but without subcomponents.
101 SetParameters(me : in out;
102 aNewFace : Shape from TopoDS;
103 aNewVertex : in out Shape from TopoDS;
104 aGenF : Shape from TopoDS;
105 aGenV : Shape from TopoDS;
106 aDirV : NumShape from Sweep)
107 ---Purpose: Sets the parameters of the new vertex on the new
108 -- face. The new face and new vertex where generated
109 -- from aGenF, aGenV and aDirV .
112 SetDirectingParameter(me : in out;
113 aNewEdge : Shape from TopoDS;
114 aNewVertex : in out Shape from TopoDS;
115 aGenV : Shape from TopoDS;
116 aDirE : NumShape from Sweep;
117 aDirV : NumShape from Sweep)
118 ---Purpose: Sets the parameter of the new vertex on the new
119 -- edge. The new edge and new vertex where generated
120 -- from aGenV aDirE, and aDirV.
123 SetGeneratingParameter(me : in out;
124 aNewEdge : Shape from TopoDS;
125 aNewVertex : in out Shape from TopoDS;
126 aGenE : Shape from TopoDS;
127 aGenV : Shape from TopoDS;
128 aDirV : NumShape from Sweep)
129 ---Purpose: Sets the parameter of the new vertex on the new
130 -- edge. The new edge and new vertex where generated
131 -- from aGenE, aGenV and aDirV .
134 MakeEmptyFace(me : in out;
135 aGenS : Shape from TopoDS;
136 aDirS : NumShape from Sweep)
137 returns Shape from TopoDS
138 ---Purpose: Builds the face addressed by [aGenS,aDirS], with
139 -- its geometric part, but without subcomponents. The
140 -- couple aGenS, aDirS can be a "generating face and
141 -- a directing vertex" or "a generating edge and a
145 SetPCurve(me : in out;
146 aNewFace : Shape from TopoDS;
147 aNewEdge : in out Shape from TopoDS;
148 aGenF : Shape from TopoDS;
149 aGenE : Shape from TopoDS;
150 aDirV : NumShape from Sweep;
151 orien : Orientation from TopAbs)
152 ---Purpose: Sets the PCurve for a new edge on a new face. The
153 -- new edge and the new face were generated using
154 -- aGenF, aGenE and aDirV.
157 SetGeneratingPCurve(me : in out;
158 aNewFace : Shape from TopoDS;
159 aNewEdge : in out Shape from TopoDS;
160 aGenE : Shape from TopoDS;
161 aDirE : NumShape from Sweep;
162 aDirV : NumShape from Sweep;
163 orien : Orientation from TopAbs)
165 ---Purpose: Sets the PCurve for a new edge on a new face. The
166 -- new edge and the new face were generated using
167 -- aGenE, aDirE and aDirV.
170 SetDirectingPCurve(me : in out;
171 aNewFace : Shape from TopoDS;
172 aNewEdge : in out Shape from TopoDS;
173 aGenE : Shape from TopoDS;
174 aGenV : Shape from TopoDS;
175 aDirE : NumShape from Sweep;
176 orien : Orientation from TopAbs)
178 ---Purpose: Sets the PCurve for a new edge on a new face. The
179 -- new edge and the new face were generated using
180 -- aGenE, aDirE and aGenV.
184 aNewShape : Shape from TopoDS;
185 aNewSubShape : Shape from TopoDS;
186 aGenS : Shape from TopoDS;
187 aSubGenS : Shape from TopoDS;
188 aDirS : NumShape from Sweep)
189 returns Boolean from Standard
190 ---Purpose: Returns true if aNewSubShape (addressed by
191 -- aSubGenS and aDirS) must be added in aNewShape
192 -- (addressed by aGenS and aDirS).
196 aNewShape : Shape from TopoDS;
197 aNewSubShape : Shape from TopoDS;
198 aGenS : Shape from TopoDS;
199 aDirS : NumShape from Sweep;
200 aSubDirS : NumShape from Sweep)
201 returns Boolean from Standard
202 ---Purpose: Returns true if aNewSubShape (addressed by
203 -- aGenS and aSubDirS) must be added in aNewShape
204 -- (addressed by aGenS and aDirS).
208 aNewShape : Shape from TopoDS;
209 aNewSubShape : Shape from TopoDS;
210 aGenS : Shape from TopoDS;
211 aSubGenS : Shape from TopoDS;
212 aDirS : NumShape from Sweep)
213 returns Boolean from Standard
214 ---Purpose: In some particular cases the topology of a
215 -- generated face must be composed of independant
216 -- closed wires, in this case this function returns
220 HasShape(me; aGenS : Shape from TopoDS; aDirS : NumShape from Sweep)
221 returns Boolean from Standard
222 ---Purpose: Returns true if aDirS and aGenS addresses a
223 -- resulting Shape. In some specific cases the shape
224 -- can be geometrically inexsistant, then this
225 -- function returns false.
228 IsInvariant (me; aGenS : Shape from TopoDS)
229 returns Boolean from Standard
230 ---Purpose: Returns true if the geometry of aGenS is not
231 -- modified by the trsf of the BRepSweep Trsf.
235 -- """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
236 -- Method coding the continuities on the edges between 2 faces
237 -- """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
238 SetContinuity(me : in out;
239 aGenS : Shape from TopoDS;
240 aDirS : NumShape from Sweep);
241 ---Purpose: Called to propagate the continuity of every vertex
242 -- between two edges of the generating wire aGenS on
243 -- the generated edge and faces.
247 myLocation : Location from TopLoc is protected;
248 myCopy : Boolean from Standard is protected;
250 end Trsf from BRepSweep;