7fd59977 |
1 | -- File: Contap_HContToolGen.cdl |
2 | -- Created: Fri Jul 2 13:19:22 1995 |
3 | -- Author: Laurent BUCHARD |
4 | ---Copyright: Matra Datavision 1995 |
5 | |
6 | |
7 | generic class HContToolGen from Contap ( |
8 | TheHVertex as any; |
9 | TheHCurve2d as any; |
10 | TheHSurface as any; |
11 | TheHCurve2dTool as any; |
12 | TheHSurfaceTool as any) |
13 | |
14 | ---Purpose: Tool for the intersection between 2 surfaces. |
15 | -- Regroupe pour l instant les methodes hors Adaptor3d... |
16 | |
17 | |
18 | |
19 | uses |
20 | Pnt2d from gp, |
21 | Pnt from gp |
22 | |
23 | is |
24 | |
25 | |
26 | NbSamplesU(myclass; S: TheHSurface; u1,u2: Real from Standard) |
27 | returns Integer from Standard; |
28 | |
29 | NbSamplesV(myclass; S: TheHSurface; v1,v2: Real from Standard) |
30 | returns Integer from Standard; |
31 | |
32 | -- Methodes pour recherche des points interieurs |
33 | |
34 | NbSamplePoints(myclass; S: TheHSurface) |
35 | |
36 | returns Integer from Standard; |
37 | |
38 | |
39 | SamplePoint(myclass; S : TheHSurface; |
40 | Index: Integer from Standard; |
41 | U,V: out Real from Standard); |
42 | |
43 | |
44 | -- Methodes sur un arc de restriction |
45 | |
46 | HasBeenSeen(myclass; C: TheHCurve2d) |
47 | |
48 | ---Purpose: Returns True if all the intersection point and edges |
49 | -- are known on the Arc. |
50 | -- The intersection point are given as vertices. |
51 | -- The intersection edges are given as intervals between |
52 | -- two vertices. |
53 | |
54 | returns Boolean from Standard; |
55 | |
56 | NbSamplesOnArc(myclass; A: TheHCurve2d) |
57 | |
58 | ---Purpose: returns the number of points which is used to make |
59 | -- a sample on the arc. this number is a function of |
60 | -- the Surface and the CurveOnSurface complexity. |
61 | |
62 | returns Integer from Standard; |
63 | |
64 | |
65 | Bounds(myclass; C: TheHCurve2d; |
66 | Ufirst,Ulast: out Real from Standard); |
67 | |
68 | ---Purpose: Returns the parametric limits on the arc C. |
69 | -- These limits must be finite : they are either |
70 | -- the real limits of the arc, for a finite arc, |
71 | -- or a bounding box for an infinite arc. |
72 | |
73 | |
74 | Project(myclass; C: TheHCurve2d; |
75 | P: Pnt2d from gp; |
76 | Paramproj: out Real from Standard; |
77 | Ptproj : out Pnt2d from gp) |
78 | |
79 | ---Purpose: Projects the point P on the arc C. |
80 | -- If the methods returns Standard_True, the projection is |
81 | -- successful, and Paramproj is the parameter on the arc |
82 | -- of the projected point, Ptproj is the projected Point. |
83 | -- If the method returns Standard_False, Param proj and Ptproj |
84 | -- are not significant. |
85 | -- |
86 | |
87 | returns Boolean from Standard; |
88 | |
89 | |
90 | -- Methods on a vertex |
91 | |
92 | |
93 | Tolerance(myclass; V: TheHVertex; C: TheHCurve2d) |
94 | |
95 | ---Purpose: Returns the parametric tolerance used to consider |
96 | -- that the vertex and another point meet, i-e |
97 | -- if Abs(parameter(Vertex) - parameter(OtherPnt))<= |
98 | -- Tolerance, the points are "merged". |
99 | |
100 | returns Real from Standard; |
101 | |
102 | |
103 | Parameter(myclass; V: TheHVertex; C: TheHCurve2d) |
104 | |
105 | ---Purpose: Returns the parameter of the vertex V on the arc A. |
106 | |
107 | returns Real from Standard; |
108 | |
109 | |
110 | -- The following methods are used when HasBeenSeen returns Standard_True |
111 | |
112 | NbPoints(myclass; C: TheHCurve2d) |
113 | |
114 | ---Purpose: Returns the number of intersection points on the arc A. |
115 | |
116 | returns Integer from Standard; |
117 | |
118 | |
119 | Value(myclass; C: TheHCurve2d; Index: Integer from Standard; |
120 | Pt: out Pnt from gp; Tol: out Real from Standard; |
121 | U: out Real from Standard); |
122 | |
123 | ---Purpose: Returns the value (Pt), the tolerance (Tol), and |
124 | -- the parameter (U) on the arc A , of the intersection |
125 | -- point of range Index. |
126 | |
127 | |
128 | IsVertex(myclass; C: TheHCurve2d; |
129 | Index: Integer from Standard) |
130 | |
131 | ---Purpose: Returns True if the intersection point of range Index |
132 | -- corresponds with a vertex on the arc A. |
133 | |
134 | returns Boolean from Standard; |
135 | |
136 | |
137 | Vertex(myclass; C: TheHCurve2d; Index: Integer from Standard; |
138 | V: out TheHVertex); |
139 | |
140 | ---Purpose: When IsVertex returns True, this method returns the |
141 | -- vertex on the arc A. |
142 | |
143 | |
144 | NbSegments(myclass; C: TheHCurve2d) |
145 | |
146 | ---Purpose: returns the number of part of A solution of the |
147 | -- of intersection problem. |
148 | |
149 | returns Integer from Standard; |
150 | |
151 | |
152 | HasFirstPoint(myclass; C: TheHCurve2d; |
153 | Index: Integer from Standard; |
154 | IndFirst: out Integer from Standard) |
155 | |
156 | ---Purpose: Returns True when the segment of range Index is not |
157 | -- open at the left side. In that case, IndFirst is the |
158 | -- range in the list intersection points (see NbPoints) |
159 | -- of the one which defines the left bound of the segment. |
160 | -- Otherwise, the method has to return False, and IndFirst |
161 | -- has no meaning. |
162 | |
163 | returns Boolean from Standard; |
164 | |
165 | |
166 | HasLastPoint(myclass; C: TheHCurve2d; |
167 | Index: Integer from Standard; |
168 | IndLast: out Integer from Standard) |
169 | |
170 | ---Purpose: Returns True when the segment of range Index is not |
171 | -- open at the right side. In that case, IndLast is the |
172 | -- range in the list intersection points (see NbPoints) |
173 | -- of the one which defines the right bound of the segment. |
174 | -- Otherwise, the method has to return False, and IndLast |
175 | -- has no meaning. |
176 | |
177 | returns Boolean from Standard; |
178 | |
179 | |
180 | IsAllSolution(myclass; C: TheHCurve2d) |
181 | |
182 | ---Purpose: Returns True when the whole restriction is solution |
183 | -- of the intersection problem. |
184 | |
185 | returns Boolean from Standard; |
186 | |
187 | |
188 | end HContToolGen; |