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