Integration of OCCT 6.5.0 from SVN
[occt.git] / src / gce / gce_MakeCone.cdl
CommitLineData
7fd59977 1-- File: MakeCone.cdl
2-- Created: Wed Aug 26 14:30:57 1992
3-- Author: Remi GILET
4-- <reg@topsn3>
5---Copyright: Matra Datavision 1992
6
7class MakeCone from gce inherits Root from gce
8
9 ---Purpose : This class implements the following algorithms used
10 -- to create a Cone from gp.
11 -- * Create a Cone coaxial to another and passing
12 -- through a point.
13 -- * Create a Cone coaxial to another at a distance
14 -- <Dist>.
15 -- * Create a Cone by 4 points.
16 -- * Create a Cone by its axis and 2 points.
17 -- * Create a Cone by 2 points and 2 radius.
18 -- * Create a Cone by an Ax2 an angle and the radius of
19 -- its reference section.
20
21uses Pnt from gp,
22 Ax1 from gp,
23 Lin from gp,
24 Cone from gp,
25 Ax2 from gp,
26 Real from Standard
27
28raises NotDone from StdFail
29
30is
31
32Create (A2 : Ax2 from gp ;
33 Ang : Real from Standard ;
34 Radius : Real from Standard ) returns MakeCone;
35 --- Purpose :
36 -- Creates an infinite conical surface. A2 locates the cone
37 -- in the space and defines the reference plane of the surface.
38 -- Ang is the conical surface semi-angle between 0 and PI/2 radians.
39 -- Radius is the radius of the circle in the reference plane of
40 -- the cone.
41 -- If Radius is lower than 0.0 the status is "
42 -- If Ang < Resolution from gp or Ang >= (PI/2) - Resolution.
43
44Create(Cone : Cone from gp;
45 Point : Pnt from gp) returns MakeCone;
46 ---Purpose : Makes a Cone from gp <TheCone> coaxial to another
47 -- Cone <Cone> and passing through a Pnt <Point>.
48
49Create(Cone : Cone from gp ;
50 Dist : Real from Standard) returns MakeCone;
51 ---Purpose : Makes a Cone from gp <TheCone> coaxial to another
52 -- Cone <Cone> at the distance <Dist> which can
53 -- be greater or lower than zero.
54
55Create(P1 : Pnt from gp;
56 P2 : Pnt from gp;
57 P3 : Pnt from gp;
58 P4 : Pnt from gp) returns MakeCone;
59 ---Purpose : Makes a Cone from gp <TheCone> by four points <P1>,
60 -- <P2>,<P3> and <P4>.
61 -- Its axis is <P1P2> and the radius of its base is
62 -- the distance between <P3> and <P1P2>.
63 -- The distance between <P4> and <P1P2> is the radius of
64 -- the section passing through <P4>.
65 -- If <P1> and <P2> are confused or <P3> and <P4> are
66 -- confused we have the status "ConfusedPoints"
67 -- if <P1>,<P2>,<P3>,<P4> are colinear we have the
68 -- status "ColinearPoints"
69 -- If <P3P4> is perpendicular to <P1P2> we have the
70 -- status "NullAngle".
71 -- <P3P4> is colinear to <P1P2> we have the status
72 -- "NullAngle".
73
74Create(Axis : Ax1 from gp;
75 P1,P2 : Pnt from gp) returns MakeCone;
76 ---Purpose: Makes a Cone by its axis <Axis> and and two points.
77 -- The distance between <P1> and the axis is the radius
78 -- of the section passing through <P1>.
79 -- The distance between <P2> and the axis is the radius
80 -- of the section passing through <P2>.
81 -- If <P1P2> is colinear to <Axis> we have the status
82 -- "NullAngle"
83 -- If <P3P4> is perpendicular to <Axis> we have the status
84 -- "NullAngle"
85 -- If <P1> and <P2> are confused we have the status
86 -- "ConfusedPoints"
87
88Create(Axis : Lin from gp;
89 P1,P2 : Pnt from gp) returns MakeCone;
90 ---Purpose: Makes a Cone by its axis <Axis> and and two points.
91 -- The distance between <P1> and the axis is the radius
92 -- of the section passing through <P1>
93 -- The distance between <P2> and the axis is the radius
94 -- of the section passing through <P2>
95 -- If <P1P2> is colinear to <Axis> we have the status
96 -- "NullAngle"
97 -- If <P3P4> is perpendicular to <Axis> we have the status
98 -- "NullAngle"
99 -- If <P1> and <P2> are confused we have the status
100 -- "ConfusedPoints"
101
102Create(P1 : Pnt from gp ;
103 P2 : Pnt from gp ;
104 R1 : Real from Standard;
105 R2 : Real from Standard) returns MakeCone;
106 ---Purpose: Makes a Cone with two points and two radius.
107 -- The axis of the solution is the line passing through
108 -- <P1> and <P2>.
109 -- <R1> is the radius of the section passing through <P1>
110 -- and <R2> the radius of the section passing through <P2>.
111 -- If <P1> and <P2> are confused we have the status "NullAxis".
112 -- Warning
113 -- If an error occurs (that is, when IsDone returns
114 -- false), the Status function returns:
115 -- - gce_NegativeRadius if Radius, R1 or R2 is less than 0.0;
116 -- - gce_BadAngle if Ang is less than
117 -- gp::Resolution() or greater than Pi/2.- gp::Resolution();
118 -- - gce_ConfusedPoints if P1 and P2 or P3 and P4 are coincident;
119 -- - gce_NullAxis if the points P1 and P2, are coincident (5th syntax only);
120 -- - gce_NullAngle if:
121 -- - the vector joining P1 to P2 is parallel to either
122 -- Axis or the line joining P3 to P4, or
123 -- - R1 and R2 are equal, (that is, their difference is
124 -- less than gp::Resolution()); or
125 -- - gce_NullRadius if:
126 -- - the vector joining P1 to P2 is perpendicular to the line joining P3 to P4,
127 -- - the vector joining P1 to P2 is perpendicular to Axis, or
128 -- - P1, P2, P3, and P4 are collinear.
129
130Value(me) returns Cone from gp
131 raises NotDone
132 is static;
133 ---C++: return const&
134 ---Purpose: Returns the constructed cone.
135 -- Exceptions StdFail_NotDone if no cone is constructed.
136
137Operator(me) returns Cone from gp
138 is static;
139 ---C++: return const&
140 ---C++: alias "Standard_EXPORT operator gp_Cone() const;"
141
142fields
143
144 TheCone : Cone from gp;
145 --The solution from gp.
146
147end MakeCone;