1 -- Created on: 1997-08-22
2 -- Created by: Jeannine PANCIATICI, Sergey SOKOLOV
3 -- Copyright (c) 1997-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
8 -- This library is free software; you can redistribute it and / or modify it
9 -- under the terms of the GNU Lesser General Public version 2.1 as published
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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class CurvilinearParameter from Approx
19 ---Purpose: Approximation of a Curve to make its parameter be its
20 -- curvilinear abscissa
21 -- If the curve is a curve on a surface S, C2D is the corresponding Pcurve,
22 -- we considere the curve is given by its representation S(C2D(u))
23 -- If the curve is a curve on 2 surfaces S1 and S2 and C2D1 C2D2 are
24 -- the two corresponding Pcurve, we considere the curve is given
25 -- by its representation 1/2(S1(C2D1(u) + S2 (C2D2(u)))
29 HSurface from Adaptor3d,
30 HCurve from Adaptor3d,
31 HCurve2d from Adaptor2d,
32 BSplineCurve from Geom,
33 BSplineCurve from Geom2d
35 raises OutOfRange from Standard,
36 ConstructionError from Standard
39 Create (C3D : HCurve from Adaptor3d;
41 Order : Shape from GeomAbs;
43 MaxSegments : Integer)
45 returns CurvilinearParameter from Approx
46 ---Purpose : case of a free 3D curve
48 raises ConstructionError;
49 -- If the length of the curve can't be computed or if the length is null
51 Create (C2D : HCurve2d from Adaptor2d;
52 Surf : HSurface from Adaptor3d;
54 Order : Shape from GeomAbs;
56 MaxSegments : Integer)
57 returns CurvilinearParameter from Approx
58 ---Purpose : case of a curve on one surface
60 raises ConstructionError;
61 -- If the length of the curve can't be computed or if the length is null
63 Create (C2D1 : HCurve2d from Adaptor2d;
64 Surf1 : HSurface from Adaptor3d;
65 C2D2 : HCurve2d from Adaptor2d;
66 Surf2 : HSurface from Adaptor3d;
68 Order : Shape from GeomAbs;
70 MaxSegments : Integer)
71 returns CurvilinearParameter from Approx
72 ---Purpose : case of a curve on two surfaces
74 raises ConstructionError;
75 -- If the length of the curve can't be computed or if the length is null
77 IsDone(me) returns Boolean from Standard;
78 -- True if the approximation succeeded within the imposed
81 HasResult(me) returns Boolean from Standard;
82 -- True if the approximation did come out with a result that
83 -- is not NECESSARELY within the required tolerance
85 Curve3d(me) returns BSplineCurve from Geom;
86 --- Purpose: returns the Bspline curve corresponding to the reparametrized 3D curve
88 MaxError3d (me) returns Real;
89 --- Purpose: returns the maximum error on the reparametrized 3D curve
91 Curve2d1(me) returns BSplineCurve from Geom2d;
92 ---Purpose: returns the BsplineCurve representing the reparametrized 2D curve on the
93 -- first surface (case of a curve on one or two surfaces)
95 MaxError2d1(me) returns Real;
96 ---Purpose: returns the maximum error on the first reparametrized 2D curve
98 Curve2d2(me) returns BSplineCurve from Geom2d;
99 ---Purpose: returns the BsplineCurve representing the reparametrized 2D curve on the
100 -- second surface (case of a curve on two surfaces)
102 MaxError2d2(me) returns Real;
103 ---Purpose: returns the maximum error on the second reparametrized 2D curve
105 Dump(me; o: in out OStream);
106 ---Purpose: print the maximum errors(s)
108 ToleranceComputation(myclass; C2D : HCurve2d from Adaptor2d; S : HSurface from Adaptor3d;
109 MaxNumber : Integer; Tol : Real; TolV, TolW : out Real)
114 myCase : Integer from Standard;
115 myDone : Boolean from Standard;
116 myHasResult : Boolean from Standard;
117 myCurve3d : BSplineCurve from Geom;
118 myMaxError3d : Real from Standard;
119 myCurve2d1 : BSplineCurve from Geom2d;
120 myMaxError2d1 : Real from Standard;
121 myCurve2d2 : BSplineCurve from Geom2d;
122 myMaxError2d2 : Real from Standard;
124 end CurvilinearParameter;