b311480e |
1 | -- Created on: 1995-06-02 |
2 | -- Created by: Xavier BENVENISTE |
3 | -- Copyright (c) 1995-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 | |
17 | class SameParameter from Approx |
18 | |
19 | ---Purpose: Approximation of a PCurve on a surface to make its |
20 | -- parameter be the same that the parameter of a given 3d |
21 | -- reference curve. |
22 | |
23 | uses |
24 | HSurface from Adaptor3d, |
25 | HCurve from Adaptor3d, |
26 | HCurve2d from Adaptor2d, |
27 | Surface from Geom, |
28 | Curve from Geom, |
29 | Curve from Geom2d, |
30 | BSplineCurve from Geom2d |
31 | |
32 | raises OutOfRange from Standard, |
33 | ConstructionError from Standard |
34 | |
35 | is |
36 | |
37 | Create (C3D : Curve from Geom; |
38 | C2D : Curve from Geom2d; |
39 | S : Surface from Geom; |
40 | Tol : Real) |
41 | |
42 | returns SameParameter from Approx |
43 | ---Purpose: |
44 | -- Warning: the C3D and C2D must have the same parametric domain. |
45 | -- |
46 | raises ConstructionError; |
47 | |
48 | |
49 | Create (C3D : HCurve from Adaptor3d; |
50 | C2D : Curve from Geom2d; |
51 | S : HSurface from Adaptor3d; |
52 | Tol : Real) |
53 | |
54 | returns SameParameter from Approx |
55 | ---Purpose: |
56 | --Warning: the C3D and C2D must have the same parametric domain. |
57 | |
58 | raises ConstructionError; |
59 | |
60 | |
61 | Create (C3D : HCurve from Adaptor3d; |
62 | C2D : HCurve2d from Adaptor2d; |
63 | S : HSurface from Adaptor3d; |
64 | Tol : Real) |
65 | |
66 | returns SameParameter from Approx |
67 | ---Purpose: |
68 | -- Warning: the C3D and C2D must have the same parametric domain. |
69 | -- |
70 | raises ConstructionError; |
71 | |
72 | |
73 | Build (me : in out; |
74 | Tol : Real from Standard) |
75 | ---Purpose: Compute the Pcurve (internal use only). |
76 | is static private; |
77 | |
78 | |
79 | IsDone(me) returns Boolean from Standard; |
80 | ---C++: inline |
81 | |
82 | TolReached(me) returns Real from Standard; |
83 | ---C++: inline |
84 | |
85 | |
86 | IsSameParameter(me) |
87 | ---C++: inline |
88 | |
89 | ---Purpose: Tells whether the original data had already the same |
90 | -- parameter up to the tolerance : in that case nothing |
91 | -- is done. |
92 | |
93 | returns Boolean from Standard; |
94 | |
95 | |
96 | Curve2d(me) |
97 | ---C++: inline |
98 | |
99 | ---Purpose: Returns the 2D curve that has the same parameter as |
100 | -- the 3D curve once evaluated on the surface up to the |
101 | -- specified tolerance |
102 | returns BSplineCurve from Geom2d; |
103 | |
104 | |
105 | fields |
106 | |
107 | mySameParameter : Boolean from Standard; |
108 | myDone : Boolean from Standard; |
109 | myTolReached : Real from Standard; |
110 | myCurve2d : BSplineCurve from Geom2d; |
111 | myHCurve2d : HCurve2d from Adaptor2d; |
112 | myC3d : HCurve from Adaptor3d; |
113 | mySurf : HSurface from Adaptor3d; |
114 | |
115 | end SameParameter; |