0024023: Revamp the OCCT Handle -- GC
[occt.git] / src / GC / GC_MakeLine.cdl
CommitLineData
b311480e 1-- Created on: 1992-09-28
2-- Created by: Remi GILET
3-- Copyright (c) 1992-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
17class MakeLine from GC inherits Root from GC
18
19 ---Purpose : This class implements the following algorithms used
20 -- to create a Line from Geom.
21 -- * Create a Line parallel to another and passing
22 -- through a point.
23 -- * Create a Line passing through 2 points.
24 -- A MakeLine object provides a framework for:
25 -- - defining the construction of the line,
26 -- - implementing the construction algorithm, and
27 -- - consulting the results. In particular, the Value
28 -- function returns the constructed line.
29
30uses Pnt from gp,
31 Lin from gp,
32 Ax1 from gp,
33 Dir from gp,
34 Line from Geom,
35 Real from Standard
36
37raises NotDone from StdFail
38
39is
40
41Create (A1 : Ax1 from gp) returns MakeLine;
42 --- Purpose :
43 -- Creates a line located in 3D space with the axis placement A1.
44 -- The Location of A1 is the origin of the line.
45
46Create (L : Lin from gp) returns MakeLine;
47 --- Purpose :
48 -- Creates a line from a non persistent line from package gp.
49
50Create (P : Pnt from gp;
51 V : Dir from gp) returns MakeLine;
52 --- Purpose :
53 -- P is the origin and V is the direction of the line.
54
55Create(Lin : Lin from gp;
56 Point : Pnt from gp) returns MakeLine;
57 ---Purpose : Make a Line from Geom <TheLin> parallel to another
58 -- Lin <Lin> and passing through a Pnt <Point>.
59
60Create(P1 : Pnt from gp;
61 P2 : Pnt from gp) returns MakeLine;
62 ---Purpose : Make a Line from Geom <TheLin> passing through 2
63 -- Pnt <P1>,<P2>.
64 -- It returns false if <p1> and <P2> are confused.
65 -- Warning
66 -- If the points P1 and P2 are coincident (that is, when
67 -- IsDone returns false), the Status function returns gce_ConfusedPoints.
68
69Value(me) returns Line from Geom
70 raises NotDone
71 is static;
72 ---Purpose: Returns the constructed line.
73 -- Exceptions StdFail_NotDone if no line is constructed.
74 ---C++: return const&
83eaf3e8 75 ---C++: alias "operator const Handle(Geom_Line)& () const { return Value(); }"
7fd59977 76
77fields
78
79 TheLine : Line from Geom;
80 --The solution from Geom.
81
82end MakeLine;
83
84