1 -- Created on: 1996-07-26
2 -- Created by: s: Maria PUMBORIOS
3 -- Copyright (c) 1996-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
23 private class InternalBuilder from FilletSurf inherits FilBuilder from ChFi3d
25 ---Purpose: This class is private. It is used by the class Builder
26 -- from FilletSurf. It computes geometric information about fillets.
32 SequenceOfSurfData from ChFiDS,
33 HSurface from BRepAdaptor,
34 TopolTool from Adaptor3d,
35 Shape,Edge,Face from TopoDS,
38 TrimmedCurve from Geom,
39 FilletShape from ChFi3d,
40 ListOfShape from TopTools,
45 StatusType,ErrorTypeStatus,StatusDone from FilletSurf,
46 HCurve2d from BRepAdaptor,
47 Orientation from TopAbs
51 Create(S : Shape from TopoDS;
52 FShape : FilletShape from ChFi3d = ChFi3d_Polynomial;
53 Ta : Real from Standard = 1.0e-2;
54 Tapp3d : Real from Standard=1.0e-4;
55 Tapp2d : Real from Standard=1.0e-5)
57 returns InternalBuilder from FilletSurf;
62 E : ListOfShape from TopTools;
63 R : Real from Standard)
65 ---Purpose: Initializes the contour with a list of Edges
68 -- 2 : the edges are not G1
69 -- 3 : two connected faces on a same support are not G1
70 -- 4 : the edge is not on shape
71 -- 5 : NotSharpEdge: the edge is not sharp
72 returns Integer from Standard;
76 --- computation of the fillet
78 PerformSurf(me : in out;
79 SeqData : out SequenceOfSurfData from ChFiDS;
80 Guide : HElSpine from ChFiDS;
81 Spine : Spine from ChFiDS;
82 Choix : Integer from Standard;
83 S1 : HSurface from BRepAdaptor;
84 I1 : TopolTool from Adaptor3d;
85 S2 : HSurface from BRepAdaptor;
86 I2 : TopolTool from Adaptor3d;
87 MaxStep : Real from Standard;
88 Fleche : Real from Standard;
89 TolGuide : Real from Standard;
90 First,Last : in out Real from Standard;
91 Inside,Appro : Boolean from Standard;
92 Forward : Boolean from Standard;
93 RecOnS1,RecOnS2 : Boolean from Standard;
94 Soldep : Vector from math;
95 Intf,Intl : in out Boolean from Standard)
97 is redefined protected;
98 ---Purpose: This method calculates the elements of construction of the
99 -- fillet (constant or evolutive).
101 PerformSurf(me : in out;
102 SeqData : out SequenceOfSurfData from ChFiDS;
103 Guide : HElSpine from ChFiDS;
104 Spine : Spine from ChFiDS;
105 Choix : Integer from Standard;
106 S1 : HSurface from BRepAdaptor;
107 I1 : TopolTool from Adaptor3d;
108 PC1 : HCurve2d from BRepAdaptor;
109 Sref1 : HSurface from BRepAdaptor;
110 PCref1 : HCurve2d from BRepAdaptor;
111 Decroch1 : out Boolean from Standard;
112 S2 : HSurface from BRepAdaptor;
113 I2 : TopolTool from Adaptor3d;
114 Or2 : Orientation from TopAbs;
115 MaxStep : Real from Standard;
116 Fleche : Real from Standard;
117 TolGuide : Real from Standard;
118 First,Last : in out Real from Standard;
119 Inside,Appro,Forward : Boolean from Standard;
120 RecP,RecS,RecRst : Boolean from Standard;
121 Soldep : Vector from math)
122 is redefined protected;
124 PerformSurf(me : in out;
125 SeqData : out SequenceOfSurfData from ChFiDS;
126 Guide : HElSpine from ChFiDS;
127 Spine : Spine from ChFiDS;
128 Choix : Integer from Standard;
129 S1 : HSurface from BRepAdaptor;
130 I1 : TopolTool from Adaptor3d;
131 Or1 : Orientation from TopAbs;
132 S2 : HSurface from BRepAdaptor;
133 I2 : TopolTool from Adaptor3d;
134 PC2 : HCurve2d from BRepAdaptor;
135 Sref2 : HSurface from BRepAdaptor;
136 PCref2 : HCurve2d from BRepAdaptor;
137 Decroch2 : out Boolean from Standard;
138 MaxStep : Real from Standard;
139 Fleche : Real from Standard;
140 TolGuide : Real from Standard;
141 First,Last : in out Real from Standard;
142 Inside,Appro,Forward : Boolean from Standard;
143 RecP,RecS,RecRst : Boolean from Standard;
144 Soldep : Vector from math)
145 is redefined protected;
147 PerformSurf(me : in out;
148 Data : out SequenceOfSurfData from ChFiDS;
149 Guide : HElSpine from ChFiDS;
150 Spine : Spine from ChFiDS;
151 Choix : Integer from Standard;
152 S1 : HSurface from BRepAdaptor;
153 I1 : TopolTool from Adaptor3d;
154 PC1 : HCurve2d from BRepAdaptor;
155 Sref1 : HSurface from BRepAdaptor;
156 PCref1 : HCurve2d from BRepAdaptor;
157 Decroch1 : out Boolean from Standard;
158 Or1 : Orientation from TopAbs;
159 S2 : HSurface from BRepAdaptor;
160 I2 : TopolTool from Adaptor3d;
161 PC2 : HCurve2d from BRepAdaptor;
162 Sref2 : HSurface from BRepAdaptor;
163 PCref2 : HCurve2d from BRepAdaptor;
164 Decroch2 : out Boolean from Standard;
165 Or2 : Orientation from TopAbs;
166 MaxStep : Real from Standard;
167 Fleche : Real from Standard;
168 TolGuide : Real from Standard;
169 First,Last : in out Real from Standard;
170 Inside,Appro,Forward : Boolean from Standard;
171 RecP1,RecRst1 : Boolean from Standard;
172 RecP2,RecRst2 : Boolean from Standard;
173 Soldep : Vector from math)
174 is redefined protected;
176 Done (me) returns Boolean from Standard;
178 NbSurface(me) returns Integer from Standard;
179 ---Purpose: gives the number of NUBS surfaces of the Fillet.
181 SurfaceFillet (me;Index:Integer from Standard)
182 ---Purpose: gives the NUBS surface of index Index.
183 ---C++: return const &
184 returns Surface from Geom;
186 TolApp3d (me;Index:Integer from Standard) returns Real from Standard;
187 ---Purpose: gives the 3d tolerance reached during approximation
188 -- of the surface of index Index
191 SupportFace1 (me;Index:Integer from Standard)
192 ---Purpose:gives the first support face relative to SurfaceFillet(Index);
193 ---C++:return const &
194 returns Face from TopoDS;
196 SupportFace2 (me;Index:Integer from Standard)
197 ---Purpose:gives the second support face relative to SurfaceFillet(Index);
198 ---C++:return const &
199 returns Face from TopoDS;
201 CurveOnFace1 (me;Index:Integer from Standard)
202 ---C++: return const &
203 --- Purpose: gives the 3d curve of SurfaceFillet(Index) on SupportFace1(Index)
204 returns Curve from Geom;
206 CurveOnFace2 (me;Index:Integer from Standard)
207 ---C++: return const &
208 ---Purpose: gives the 3d curve of SurfaceFillet(Index) on SupportFace2(Index)
209 returns Curve from Geom;
211 PCurveOnFace1(me;Index:Integer from Standard)
212 ---Purpose:gives the PCurve associated to CurvOnSup1(Index) on the support face
213 ---C++: return const&
214 returns Curve from Geom2d;
216 PCurve1OnFillet (me;Index:Integer from Standard)
217 ---Purpose: gives the PCurve associated to CurveOnFace1(Index) on the Fillet
218 ---C++: return const&
219 returns Curve from Geom2d;
221 PCurveOnFace2(me;Index:Integer from Standard)
222 ---Purpose: gives the PCurve associated to CurveOnSup2(Index) on the support face
223 ---C++: return const&
224 returns Curve from Geom2d;
226 PCurve2OnFillet (me;Index:Integer from Standard)
227 ---Purpose: gives the PCurve associated to CurveOnSup2(Index) on the fillet
228 ---C++: return const&
229 returns Curve from Geom2d;
232 ---Purpose:gives the parameter of the fillet on the first edge.
236 returns Real from Standard;
239 ---Purpose: gives the parameter of the fillet on the last edge
241 returns Real from Standard;
243 StartSectionStatus(me)
245 -- TwoExtremityOnEdge: each extremity of start section of the Fillet is
246 -- on the edge of the corresponding support face.
247 -- OneExtremityOnEdge: only one of the extremities of start section of the Fillet
248 -- is on the edge of the corresponding support face.
249 -- NoExtremityOnEdge: any extremity of the start section ofthe fillet is on
250 -- the edge of the corresponding support face.
252 returns StatusType from FilletSurf;
256 -- twoExtremityonEdge : each extremity of end section of the Fillet is
257 -- on the edge of the corresponding support face.
258 -- OneExtremityOnEdge: only one of the extremities of end section of the Fillet
259 -- is on the edge of the corresponding support face.
260 -- NoExtremityOnEdge : any extremity of the end section of the fillet is on
261 -- the edge of the corresponding support face.
263 returns StatusType from FilletSurf;
266 Simulate (me:in out);
267 -- computes only the sections used in the computation of the fillet
269 NbSection(me;IndexSurf:Integer from Standard)
270 returns Integer from Standard;
271 -- gives the number of sections relative to SurfaceFillet(IndexSurf)
273 Section(me;IndexSurf:Integer from Standard;IndexSec:Integer from Standard;
274 Circ: out TrimmedCurve from Geom);
275 -- gives the arc of circle corresponding to section number
276 -- IndexSec of SurfaceFillet(IndexSurf) (The basis curve of the
277 -- trimmed curve is a Geom_Circle)