1 -- Created on: 1993-01-27
2 -- Created by: Philippe DAUTRY
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 generic class LinearRegularSweep from Sweep (
18 TheShape as any; -- resulting topological objects.
19 TheGenShape as any; -- Generating topological objects.
20 TheDirShape as any; -- Directing topological objects.
22 TheGenShapeTool as any;
23 TheDirShapeTool as any;
24 TheShapeIterator as any;
25 TheGenShapeIterator as any;
26 TheDirShapeIterator as any)
29 ---Purpose: This a generic class is used to build Sweept
30 -- primitives with a generating "shape" and a
33 -- The indexation and type analysis services required
34 -- for the generatrix are given by <TheGenShapeTool>.
36 -- The indexation and type analysis services required
37 -- for the directrix are given by <TheDirShapeTool>.
39 -- The iteration services required for the generatrix
40 -- are given by <TheGenShapeIterator>.
42 -- The iteration services required for the directrix
43 -- are given by <TheDirShapeIterator>.
45 -- The topology is like a grid of shapes. Each shape
46 -- of the grid must be addressable without confusion
47 -- by one or two objects from the generating or
48 -- directing shapes. Here are exemples of correct
49 -- associations to address:
51 -- - a vertex : GenVertex - DirVertex
52 -- - an edge : GenVertex - DirEdge
53 -- - : GenEdge - DirVertex
54 -- - a face : GenEdge - DirEdge
55 -- GenFace - DirVertex
58 -- "GenObject" is used to identify an object from the
59 -- Generating Shape, and "DirObject" from the
60 -- Directing Shape. So may they be from different
63 -- The method Has... is given because in some special
64 -- cases, a vertex, an edge or a face may be
65 -- geometricaly nonexistant or not usefull.
69 Orientation from TopAbs,
70 Array2OfBoolean from TColStd
74 NoMoreObject from Standard,
75 NoSuchObject from Standard,
76 RangeError from Standard,
77 DomainError from Standard
82 instantiates Array2 from TCollection (TheShape);
83 class SequenceOfShapes
84 instantiates Sequence from TCollection (TheShape);
89 -- """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
91 Delete(me:out) is virtual ;
94 Initialize(aBuilder : TheBuilder;
95 aGenShape : TheGenShape;
96 aDirWire : TheDirShape);
97 ---Purpose: Creates a LinearRegularSweep. <aBuilder> gives
98 -- basic topological services.
101 -- """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
102 -- Deferred Methods supporting the creation of the geometric part.
104 -- """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
106 MakeEmptyVertex(me : in out; aGenV: TheGenShape; aDirV: TheDirShape)
108 ---Purpose: Builds the vertex addressed by [aGenV,aDirV], with its
109 -- geometric part, but without subcomponents.
112 MakeEmptyDirectingEdge(me: in out; aGenV: TheGenShape; aDirE: TheDirShape)
114 ---Purpose: Builds the edge addressed by [aGenV,aDirE], with its
115 -- geometric part, but without subcomponents.
118 MakeEmptyGeneratingEdge(me: in out; aGenE: TheGenShape; aDirV: TheDirShape)
120 ---Purpose: Builds the edge addressed by [aGenE,aDirV], with its
121 -- geometric part, but without subcomponents.
124 SetParameters(me : in out;
126 aNewVertex : in out TheShape;
130 ---Purpose: Sets the parameters of the new vertex on the new
131 -- face. The new face and new vertex where generated
132 -- from aGenF, aGenV and aDirV .
135 SetDirectingParameter(me : in out;
137 aNewVertex : in out TheShape;
141 ---Purpose: Sets the parameter of the new vertex on the new
142 -- edge. The new edge and new vertex where generated
143 -- from aGenV aDirE, and aDirV.
146 SetGeneratingParameter(me : in out;
148 aNewVertex : in out TheShape;
152 ---Purpose: Sets the parameter of the new vertex on the new
153 -- edge. The new edge and new vertex where generated
154 -- from aGenE, aGenV and aDirV .
157 MakeEmptyFace(me : in out;
161 ---Purpose: Builds the face addressed by [aGenS,aDirS], with
162 -- its geometric part, but without subcomponents. The
163 -- couple aGenS, aDirS can be a "generating face and
164 -- a directing vertex" or "a generating edge and a
168 SetPCurve(me : in out;
170 aNewEdge : in out TheShape;
174 orien : Orientation from TopAbs)
175 ---Purpose: Sets the PCurve for a new edge on a new face. The
176 -- new edge and the new face were generated using
177 -- aGenF, aGenE and aDirV.
180 SetGeneratingPCurve(me : in out;
182 aNewEdge : in out TheShape;
186 orien : Orientation from TopAbs)
188 ---Purpose: Sets the PCurve for a new edge on a new face. The
189 -- new edge and the new face were generated using
190 -- aGenE, aDirE and aDirV.
193 SetDirectingPCurve(me : in out;
195 aNewEdge : in out TheShape;
199 orien : Orientation from TopAbs)
201 ---Purpose: Sets the PCurve for a new edge on a new face. The
202 -- new edge and the new face were generated using
203 -- aGenE, aDirE and aGenV.
206 DirectSolid(me : in out;
209 returns Orientation from TopAbs
210 ---Purpose: Returns the Orientation of the shell in the solid
211 -- generated by the face aGenS with the edge aDirS.
212 -- It is REVERSED if the surface is swept in the
213 -- direction of the normal.
217 aNewShape : TheShape;
218 aNewSubShape : TheShape;
220 aSubGenS : TheGenShape;
222 returns Boolean from Standard
223 ---Purpose: Returns true if aNewSubShape (addressed by
224 -- aSubGenS and aDirS) must be added in aNewShape
225 -- (addressed by aGenS and aDirS).
229 aNewShape : TheShape;
230 aNewSubShape : TheShape;
233 aSubDirS : TheDirShape)
234 returns Boolean from Standard
235 ---Purpose: Returns true if aNewSubShape (addressed by
236 -- aGenS and aSubDirS) must be added in aNewShape
237 -- (addressed by aGenS and aDirS).
242 aNewShape : TheShape;
243 aNewSubShape : TheShape;
245 aSubGenS : TheGenShape;
247 returns Boolean from Standard
248 ---Purpose: In some particular cases the topology of a
249 -- generated face must be composed of independant
250 -- closed wires, in this case this function returns
255 SplitShell (me; aNewShape : TheShape)
257 ---Purpose: In some particular cases the topology of a
258 -- generated Shell must be composed of independant
259 -- closed Shells, in this case this function returns
260 -- a Compound of independant Shells.
264 -- """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
265 -- Method coding the continuities on the edges between 2 faces
266 -- """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
267 SetContinuity(me : in out; aGenS : TheGenShape; aDirS : TheDirShape)
268 ---Purpose: Called to propagate the continuity of every vertex
269 -- between two edges of the generating wire aGenS on
270 -- the generated edge and faces.
274 -- """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
277 -- """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
282 HasShape(me; aGenS : TheGenShape; aDirS : TheDirShape)
283 returns Boolean from Standard
284 ---Purpose: Returns true if aDirS and aGenS addresses a
285 -- resulting Shape. In some specific cases the shape
286 -- can be geometrically inexsistant, then this
287 -- function returns false.
290 Shape(me: in out; aGenS : TheGenShape; aDirS : TheDirShape)
292 ---Purpose: Returns the resulting Shape indexed by aDirS and
297 Shape(me: in out; aGenS : TheGenShape)
299 ---Purpose: Returns the resulting Shape indexed by myDirWire
305 ---Purpose: Returns the resulting Shape indexed by myDirWire
309 FirstShape(me: in out)
311 ---Purpose: Returns the resulting Shape indexed by the first
312 -- Vertex of myDirWire and myGenShape.
315 LastShape(me: in out)
317 ---Purpose: Returns the resulting Shape indexed by the last
318 -- Vertex of myDirWire and myGenShape.
322 FirstShape(me: in out; aGenS : TheGenShape)
324 ---Purpose: Returns the resulting Shape indexed by the first
325 -- Vertex of myDirWire and aGenS.
328 LastShape(me: in out; aGenS : TheGenShape)
330 ---Purpose: Returns the resulting Shape indexed by the last
331 -- Vertex of myDirWire and aGenS.
335 Closed(me) returns Boolean from Standard is static;
342 myBuilder : TheBuilder is protected;
346 myGenShape : TheGenShape is protected;
350 myDirWire : TheDirShape is protected;
354 myGenShapeTool : TheGenShapeTool is protected;
355 myDirShapeTool : TheDirShapeTool is protected;
357 -- Array of built objects (NbGShapes,NbDShapes).
358 myShapes : Array2OfShapes is protected;
360 -- Array of built objects flags (NbGShapes,NbDShapes).
361 myBuiltShapes : Array2OfBoolean from TColStd is protected;
363 end LinearRegularSweep;