1 -- Created on: 1995-07-17
2 -- Created by: Jing-Cheng MEI
3 -- Copyright (c) 1995-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 -- Modified: Mon Jan 12 10:46:37 1998
18 -- new method ArrangeWires
19 -- Modified: Mon Jan 19 10:11:49 1998
20 -- new methods CreateKPart and DetectKPart
21 -- Modified: Mon Feb 23 09:28:33 1998
22 -- modification of ArrangeWires
23 -- for sections with different number of elements
24 -- Modified: Mon Apr 6 16:24:40 1998
25 -- CreateKPart and DetectKPart moved in BRepFill
26 -- Modified: Wed Jul 1 14:33:22 1998
28 -- CreateKPart and DetectKPart moved in BRepFill
32 class ThruSections from BRepOffsetAPI inherits MakeShape from BRepBuilderAPI
34 ---Purpose: Describes functions to build a loft. This is a shell or a
35 -- solid passing through a set of sections in a given
36 -- sequence. Usually sections are wires, but the first and
37 -- the last sections may be vertices (punctual sections).
43 SequenceOfShape from TopTools,
46 DataMapOfShapeShape from TopTools,
47 Array1OfShape from TopTools,
48 BSplineSurface from Geom,
51 ParametrizationType from Approx
53 raises DomainError from Standard
57 Create(isSolid : Boolean from Standard = Standard_False;
58 ruled : Boolean from Standard = Standard_False;
59 pres3d : Real =1.0e-06)
60 returns ThruSections from BRepOffsetAPI;
61 ---Purpose: Initializes an algorithm for building a shell or a solid
62 -- passing through a set of sections, where:
63 -- - isSolid is set to true if the construction algorithm is
64 -- required to build a solid or to false if it is required to build
65 -- a shell (the default value),
66 -- - ruled is set to true if the faces generated between
67 -- the edges of two consecutive wires are ruled surfaces or to
68 -- false (the default value) if they are smoothed out by approximation,
69 -- - pres3d defines the precision criterion used by the
70 -- approximation algorithm; the default value is 1.0e-6.
71 -- Use AddWire and AddVertex to define the
72 -- successive sections of the shell or solid to be built.
74 Init(me: in out; isSolid : Boolean from Standard = Standard_False;
75 ruled : Boolean from Standard = Standard_False;
76 pres3d : Real =1.0e-06);
77 ---Purpose: Initializes this algorithm for building a shell or a solid
78 -- passing through a set of sections, where:
79 -- - isSolid is set to true if this construction algorithm is
80 -- required to build a solid or to false if it is required to
81 -- build a shell. false is the default value;
82 -- - ruled is set to true if the faces generated between the
83 -- edges of two consecutive wires are ruled surfaces or
84 -- to false (the default value) if they are smoothed out by approximation,
85 -- - pres3d defines the precision criterion used by the
86 -- approximation algorithm; the default value is 1.0e-6.
87 -- Use AddWire and AddVertex to define the successive
88 -- sections of the shell or solid to be built.
90 AddWire(me: in out; wire: Wire from TopoDS);
91 ---Purpose: Adds the wire wire to the set of
92 -- sections through which the shell or solid is built.
93 -- Use the Build function to construct the shape.
95 AddVertex(me: in out; aVertex: Vertex from TopoDS);
96 ---Purpose: Adds the vertex Vertex (punctual section) to the set of sections
97 -- through which the shell or solid is built. A vertex may be added to the
98 -- set of sections only as first or last section. At least one wire
99 -- must be added to the set of sections by the method AddWire.
100 -- Use the Build function to construct the shape.
102 CheckCompatibility(me: in out;
103 check : Boolean from Standard = Standard_True);
105 SetSmoothing(me: in out; UseSmoothing : Boolean from Standard)
106 ---Purpose: Define the approximation algorithm
109 SetParType(me: in out; ParType : ParametrizationType from Approx)
110 ---Purpose: Define the type of parametrization used in the approximation
114 SetContinuity(me: in out; C : Shape from GeomAbs)
115 ---Purpose: Define the Continuity used in the approximation
118 SetCriteriumWeight(me : in out;
120 ---Purpose: define the Weights associed to the criterium used in
123 raises DomainError -- if Wi <= 0
126 SetMaxDegree(me : in out; MaxDeg : Integer from Standard)
127 ---Purpose: Define the maximal U degree of result surface
131 ---Purpose: returns the type of parametrization used in the approximation
132 returns ParametrizationType from Approx
137 ---Purpose: returns the Continuity used in the approximation
138 returns Shape from GeomAbs
142 ---Purpose: returns the maximal U degree of result surface
143 returns Integer from Standard
147 ---Purpose: Define the approximation algorithm
148 returns Boolean from Standard
151 CriteriumWeight(me ; W1, W2, W3 : out Real)
152 ---Purpose: returns the Weights associed to the criterium used in
159 CreateRuled(me: in out)
162 CreateSmoothed(me: in out)
166 ---Purpose: Returns the TopoDS Shape of the bottom of the loft if solid
167 returns Shape from TopoDS;
168 ---C++ : return const &
171 ---Purpose: Returns the TopoDS Shape of the top of the loft if solid
172 returns Shape from TopoDS;
173 ---C++ : return const &
175 GeneratedFace (me; Edge : Shape from TopoDS)
177 -- Returns the Face generated by each edge
178 -- except the last wire
180 -- Returns the Face generated by each edge of the first wire
181 returns Shape from TopoDS;
183 TotalSurf(me; shapes: Array1OfShape from TopTools;
184 NbSect: Integer from Standard;
185 NbEdges: Integer from Standard;
186 w1Point: Boolean from Standard;
187 w2Point: Boolean from Standard;
188 vClosed: Boolean from Standard)
190 returns BSplineSurface from Geom
194 myWires : SequenceOfShape from TopTools;
195 myIsSolid : Boolean from Standard;
196 myIsRuled : Boolean from Standard;
197 myWCheck : Boolean from Standard;
198 myPres3d : Real from Standard;
199 myFirst : Face from TopoDS;
200 myLast : Face from TopoDS;
201 myGenerated : DataMapOfShapeShape from TopTools;
202 -- Approximation parameters
203 myContinuity: Shape from GeomAbs;
204 myParamType : ParametrizationType from Approx;
205 myDegMax : Integer from Standard;
206 myCritWeights : Real[3];
207 myUseSmoothing : Boolean from Standard;