b311480e |
1 | -- Created on: 1991-10-09 |
2 | -- Created by: Michel CHAUVAT |
3 | -- Copyright (c) 1991-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 | generic class ExtPSOfRev from Extrema (SurfaceOfRevolution as any; |
24 | Tool as any ; -- as ToolSurfaceOfRevolution(SurfaceOfRevolution) |
25 | Curve as any; |
26 | ToolCurve as any; -- as ToolCurve(Curve) |
27 | TheExtPC as any |
28 | ) |
29 | ---Purpose: It calculates all the extremum distances |
30 | -- between a point and a surface. |
31 | -- These distances can be minimum or maximum. |
32 | |
33 | uses POnSurf from Extrema, |
34 | SequenceOfPOnSurf from Extrema, |
35 | Pnt from gp, |
36 | SequenceOfReal from TColStd |
37 | |
38 | raises NotDone from StdFail, |
39 | OutOfRange from Standard |
40 | |
41 | is |
42 | Create (P: Pnt; S: SurfaceOfRevolution; Tol: Real; NbV: Integer; |
43 | TolV: Real) returns ExtPSOfRev; |
44 | ---Purpose: It calculates all the distances between a point |
45 | -- and a surface of revolution. |
46 | -- Tol is used to test if the point is on the axis. |
47 | -- NbV and TolV are used to compute the extrema on a |
48 | -- meridian (see ExtPC.cdl). |
49 | |
50 | IsDone (me) returns Boolean |
51 | ---Purpose: Returns True if the distances are found. |
52 | is static; |
53 | |
54 | NbExt (me) returns Integer |
55 | ---Purpose: Returns the number of extremum distances. |
56 | raises NotDone from StdFail |
57 | -- if IsDone(me)=False. |
58 | is static; |
59 | |
60 | SquareDistance (me; N: Integer) returns Real |
61 | ---Purpose: Returns the value of the Nth resulting square distance. |
62 | raises NotDone from StdFail, |
63 | -- if IsDone(me)=False. |
64 | OutOfRange |
65 | -- if N < 1 or N > NbPoints(me). |
66 | is static; |
67 | |
68 | Point (me; N: Integer) returns POnSurf |
5d99f2c8 |
69 | ---C++: return const & |
7fd59977 |
70 | ---Purpose: Returns the point of the Nth resulting distance. |
71 | raises NotDone from StdFail, |
72 | -- if IsDone(me)=False. |
73 | OutOfRange |
74 | -- if N < 1 or N > NbPoints(me). |
75 | is static; |
76 | |
77 | fields |
78 | myDone : Boolean; |
79 | mySqDist: SequenceOfReal from TColStd; |
80 | myPoint: SequenceOfPOnSurf from Extrema; |
81 | |
82 | end ExtPSOfRev; |