1 -- Created on: 1996-07-26
2 -- Created by: 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.
22 class Builder from FilletSurf
25 ---Purpose: API giving the following geometric information about fillets
26 -- list of corresponding NUBS surfaces
28 -- the 2 support faces
29 -- on each face: the 3d curve and the corresponding 2d curve
30 -- the 2d curves on the fillet
31 -- status of start and end section of the fillet
32 -- first and last parameter on edge of the fillet.
35 Shape,Edge,Face from TopoDS,
38 TrimmedCurve from Geom,
39 ListOfShape from TopTools,
42 InternalBuilder, StatusType,ErrorTypeStatus,StatusDone from FilletSurf
47 OutOfRange from Standard
50 Create(S : Shape from TopoDS;
51 E : ListOfShape from TopTools;
52 R : Real from Standard;
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 ---Purpose: initialize of the informations necessary for the
58 -- computation of the fillet on the
59 -- Shape S from a list of edges E and a radius R.
61 -- Ta is the angular tolerance
62 -- Tapp3d is the 3d approximation tolerance
63 -- Tapp2d is the 2d approximation tolerance
67 returns Builder from FilletSurf;
70 ---Purpose computation of the fillet (list of NUBS)
73 -- computes only the sections used in the computation of the fillet
76 IsDone(me) returns StatusDone from FilletSurf;
77 ---Purpose: gives the status about the computation of the fillet
79 -- IsOK :no problem during the computation
80 -- IsNotOk: no result is produced
81 -- IsPartial: the result is partial
84 StatusError(me) returns ErrorTypeStatus from FilletSurf;
85 ---Purpose: gives informations about error status if
88 -- EdgeNotG1: the edges are not G1
89 -- FacesNotG1 : two connected faces on a same support are
91 -- EdgeNotOnShape: the edge is not on shape
92 -- NotSharpEdge: the edge is not sharp
93 -- PbFilletCompute: problem during the computation of the fillet
98 NbSurface(me) returns Integer from Standard
99 ---Purpose: gives the number of NUBS surfaces of the Fillet.
100 raises NotDone from StdFail;
102 SurfaceFillet (me;Index:Integer from Standard) returns Surface from Geom
103 ---Purpose: gives the NUBS surface of index Index.
104 ---C++: return const &
105 raises NotDone from StdFail,
106 OutOfRange from Standard;
108 TolApp3d (me;Index:Integer from Standard) returns Real from Standard
109 ---Purpose: gives the 3d tolerance reached during approximation
110 -- of surface of index Index
111 raises NotDone from StdFail,
112 OutOfRange from Standard;
114 SupportFace1 (me;Index:Integer from Standard) returns Face from TopoDS
115 ---Purpose:gives the first support face relative to SurfaceFillet(Index);
116 ---C++:return const &
117 raises NotDone from StdFail,
118 OutOfRange from Standard;
120 SupportFace2 (me;Index:Integer from Standard) returns Face from TopoDS
121 ---Purpose:gives the second support face relative to SurfaceFillet(Index);
122 ---C++:return const &
123 raises NotDone from StdFail,
124 OutOfRange from Standard;
127 CurveOnFace1 (me;Index:Integer from Standard) returns Curve from Geom
128 ---C++: return const &
129 --- Purpose: gives the 3d curve of SurfaceFillet(Index) on SupportFace1(Index)
130 raises NotDone from StdFail,
131 OutOfRange from Standard;
133 CurveOnFace2 (me;Index:Integer from Standard) returns Curve from Geom
134 ---C++: return const &
135 ---Purpose: gives the 3d curve of SurfaceFillet(Index) on SupportFace2(Index)
136 raises NotDone from StdFail,
137 OutOfRange from Standard;
140 PCurveOnFace1(me;Index:Integer from Standard) returns Curve from Geom2d
141 ---Purpose:gives the PCurve associated to CurvOnSup1(Index) on the support face
142 ---C++: return const&
144 raises NotDone from StdFail,
145 OutOfRange from Standard;
148 PCurve1OnFillet (me;Index:Integer from Standard) returns Curve from Geom2d
149 ---Purpose: gives the PCurve associated to CurveOnFace1(Index) on the Fillet
150 ---C++: return const&
152 raises NotDone from StdFail,
153 OutOfRange from Standard;
155 PCurveOnFace2(me;Index:Integer from Standard) returns Curve from Geom2d
156 ---Purpose: gives the PCurve associated to CurveOnSup2(Index) on the support face
157 ---C++: return const&
159 raises NotDone from StdFail,
160 OutOfRange from Standard;
162 PCurve2OnFillet (me;Index:Integer from Standard) returns Curve from Geom2d
163 ---Purpose: gives the PCurve associated to CurveOnSup2(Index) on the fillet
164 ---C++: return const&
165 raises NotDone from StdFail,
166 OutOfRange from Standard;
168 FirstParameter(me) returns Real from Standard
169 ---Purpose:gives the parameter of the fillet on the first edge.
170 raises NotDone from StdFail;
172 LastParameter (me) returns Real from Standard
173 ---Purpose: gives the parameter of the fillet on the last edge
174 raises NotDone from StdFail;
176 StartSectionStatus(me) returns StatusType from FilletSurf
178 -- twoExtremityonEdge: each extremity of start section of the Fillet is
179 -- on the edge of the corresponding support face.
180 -- OneExtremityOnEdge: only one of the extremities of start section of the Fillet
181 -- is on the edge of the corresponding support face.
182 -- NoExtremityOnEdge any extremity of the start section ofthe fillet is on
183 -- the edge of the corresponding support face.
184 raises NotDone from StdFail;
186 EndSectionStatus(me) returns StatusType from FilletSurf
188 -- twoExtremityonEdge: each extremity of end section of the Fillet is
189 -- on the edge of the corresponding support face.
190 -- OneExtremityOnEdge: only one of the extremities of end section of the Fillet
191 -- is on the edge of the corresponding support face.
192 -- NoExtremityOnEdge: any extremity of the end section of the fillet is on
193 -- the edge of the corresponding support face.
194 raises NotDone from StdFail;
197 NbSection(me;IndexSurf:Integer from Standard) returns Integer from Standard
198 -- gives the number of sections relative to SurfaceFillet(IndexSurf)
199 raises NotDone from StdFail,
200 OutOfRange from Standard;
202 Section(me;IndexSurf:Integer from Standard;IndexSec:Integer from Standard;
203 Circ: out TrimmedCurve from Geom)
204 -- gives the arc of circle corresponding to section number
205 -- IndexSec of SurfaceFillet(IndexSurf) (The basis curve of the
206 -- trimmed curve is a Geom_Circle)
207 raises NotDone from StdFail,
208 OutOfRange from Standard;
211 myIntBuild : InternalBuilder from FilletSurf;
212 myisdone : StatusDone from FilletSurf;
213 myerrorstatus: ErrorTypeStatus from FilletSurf;