b311480e |
1 | -- Created on: 1992-03-26 |
2 | -- Created by: Laurent BUCHARD |
3 | -- Copyright (c) 1992-1999 Matra Datavision |
4 | -- Copyright (c) 1999-2012 OPEN CASCADE SAS |
5 | -- |
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. |
10 | -- |
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. |
13 | -- |
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. |
20 | |
7fd59977 |
21 | |
22 | |
23 | |
24 | deferred class ImpTool from IntImpParGen |
25 | |
26 | ---Purpose: Template class for an implicit curve. |
27 | |
28 | |
29 | uses Pnt2d from gp, |
30 | Vec2d from gp |
31 | |
32 | is |
33 | |
34 | |
35 | Value (me; U: Real from Standard) |
36 | |
37 | --Purpose: Computes the point at parameter U on the |
38 | -- Implicit Curve. |
39 | |
40 | returns Pnt2d from gp |
41 | is static; |
42 | |
43 | |
44 | D1 (me; U: Real from Standard ; P: out Pnt2d; T: out Vec2d) |
45 | |
46 | --Purpose: Computes the first derivative and the point on the |
47 | -- implicit curve at parameter U. |
48 | |
49 | is static; |
50 | |
51 | |
52 | D2 (me; U: Real from Standard ; P: out Pnt2d; T,N: out Vec2d) |
53 | |
54 | --Purpose: Computes the first, the second derivatives |
55 | -- and the point on the implicit curve at parameter U. |
56 | |
57 | is static; |
58 | |
59 | |
60 | Distance(me; P: Pnt2d from gp) |
61 | |
62 | ---Purpose: Computes the value of the signed distance between |
63 | -- the point P and the implicit curve. |
64 | -- |
65 | |
66 | returns Real from Standard |
67 | is static; |
68 | |
69 | |
70 | GradDistance(me; P: Pnt2d from gp) |
71 | |
72 | ---Purpose: Computes the Gradient of the Signed Distance |
73 | -- between a point and the implicit curve, at the |
74 | -- point P. |
75 | -- |
76 | |
77 | returns Vec2d from gp |
78 | is static; |
79 | |
80 | |
81 | FindParameter(me; P: Pnt2d from gp) |
82 | |
83 | ---Purpose: Returns the parameter U of the point on the |
84 | -- implicit curve corresponding to the point P. |
85 | -- The correspondance between P and the point P(U) on |
86 | -- the implicit curve must be coherent with the way |
87 | -- of determination of the signed distance. |
88 | |
89 | returns Real from Standard |
90 | is static; |
91 | |
92 | |
93 | end ImpTool; |
94 | |
95 | |
96 | |
97 | |
98 | |
99 | |
100 | |
101 | |