1 -- Created on: 1992-08-26
2 -- Created by: Remi GILET
3 -- Copyright (c) 1992-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
8 -- This library is free software; you can redistribute it and / or modify it
9 -- under the terms of the GNU Lesser General Public version 2.1 as published
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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class MakeLin2d from gce inherits Root from gce
19 ---Purpose : This class implements the following algorithms used
20 -- to create Lin2d from gp.
22 -- * Create a Lin2d parallel to another and passing
24 -- * Create a Lin2d parallel to another at the distance
26 -- * Create a Lin2d passing through 2 points.
27 -- * Create a Lin2d from its axis (Ax1 from gp).
28 -- * Create a Lin2d from a point and a direction.
29 -- * Create a Lin2d from its equation.
37 raises NotDone from StdFail
41 Create (A : Ax2d from gp) returns MakeLin2d;
42 --- Purpose : Creates a line located with A.
44 Create (P : Pnt2d from gp;
45 V : Dir2d from gp) returns MakeLin2d;
47 -- <P> is the location point (origin) of the line and
48 -- <V> is the direction of the line.
50 Create (A, B, C : Real) returns MakeLin2d;
52 -- Creates the line from the equation A*X + B*Y + C = 0.0
53 -- the status is "NullAxis"if Sqrt(A*A + B*B) <= Resolution from gp.
55 Create(Lin : Lin2d from gp ;
56 Dist : Real from Standard) returns MakeLin2d;
57 ---Purpose : Make a Lin2d from gp <TheLin> parallel to another
58 -- Lin2d <Lin> at a distance <Dist>.
59 -- If Dist is greater than zero the result is on the
60 -- right of the Line <Lin>, else the result is on the
61 -- left of the Line <Lin>.
63 Create(Lin : Lin2d from gp;
64 Point : Pnt2d from gp) returns MakeLin2d;
65 ---Purpose : Make a Lin2d from gp <TheLin> parallel to another
66 -- Lin2d <Lin> and passing through a Pnt2d <Point>.
68 Create(P1 : Pnt2d from gp;
69 P2 : Pnt2d from gp) returns MakeLin2d;
70 ---Purpose : Make a Lin2d from gp <TheLin> passing through 2
72 -- It returns false if <P1> and <P2> are confused.
74 -- If an error occurs (that is, when IsDone returns
75 -- false), the Status function returns:
76 -- - gce_NullAxis if Sqrt(A*A + B*B) is less
77 -- than or equal to gp::Resolution(), or
78 -- - gce_ConfusedPoints if points P1 and P2 are coincident.
80 Value(me) returns Lin2d from gp
83 ---Purpose: Returns the constructed line.
84 -- Exceptions StdFail_NotDone if no line is constructed.
86 Operator(me) returns Lin2d from gp
88 ---C++: alias "Standard_EXPORT operator gp_Lin2d() const;"
92 TheLin2d : Lin2d from gp;
93 --The solution from gp.