7fd59977 |
1 | -- File: MakeLine.cdl |
2 | -- Created: Mon Sep 28 11:48:51 1992 |
3 | -- Author: Remi GILET |
4 | -- <reg@sdsun2> |
5 | ---Copyright: Matra Datavision 1992 |
6 | |
7 | class MakeLine from GC inherits Root from GC |
8 | |
9 | ---Purpose : This class implements the following algorithms used |
10 | -- to create a Line from Geom. |
11 | -- * Create a Line parallel to another and passing |
12 | -- through a point. |
13 | -- * Create a Line passing through 2 points. |
14 | -- A MakeLine object provides a framework for: |
15 | -- - defining the construction of the line, |
16 | -- - implementing the construction algorithm, and |
17 | -- - consulting the results. In particular, the Value |
18 | -- function returns the constructed line. |
19 | |
20 | uses Pnt from gp, |
21 | Lin from gp, |
22 | Ax1 from gp, |
23 | Dir from gp, |
24 | Line from Geom, |
25 | Real from Standard |
26 | |
27 | raises NotDone from StdFail |
28 | |
29 | is |
30 | |
31 | Create (A1 : Ax1 from gp) returns MakeLine; |
32 | --- Purpose : |
33 | -- Creates a line located in 3D space with the axis placement A1. |
34 | -- The Location of A1 is the origin of the line. |
35 | |
36 | Create (L : Lin from gp) returns MakeLine; |
37 | --- Purpose : |
38 | -- Creates a line from a non persistent line from package gp. |
39 | |
40 | Create (P : Pnt from gp; |
41 | V : Dir from gp) returns MakeLine; |
42 | --- Purpose : |
43 | -- P is the origin and V is the direction of the line. |
44 | |
45 | Create(Lin : Lin from gp; |
46 | Point : Pnt from gp) returns MakeLine; |
47 | ---Purpose : Make a Line from Geom <TheLin> parallel to another |
48 | -- Lin <Lin> and passing through a Pnt <Point>. |
49 | |
50 | Create(P1 : Pnt from gp; |
51 | P2 : Pnt from gp) returns MakeLine; |
52 | ---Purpose : Make a Line from Geom <TheLin> passing through 2 |
53 | -- Pnt <P1>,<P2>. |
54 | -- It returns false if <p1> and <P2> are confused. |
55 | -- Warning |
56 | -- If the points P1 and P2 are coincident (that is, when |
57 | -- IsDone returns false), the Status function returns gce_ConfusedPoints. |
58 | |
59 | Value(me) returns Line from Geom |
60 | raises NotDone |
61 | is static; |
62 | ---Purpose: Returns the constructed line. |
63 | -- Exceptions StdFail_NotDone if no line is constructed. |
64 | ---C++: return const& |
65 | |
66 | Operator(me) returns Line from Geom |
67 | is static; |
68 | ---C++: return const& |
69 | ---C++: alias "Standard_EXPORT operator Handle_Geom_Line() const;" |
70 | |
71 | fields |
72 | |
73 | TheLine : Line from Geom; |
74 | --The solution from Geom. |
75 | |
76 | end MakeLine; |
77 | |
78 | |