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