2 -- Created: Wed Dec 15 15:34:04 1993
3 -- Author: Remi LEQUETTE
5 ---Copyright: Matra Datavision 1993
11 ---Purpose: The BRepLib package provides general utilities for
14 -- * FindSurface : Class to compute a surface through
17 -- * Compute missing 3d curve on an edge.
33 enumeration EdgeError is
34 ---Purpose: Errors that can occur at edge construction.
36 PointProjectionFailed,
38 DifferentPointsOnClosedCurve,
39 PointWithInfiniteParameter,
40 DifferentsPointAndParameter,
41 LineThroughIdenticPoints
45 enumeration WireError is
46 ---Purpose: Errors that can occur at wire construction.
55 enumeration FaceError is
56 ---Purpose: Errors that can occur at face construction.
58 NoFace, -- not initialised
60 CurveProjectionFailed,
66 enumeration ShellError is
67 ---Purpose: Errors that can occur at shell construction.
69 ShellDone, -- no error
72 ShellParametersOutOfRange
76 enumeration ShapeModification is
77 ---Purpose: Modification type after a topologic operation.
79 Preserved, -- no modification
85 end ShapeModification;
87 deferred class Command;
88 ---Purpose: Root class for all BRepBuilderAPI commands.
90 deferred class MakeShape;
91 ---Purpose: Root class for all shape constructions.
94 -- Construction of topology from geometry
108 -- Construction of composite topologies
120 --- END of API commands.
126 ---Purpose: Find a surface in a set of edges.
133 -- Default precison methods.
134 -- The default precision is initialized with Precision::Confusion()
138 ---Purpose: Sets the default precision. The current Precision
142 Precision returns Real;
143 ---Purpose: Returns the default precision.
148 -- Default plane for 2d edges.
151 Plane(P : Plane from Geom);
152 ---Purpose: Sets the current plane to P.
155 Plane returns Plane from Geom;
156 ---Purpose: Returns the current plane.
158 ---C++: return const &
163 CheckSameRange(E : Edge from TopoDS ;
164 Confusion : Real from Standard = 1.0e-12)
167 ---Purpose: checks if the Edge is same range IGNORING
168 -- the same range flag of the edge
169 -- Confusion argument is to compare real numbers
170 -- idenpendently of any model space tolerance
174 SameRange(E : Edge from TopoDS ;
175 Tolerance : Real from Standard = 1.0e-5) ;
176 ---Purpose: will make all the curve representation have
177 -- the same range domain for the parameters.
178 -- This will IGNORE the same range flag value
180 -- If there is a 3D curve there it will the
181 -- range of that curve. If not the first curve representation
182 -- encountered in the list will give its range to
183 -- the all the other curves.
185 BuildCurve3d(E : Edge from TopoDS ;
186 Tolerance : Real from Standard = 1.0e-5 ;
187 Continuity : Shape from GeomAbs = GeomAbs_C1;
188 MaxDegree : Integer = 14;
189 MaxSegment : Integer = 0 --30
191 ---Purpose: Computes the 3d curve for the edge <E> if it does
192 -- not exist. Returns True if the curve was computed
193 -- or existed. Returns False if there is no planar
195 -- <MaxSegment> >= 30 in approximation
197 BuildCurves3d(S : Shape from TopoDS ;
198 Tolerance : Real from Standard;
199 Continuity : Shape from GeomAbs = GeomAbs_C1;
200 MaxDegree : Integer = 14;
201 MaxSegment : Integer = 0 --30
204 ---Purpose: Computes the 3d curves for all the edges of <S>
205 -- return False if one of the computation failed.
206 -- <MaxSegment> >= 30 in approximation
208 BuildCurves3d(S : Shape from TopoDS)
211 ---Purpose: Computes the 3d curves for all the edges of <S>
212 -- return False if one of the computation failed.
217 UpdateEdgeTol( E : Edge from TopoDS ;
218 MinToleranceRequest : Real from Standard ;
219 MaxToleranceToCheck : Real from Standard)
220 ---Purpose: Checks if the edge has a Tolerance smaller than -- --
221 -- -- -- MaxToleranceToCheck if so it will compute the
222 -- radius of -- the cylindrical pipe surface that
223 -- MinToleranceRequest is the minimum tolerance before it
224 -- is usefull to start testing. Usually it should be arround
226 -- contains all -- the curve represenation of the edge
227 -- returns True if the Edge tolerance had to be updated
231 UpdateEdgeTolerance(S : Shape from TopoDS;
232 MinToleranceRequest : Real from Standard ;
233 MaxToleranceToCheck : Real from Standard)
235 ---Purpose: -- Checks all the edges of the shape whose -- -- --
236 -- Tolerance is smaller than MaxToleranceToCheck --
237 -- Returns True if at least one edge was updated --
238 -- MinToleranceRequest is the minimum tolerance before
239 -- -- it -- is usefull to start testing. Usually it
240 -- should be arround -- 10e-5--
242 -- Warning :The method is very slow as it checks all.
243 -- Use only in interfaces or processing assimilate batch
248 SameParameter(E: Edge from TopoDS;
249 Tolerance : Real from Standard = 1.0e-5);
250 ---Purpose: Computes new 2d curve(s) for the edge <E> to have
251 -- the same parameter as the 3d curve.
252 -- The algorithm is not done if the flag SameParameter
253 -- was True on the Edge.
257 SameParameter(S: Shape from TopoDS ;
258 Tolerance : Real from Standard = 1.0e-5;
259 forced : Boolean from Standard = Standard_False);
260 ---Purpose: Computes new 2d curve(s) for all the edges of <S>
261 -- to have the same parameter as the 3d curve.
262 -- The algorithm is not done if the flag SameParameter
263 -- was True on an Edge.
265 UpdateTolerances(S: Shape from TopoDS;
266 verifyFaceTolerance : Boolean from Standard = Standard_False);
267 ---Purpose: Replaces tolerance of FACE EDGE VERTEX by the
268 -- tolerance Max of their connected handling shapes.
269 -- It is not necessary to use this call after
270 -- SameParameter. (called in)
272 OrientClosedSolid(solid : in out Solid from TopoDS)
273 ---Purpose: Orients the solid forward and the shell with the
274 -- orientation to have matter in the solid. Returns
275 -- False if the solid is unOrientable (open or incoherent)
279 EncodeRegularity(S : Shape from TopoDS;
280 TolAng : Real from Standard = 1.0e-10);
281 ---Purpose: Encodes the Regularity of edges on a Shape.
282 -- Warning: <TolAng> is an angular tolerance, expressed in Rad.
283 -- Warning: If the edges's regularity are coded before, nothing
286 EncodeRegularity(S : in out Edge from TopoDS;
287 F1, F2 : Face from TopoDS;
288 TolAng : Real from Standard = 1.0e-10);
289 ---Purpose: Encodes the Regularity beetween <F1> and <F2> by <E>
290 -- Warning: <TolAng> is an angular tolerance, expressed in Rad.
291 -- Warning: If the edge's regularity is coded before, nothing
294 SortFaces (S : Shape from TopoDS;
295 LF : in out ListOfShape from TopTools);
296 ---Purpose: Sorts in LF the Faces of S on the complexity of
298 -- (Plane,Cylinder,Cone,Sphere,Torus,other)
300 ReverseSortFaces (S : Shape from TopoDS;
301 LF : in out ListOfShape from TopTools);
302 ---Purpose: Sorts in LF the Faces of S on the reverse
303 -- complexity of their surfaces
304 -- (other,Torus,Sphere,Cone,Cylinder,Plane)