0027111: Add generalized copy constructor in handle class for old compilers
[occt.git] / src / GC / GC_MakeCylindricalSurface.hxx
... / ...
CommitLineData
1// Created on: 1992-09-28
2// Created by: Remi GILET
3// Copyright (c) 1992-1999 Matra Datavision
4// Copyright (c) 1999-2014 OPEN CASCADE SAS
5//
6// This file is part of Open CASCADE Technology software library.
7//
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
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.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _GC_MakeCylindricalSurface_HeaderFile
18#define _GC_MakeCylindricalSurface_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <GC_Root.hxx>
25#include <Geom_CylindricalSurface.hxx>
26
27class StdFail_NotDone;
28class gp_Ax2;
29class gp_Cylinder;
30class gp_Pnt;
31class gp_Ax1;
32class gp_Circ;
33
34
35//! This class implements the following algorithms used
36//! to create a CylindricalSurface from Geom.
37//! * Create a CylindricalSurface parallel to another and
38//! passing through a point.
39//! * Create a CylindricalSurface parallel to another at a
40//! distance
41//! <Dist>.
42//! * Create a CylindricalSurface passing through 3 points.
43//! * Create a CylindricalSurface by its axis and radius.
44//! * Create a cylindricalSurface by its circular base.
45//! The local coordinate system of the CylindricalSurface is defined
46//! with an axis placement (see class ElementarySurface).
47//!
48//! The "ZAxis" is the symmetry axis of the CylindricalSurface,
49//! it gives the direction of increasing parametric value V.
50//!
51//! The parametrization range is :
52//! U [0, 2*PI], V ]- infinite, + infinite[
53//!
54//! The "XAxis" and the "YAxis" define the placement plane of the
55//! surface (Z = 0, and parametric value V = 0) perpendicular to
56//! the symmetry axis. The "XAxis" defines the origin of the
57//! parameter U = 0. The trigonometric sense gives the positive
58//! orientation for the parameter U.
59class GC_MakeCylindricalSurface : public GC_Root
60{
61public:
62
63 DEFINE_STANDARD_ALLOC
64
65
66
67 //! A2 defines the local coordinate system of the cylindrical surface.
68 //! The "ZDirection" of A2 defines the direction of the surface's
69 //! axis of symmetry.
70 //! At the creation the parametrization of the surface is defined
71 //! such that the normal Vector (N = D1U ^ D1V) is oriented towards
72 //! the "outside region" of the surface.
73 //! Warnings :
74 //! It is not forbidden to create a cylindrical surface with
75 //! Radius = 0.0
76 //! Status is "NegativeRadius" if Radius < 0.0
77 Standard_EXPORT GC_MakeCylindricalSurface(const gp_Ax2& A2, const Standard_Real Radius);
78
79
80 //! Creates a CylindricalSurface from a non persistent Cylinder
81 //! from package gp.
82 Standard_EXPORT GC_MakeCylindricalSurface(const gp_Cylinder& C);
83
84 //! Make a CylindricalSurface from Geom <TheCylinder>
85 //! parallel to another
86 //! CylindricalSurface <Cylinder> and passing through a
87 //! Pnt <Point>.
88 Standard_EXPORT GC_MakeCylindricalSurface(const gp_Cylinder& Cyl, const gp_Pnt& Point);
89
90 //! Make a CylindricalSurface from Geom <TheCylinder>
91 //! parallel to another
92 //! CylindricalSurface <Cylinder> at the distance <Dist>
93 //! which can be greater or lower than zero.
94 //! The radius of the result is the absolute value of the
95 //! radius of <Cyl> plus <Dist>
96 Standard_EXPORT GC_MakeCylindricalSurface(const gp_Cylinder& Cyl, const Standard_Real Dist);
97
98 //! 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 Standard_EXPORT GC_MakeCylindricalSurface(const gp_Pnt& P1, const gp_Pnt& P2, const gp_Pnt& P3);
103
104 //! Make a CylindricalSurface by its axis <Axis> and radius
105 //! <Radius>.
106 Standard_EXPORT GC_MakeCylindricalSurface(const gp_Ax1& Axis, const Standard_Real Radius);
107
108 //! Make a CylindricalSurface by its circular base.
109 Standard_EXPORT GC_MakeCylindricalSurface(const gp_Circ& Circ);
110
111 //! Returns the constructed cylinder.
112 //! Exceptions StdFail_NotDone if no cylinder is constructed.
113 Standard_EXPORT const Handle(Geom_CylindricalSurface)& Value() const;
114
115 operator const Handle(Geom_CylindricalSurface)& () const { return Value(); }
116
117private:
118 Handle(Geom_CylindricalSurface) TheCylinder;
119};
120
121#endif // _GC_MakeCylindricalSurface_HeaderFile