b311480e |
1 | -- Created on: 1992-09-28 |
2 | -- Created by: Remi GILET |
3 | -- Copyright (c) 1992-1999 Matra Datavision |
4 | -- Copyright (c) 1999-2012 OPEN CASCADE SAS |
5 | -- |
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. |
10 | -- |
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. |
13 | -- |
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. |
20 | |
7fd59977 |
21 | |
22 | class MakeCylindricalSurface from GC inherits Root from GC |
23 | |
24 | ---Purpose : This class implements the following algorithms used |
25 | -- to create a CylindricalSurface from Geom. |
26 | -- * Create a CylindricalSurface parallel to another and |
27 | -- passing through a point. |
28 | -- * Create a CylindricalSurface parallel to another at a |
29 | -- distance |
30 | -- <Dist>. |
31 | -- * Create a CylindricalSurface passing through 3 points. |
32 | -- * Create a CylindricalSurface by its axis and radius. |
33 | -- * Create a cylindricalSurface by its circular base. |
34 | -- The local coordinate system of the CylindricalSurface is defined |
35 | -- with an axis placement (see class ElementarySurface). |
36 | -- |
37 | -- The "ZAxis" is the symmetry axis of the CylindricalSurface, |
38 | -- it gives the direction of increasing parametric value V. |
39 | -- |
40 | -- The parametrization range is : |
41 | -- U [0, 2*PI], V ]- infinite, + infinite[ |
42 | -- |
43 | -- The "XAxis" and the "YAxis" define the placement plane of the |
44 | -- surface (Z = 0, and parametric value V = 0) perpendicular to |
45 | -- the symmetry axis. The "XAxis" defines the origin of the |
46 | -- parameter U = 0. The trigonometric sense gives the positive |
47 | -- orientation for the parameter U. |
48 | |
49 | uses Pnt from gp, |
50 | Ax1 from gp, |
51 | Ax2 from gp, |
52 | Circ from gp, |
53 | Cylinder from gp, |
54 | CylindricalSurface from Geom, |
55 | Real from Standard |
56 | |
57 | raises NotDone from StdFail |
58 | |
59 | is |
60 | |
61 | Create (A2 : Ax2; Radius : Real) returns MakeCylindricalSurface; |
62 | --- Purpose : |
63 | -- A2 defines the local coordinate system of the cylindrical surface. |
64 | -- The "ZDirection" of A2 defines the direction of the surface's |
65 | -- axis of symmetry. |
66 | -- At the creation the parametrization of the surface is defined |
67 | -- such that the normal Vector (N = D1U ^ D1V) is oriented towards |
68 | -- the "outside region" of the surface. |
69 | -- Warnings : |
70 | -- It is not forbidden to create a cylindrical surface with |
71 | -- Radius = 0.0 |
72 | --- Status is "NegativeRadius" if Radius < 0.0 |
73 | |
74 | Create (C : Cylinder from gp) returns MakeCylindricalSurface; |
75 | --- Purpose : |
76 | -- Creates a CylindricalSurface from a non persistent Cylinder |
77 | -- from package gp. |
78 | |
79 | Create(Cyl : Cylinder from gp; |
80 | Point : Pnt from gp) returns MakeCylindricalSurface; |
81 | ---Purpose : Make a CylindricalSurface from Geom <TheCylinder> |
82 | -- parallel to another |
83 | -- CylindricalSurface <Cylinder> and passing through a |
84 | -- Pnt <Point>. |
85 | |
86 | Create(Cyl : Cylinder from gp ; |
87 | Dist : Real from Standard) returns MakeCylindricalSurface; |
88 | ---Purpose : Make a CylindricalSurface from Geom <TheCylinder> |
89 | -- parallel to another |
90 | -- CylindricalSurface <Cylinder> at the distance <Dist> |
91 | -- which can be greater or lower than zero. |
92 | -- The radius of the result is the absolute value of the |
93 | -- radius of <Cyl> plus <Dist> |
94 | |
95 | Create(P1 : Pnt from gp; |
96 | P2 : Pnt from gp; |
97 | P3 : Pnt from gp) returns MakeCylindricalSurface; |
98 | ---Purpose : Make a CylindricalSurface from Geom <TheCylinder> |
99 | -- passing through 3 Pnt <P1>,<P2>,<P3>. |
100 | -- Its axis is <P1P2> and its radius is the distance |
101 | -- between <P3> and <P1P2> |
102 | |
103 | Create(Axis : Ax1 from gp ; |
104 | Radius : Real from Standard) returns MakeCylindricalSurface; |
105 | ---Purpose: Make a CylindricalSurface by its axis <Axis> and radius |
106 | -- <Radius>. |
107 | |
108 | Create(Circ : Circ from gp) returns MakeCylindricalSurface; |
109 | ---Purpose: Make a CylindricalSurface by its circular base. |
110 | |
111 | Value(me) returns CylindricalSurface from Geom |
112 | raises NotDone |
113 | is static; |
114 | ---Purpose: Returns the constructed cylinder. |
115 | -- Exceptions StdFail_NotDone if no cylinder is constructed. |
116 | ---C++: return const& |
117 | |
118 | Operator(me) returns CylindricalSurface from Geom |
119 | is static; |
120 | ---C++: return const& |
121 | ---C++: alias "Standard_EXPORT operator Handle_Geom_CylindricalSurface() const;" |
122 | |
123 | fields |
124 | |
125 | TheCylinder : CylindricalSurface from Geom; |
126 | --The solution from Geom. |
127 | |
128 | end MakeCylindricalSurface; |
129 | |
130 | |
131 | |
132 | |