0024023: Revamp the OCCT Handle -- ambiguity
[occt.git] / src / BRepLib / BRepLib.cdl
CommitLineData
b311480e 1-- Created on: 1993-12-15
2-- Created by: Remi LEQUETTE
3-- Copyright (c) 1993-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.
7fd59977 16
17package BRepLib
18
19 ---Purpose: The BRepLib package provides general utilities for
20 -- BRep.
21 --
22 -- * FindSurface : Class to compute a surface through
23 -- a set of edges.
24 --
25 -- * Compute missing 3d curve on an edge.
26
27uses
28 Standard,
29 StdFail,
30 gp,
31 Geom,
32 GeomAbs,
33 Geom2d,
34 TopoDS,
35 TopLoc,
36 TopTools,
37 TopAbs
38
39is
40
41 enumeration EdgeError is
42 ---Purpose: Errors that can occur at edge construction.
43 EdgeDone, -- no error
44 PointProjectionFailed,
45 ParameterOutOfRange,
46 DifferentPointsOnClosedCurve,
47 PointWithInfiniteParameter,
48 DifferentsPointAndParameter,
49 LineThroughIdenticPoints
50 end EdgeError;
51
52
53 enumeration WireError is
54 ---Purpose: Errors that can occur at wire construction.
55 WireDone, -- no error
56 EmptyWire,
57 DisconnectedWire,
58 NonManifoldWire
59
60 end WireError;
61
62
63 enumeration FaceError is
64 ---Purpose: Errors that can occur at face construction.
65 FaceDone, -- no error
66 NoFace, -- not initialised
67 NotPlanar,
68 CurveProjectionFailed,
69 ParametersOutOfRange
70
71 end FaceError;
72
73
74 enumeration ShellError is
75 ---Purpose: Errors that can occur at shell construction.
76
77 ShellDone, -- no error
78 EmptyShell,
79 DisconnectedShell,
80 ShellParametersOutOfRange
81
82 end ShellError;
83
84 enumeration ShapeModification is
85 ---Purpose: Modification type after a topologic operation.
86
87 Preserved, -- no modification
88 Deleted,
89 Trimmed,
90 Merged,
91 BoundaryModified
92
93 end ShapeModification;
94
95 deferred class Command;
7fd59977 96
97 deferred class MakeShape;
7fd59977 98
99 --
100 -- Construction of topology from geometry
101 --
102
103 class MakeVertex;
104
105 class MakeEdge;
106
107 class MakeEdge2d;
108
109 class MakePolygon;
110
111 class MakeFace;
112
113 --
114 -- Construction of composite topologies
115 --
116
117 class MakeWire;
118
119 class MakeShell;
120
121 class MakeSolid;
122
123
124
125
126 --- END of API commands.
127
128
129
130
131 class FindSurface;
7fd59977 132
133 class FuseEdges;
134 ---Purpose:
135
1b7ae951 136 class CheckCurveOnSurface;
137 ---Purpose:
138 -- Computes the max distance between edge
139 -- and its 2d representation on the face.
7fd59977 140
141 --
142 -- Default precison methods.
143 -- The default precision is initialized with Precision::Confusion()
144 --
145
146 Precision(P : Real);
147 ---Purpose: Sets the default precision. The current Precision
148 -- is returned.
149 ---Level: Public
150
151 Precision returns Real;
152 ---Purpose: Returns the default precision.
153 ---Level: Public
154
155
156 --
157 -- Default plane for 2d edges.
158 --
159
160 Plane(P : Plane from Geom);
161 ---Purpose: Sets the current plane to P.
162 ---Level: Public
163
164 Plane returns Plane from Geom;
165 ---Purpose: Returns the current plane.
166 --
167 ---C++: return const &
168 ---Level: Public
169
170
171
172 CheckSameRange(E : Edge from TopoDS ;
173 Confusion : Real from Standard = 1.0e-12)
174 returns Boolean;
175
176 ---Purpose: checks if the Edge is same range IGNORING
177 -- the same range flag of the edge
178 -- Confusion argument is to compare real numbers
179 -- idenpendently of any model space tolerance
180 --
181
182
183 SameRange(E : Edge from TopoDS ;
184 Tolerance : Real from Standard = 1.0e-5) ;
185 ---Purpose: will make all the curve representation have
186 -- the same range domain for the parameters.
187 -- This will IGNORE the same range flag value
188 -- to proceed.
189 -- If there is a 3D curve there it will the
190 -- range of that curve. If not the first curve representation
191 -- encountered in the list will give its range to
192 -- the all the other curves.
193
194 BuildCurve3d(E : Edge from TopoDS ;
195 Tolerance : Real from Standard = 1.0e-5 ;
196 Continuity : Shape from GeomAbs = GeomAbs_C1;
197 MaxDegree : Integer = 14;
198 MaxSegment : Integer = 0 --30
199 ) returns Boolean;
200 ---Purpose: Computes the 3d curve for the edge <E> if it does
201 -- not exist. Returns True if the curve was computed
202 -- or existed. Returns False if there is no planar
dfc06d1f 203 -- pcurve or the computation failed.
7fd59977 204 -- <MaxSegment> >= 30 in approximation
205
206 BuildCurves3d(S : Shape from TopoDS ;
207 Tolerance : Real from Standard;
208 Continuity : Shape from GeomAbs = GeomAbs_C1;
209 MaxDegree : Integer = 14;
210 MaxSegment : Integer = 0 --30
211 ) returns Boolean;
212
213 ---Purpose: Computes the 3d curves for all the edges of <S>
214 -- return False if one of the computation failed.
215 -- <MaxSegment> >= 30 in approximation
216
217 BuildCurves3d(S : Shape from TopoDS)
218 returns Boolean;
219
220 ---Purpose: Computes the 3d curves for all the edges of <S>
221 -- return False if one of the computation failed.
222
223
224 --
225 --
226 UpdateEdgeTol( E : Edge from TopoDS ;
227 MinToleranceRequest : Real from Standard ;
228 MaxToleranceToCheck : Real from Standard)
229 ---Purpose: Checks if the edge has a Tolerance smaller than -- --
230 -- -- -- MaxToleranceToCheck if so it will compute the
231 -- radius of -- the cylindrical pipe surface that
232 -- MinToleranceRequest is the minimum tolerance before it
233 -- is usefull to start testing. Usually it should be arround
234 -- 10e-5
235 -- contains all -- the curve represenation of the edge
236 -- returns True if the Edge tolerance had to be updated
237 returns Boolean ;
238
239
240 UpdateEdgeTolerance(S : Shape from TopoDS;
241 MinToleranceRequest : Real from Standard ;
242 MaxToleranceToCheck : Real from Standard)
243
244 ---Purpose: -- Checks all the edges of the shape whose -- -- --
245 -- Tolerance is smaller than MaxToleranceToCheck --
246 -- Returns True if at least one edge was updated --
247 -- MinToleranceRequest is the minimum tolerance before
248 -- -- it -- is usefull to start testing. Usually it
249 -- should be arround -- 10e-5--
250 --
251 -- Warning :The method is very slow as it checks all.
252 -- Use only in interfaces or processing assimilate batch
253 --
254
255 returns Boolean ;
256
257 SameParameter(E: Edge from TopoDS;
258 Tolerance : Real from Standard = 1.0e-5);
259 ---Purpose: Computes new 2d curve(s) for the edge <E> to have
260 -- the same parameter as the 3d curve.
261 -- The algorithm is not done if the flag SameParameter
262 -- was True on the Edge.
263
264
265
266 SameParameter(S: Shape from TopoDS ;
267 Tolerance : Real from Standard = 1.0e-5;
268 forced : Boolean from Standard = Standard_False);
269 ---Purpose: Computes new 2d curve(s) for all the edges of <S>
270 -- to have the same parameter as the 3d curve.
271 -- The algorithm is not done if the flag SameParameter
272 -- was True on an Edge.
273
274 UpdateTolerances(S: Shape from TopoDS;
275 verifyFaceTolerance : Boolean from Standard = Standard_False);
276 ---Purpose: Replaces tolerance of FACE EDGE VERTEX by the
277 -- tolerance Max of their connected handling shapes.
278 -- It is not necessary to use this call after
279 -- SameParameter. (called in)
280
281 OrientClosedSolid(solid : in out Solid from TopoDS)
282 ---Purpose: Orients the solid forward and the shell with the
283 -- orientation to have matter in the solid. Returns
284 -- False if the solid is unOrientable (open or incoherent)
285 returns Boolean;
286
287
288 EncodeRegularity(S : Shape from TopoDS;
289 TolAng : Real from Standard = 1.0e-10);
290 ---Purpose: Encodes the Regularity of edges on a Shape.
291 -- Warning: <TolAng> is an angular tolerance, expressed in Rad.
292 -- Warning: If the edges's regularity are coded before, nothing
293 -- is done.
294
295 EncodeRegularity(S : in out Edge from TopoDS;
296 F1, F2 : Face from TopoDS;
297 TolAng : Real from Standard = 1.0e-10);
298 ---Purpose: Encodes the Regularity beetween <F1> and <F2> by <E>
299 -- Warning: <TolAng> is an angular tolerance, expressed in Rad.
300 -- Warning: If the edge's regularity is coded before, nothing
301 -- is done.
302
303 SortFaces (S : Shape from TopoDS;
304 LF : in out ListOfShape from TopTools);
305 ---Purpose: Sorts in LF the Faces of S on the complexity of
306 -- their surfaces
307 -- (Plane,Cylinder,Cone,Sphere,Torus,other)
308
309 ReverseSortFaces (S : Shape from TopoDS;
310 LF : in out ListOfShape from TopTools);
311 ---Purpose: Sorts in LF the Faces of S on the reverse
312 -- complexity of their surfaces
313 -- (other,Torus,Sphere,Cone,Cylinder,Plane)
7693827d 314
315 EnsureNormalConsistency (S : Shape from TopoDS;
316 theAngTol: Real from Standard = 0.001;
317 ForceComputeNormals: Boolean from Standard = Standard_False)
318 returns Boolean;
319 ---Purpose: Corrects the normals in Poly_Triangulation of faces,
320 -- in such way that normals at nodes lying along smooth
321 -- edges have the same value on both adjacent triangulations.
322 -- Returns TRUE if any correction is done.
323
7fd59977 324end BRepLib;