1 -- Created on: 1992-08-26
2 -- Created by: Remi GILET
3 -- Copyright (c) 1992-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
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.
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.
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.
22 class MakeDir from gce inherits Root from gce
24 ---Purpose : This class implements the following algorithms used
25 -- to create a Dir from gp.
26 -- * Create a Dir parallel to another and passing
28 -- * Create a Dir passing through 2 points.
29 -- * Create a Dir from its axis (Ax1 from gp).
30 -- * Create a Dir from a point and a direction.
38 raises NotDone from StdFail
42 Create (V : Vec) returns MakeDir;
43 --- Purpose : Normalizes the vector V and creates a direction.
44 -- Status is "NullVector" if V.Magnitude() <= Resolution.
46 Create (Coord : XYZ) returns MakeDir;
47 --- Purpose : Creates a direction from a triplet of coordinates.
48 -- Status is "NullVector" if Coord.Modulus() <=
49 -- Resolution from gp.
51 Create ( Xv, Yv, Zv : Real) returns MakeDir;
52 --- Purpose : Creates a direction with its 3 cartesian coordinates.
53 -- Status is "NullVector" if Sqrt(Xv*Xv + Yv*Yv + Zv*Zv)
56 Create(P1 : Pnt from gp;
57 P2 : Pnt from gp) returns MakeDir;
58 ---Purpose : Make a Dir from gp <TheDir> passing through 2
60 -- Status is "ConfusedPoints" if <p1> and <P2> are confused.
62 -- If an error occurs (that is, when IsDone returns
63 -- false), the Status function returns:
64 -- - gce_ConfusedPoints if points P1 and P2 are coincident, or
65 -- - gce_NullVector if one of the following is less
66 -- than or equal to gp::Resolution():
67 -- - the magnitude of vector V,
68 -- - the modulus of Coord,
69 -- - Sqrt(Xv*Xv + Yv*Yv + Zv*Zv).
71 Value(me) returns Dir from gp
75 ---Purpose: Returns the constructed unit vector.
76 -- Exceptions StdFail_NotDone if no unit vector is constructed.
78 Operator(me) returns Dir from gp
81 ---C++: alias "Standard_EXPORT operator gp_Dir() const;"
86 --The solution from gp.