0024964: ThruSections crashes the DRAW.exe
[occt.git] / src / BRepOffsetAPI / BRepOffsetAPI_ThruSections.cdl
CommitLineData
b311480e 1-- Created on: 1995-07-17
2-- Created by: Jing-Cheng MEI
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--
d5f74e42 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
973c2be1 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.
b311480e 16
7fd59977 17-- Modified: Mon Jan 12 10:46:37 1998
7fd59977 18-- new method ArrangeWires
19-- Modified: Mon Jan 19 10:11:49 1998
7fd59977 20-- new methods CreateKPart and DetectKPart
21-- Modified: Mon Feb 23 09:28:33 1998
7fd59977 22-- modification of ArrangeWires
23-- for sections with different number of elements
24-- Modified: Mon Apr 6 16:24:40 1998
7fd59977 25-- CreateKPart and DetectKPart moved in BRepFill
26-- Modified: Wed Jul 1 14:33:22 1998
7fd59977 27-- Add history
28-- CreateKPart and DetectKPart moved in BRepFill
7fd59977 29
30
31
32class ThruSections from BRepOffsetAPI inherits MakeShape from BRepBuilderAPI
33
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).
38
39uses
40
41 Wire from TopoDS,
42 Vertex from TopoDS,
43 SequenceOfShape from TopTools,
44 Face from TopoDS,
45 Shape from TopoDS,
46 DataMapOfShapeShape from TopTools,
47 Array1OfShape from TopTools,
48 BSplineSurface from Geom,
49 --
50 Shape from GeomAbs,
51 ParametrizationType from Approx
52
53raises DomainError from Standard
54
55is
56
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.
73
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.
89
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.
94
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.
101
102 CheckCompatibility(me: in out;
103 check : Boolean from Standard = Standard_True);
104
105 SetSmoothing(me: in out; UseSmoothing : Boolean from Standard)
106 ---Purpose: Define the approximation algorithm
107 is static;
108
109 SetParType(me: in out; ParType : ParametrizationType from Approx)
110 ---Purpose: Define the type of parametrization used in the approximation
111 is static;
112
113
114 SetContinuity(me: in out; C : Shape from GeomAbs)
115 ---Purpose: Define the Continuity used in the approximation
116 is static;
117
118 SetCriteriumWeight(me : in out;
119 W1, W2, W3 : Real)
120 ---Purpose: define the Weights associed to the criterium used in
121 -- the optimization.
122 --
123 raises DomainError -- if Wi <= 0
124 is static;
125
126 SetMaxDegree(me : in out; MaxDeg : Integer from Standard)
127 ---Purpose: Define the maximal U degree of result surface
128 is static;
129
130 ParType(me)
131 ---Purpose: returns the type of parametrization used in the approximation
132 returns ParametrizationType from Approx
133 is static;
134
135
136 Continuity(me)
137 ---Purpose: returns the Continuity used in the approximation
138 returns Shape from GeomAbs
139 is static;
140
141 MaxDegree(me)
142 ---Purpose: returns the maximal U degree of result surface
143 returns Integer from Standard
144 is static;
145
146 UseSmoothing(me)
147 ---Purpose: Define the approximation algorithm
148 returns Boolean from Standard
149 is static;
150
151 CriteriumWeight(me ; W1, W2, W3 : out Real)
152 ---Purpose: returns the Weights associed to the criterium used in
153 -- the optimization.
154 is static;
155
156 Build(me: in out)
157 is redefined;
158
159 CreateRuled(me: in out)
160 is private;
161
162 CreateSmoothed(me: in out)
163 is private;
164
165 FirstShape (me)
166 ---Purpose: Returns the TopoDS Shape of the bottom of the loft if solid
167 returns Shape from TopoDS;
168 ---C++ : return const &
169
170 LastShape (me)
171 ---Purpose: Returns the TopoDS Shape of the top of the loft if solid
172 returns Shape from TopoDS;
173 ---C++ : return const &
174
175 GeneratedFace (me; Edge : Shape from TopoDS)
176 ---Purpose: if Ruled
177 -- Returns the Face generated by each edge
178 -- except the last wire
179 -- if smoothed
180 -- Returns the Face generated by each edge of the first wire
181 returns Shape from TopoDS;
182
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)
189
190 returns BSplineSurface from Geom
191 is private;
192
193fields
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;
208
209end ThruSections;
210