1 -- File: Extrema_GenLocateExtPS.cdl
2 -- Created: Tue Jul 18 08:22:37 1995
3 -- Author: Modelistation
5 ---Copyright: Matra Datavision 1995
8 class GenLocateExtPS from Extrema
10 ---Purpose: With a close point, it calculates the distance
11 -- between a point and a surface.
12 -- This distance can be a minimum or a maximum.
14 uses POnSurf from Extrema,
16 Surface from Adaptor3d
18 raises DomainError from Standard,
23 Create returns GenLocateExtPS;
25 Create (P: Pnt; S: Surface from Adaptor3d; U0,V0: Real; TolU,TolV: Real)
26 returns GenLocateExtPS
27 ---Purpose: Calculates the distance with a close point.
28 -- The close point is defined by the parameter values
30 -- The function F(u,v)=distance(S(u,v),p) has an
31 -- extremun when gradient(F)=0. The algorithm searchs
32 -- a zero near the close point.
34 -- if U0,V0 are outside the definition ranges of the
37 IsDone (me) returns Boolean
38 ---Purpose: Returns True if the distance is found.
41 SquareDistance (me) returns Real
42 ---Purpose: Returns the value of the extremum square distance.
43 raises NotDone from StdFail
44 -- if IsDone(me)=False.
47 Point (me) returns POnSurf
48 ---Purpose: Returns the point of the extremum distance.
49 raises NotDone from StdFail
50 -- if IsDone(me)=False.
56 myPoint: POnSurf from Extrema;