1 -- Created on: 1997-08-22
2 -- Created by: Jeannine PANCIATICI, Sergey SOKOLOV
3 -- Copyright (c) 1997-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 class CurvilinearParameter from Approx
25 ---Purpose: Approximation of a Curve to make its parameter be its
26 -- curvilinear abscissa
27 -- If the curve is a curve on a surface S, C2D is the corresponding Pcurve,
28 -- we considere the curve is given by its representation S(C2D(u))
29 -- If the curve is a curve on 2 surfaces S1 and S2 and C2D1 C2D2 are
30 -- the two corresponding Pcurve, we considere the curve is given
31 -- by its representation 1/2(S1(C2D1(u) + S2 (C2D2(u)))
35 HSurface from Adaptor3d,
36 HCurve from Adaptor3d,
37 HCurve2d from Adaptor2d,
38 BSplineCurve from Geom,
39 BSplineCurve from Geom2d
41 raises OutOfRange from Standard,
42 ConstructionError from Standard
45 Create (C3D : HCurve from Adaptor3d;
47 Order : Shape from GeomAbs;
49 MaxSegments : Integer)
51 returns CurvilinearParameter from Approx
52 ---Purpose : case of a free 3D curve
54 raises ConstructionError;
55 -- If the length of the curve can't be computed or if the length is null
57 Create (C2D : HCurve2d from Adaptor2d;
58 Surf : HSurface from Adaptor3d;
60 Order : Shape from GeomAbs;
62 MaxSegments : Integer)
63 returns CurvilinearParameter from Approx
64 ---Purpose : case of a curve on one surface
66 raises ConstructionError;
67 -- If the length of the curve can't be computed or if the length is null
69 Create (C2D1 : HCurve2d from Adaptor2d;
70 Surf1 : HSurface from Adaptor3d;
71 C2D2 : HCurve2d from Adaptor2d;
72 Surf2 : HSurface from Adaptor3d;
74 Order : Shape from GeomAbs;
76 MaxSegments : Integer)
77 returns CurvilinearParameter from Approx
78 ---Purpose : case of a curve on two surfaces
80 raises ConstructionError;
81 -- If the length of the curve can't be computed or if the length is null
83 IsDone(me) returns Boolean from Standard;
84 -- True if the approximation succeeded within the imposed
87 HasResult(me) returns Boolean from Standard;
88 -- True if the approximation did come out with a result that
89 -- is not NECESSARELY within the required tolerance
91 Curve3d(me) returns BSplineCurve from Geom;
92 --- Purpose: returns the Bspline curve corresponding to the reparametrized 3D curve
94 MaxError3d (me) returns Real;
95 --- Purpose: returns the maximum error on the reparametrized 3D curve
97 Curve2d1(me) returns BSplineCurve from Geom2d;
98 ---Purpose: returns the BsplineCurve representing the reparametrized 2D curve on the
99 -- first surface (case of a curve on one or two surfaces)
101 MaxError2d1(me) returns Real;
102 ---Purpose: returns the maximum error on the first reparametrized 2D curve
104 Curve2d2(me) returns BSplineCurve from Geom2d;
105 ---Purpose: returns the BsplineCurve representing the reparametrized 2D curve on the
106 -- second surface (case of a curve on two surfaces)
108 MaxError2d2(me) returns Real;
109 ---Purpose: returns the maximum error on the second reparametrized 2D curve
111 Dump(me; o: in out OStream);
112 ---Purpose: print the maximum errors(s)
114 ToleranceComputation(myclass; C2D : HCurve2d from Adaptor2d; S : HSurface from Adaptor3d;
115 MaxNumber : Integer; Tol : Real; TolV, TolW : out Real)
120 myCase : Integer from Standard;
121 myDone : Boolean from Standard;
122 myHasResult : Boolean from Standard;
123 myCurve3d : BSplineCurve from Geom;
124 myMaxError3d : Real from Standard;
125 myCurve2d1 : BSplineCurve from Geom2d;
126 myMaxError2d1 : Real from Standard;
127 myCurve2d2 : BSplineCurve from Geom2d;
128 myMaxError2d2 : Real from Standard;
130 end CurvilinearParameter;