0031642: Visualization - crash in Graphic3d_Structure::SetVisual() on redisplaying...
[occt.git] / src / BRepPrimAPI / BRepPrimAPI_MakeCylinder.hxx
CommitLineData
42cf5bc1 1// Created on: 1993-07-21
2// Created by: Remi LEQUETTE
3// Copyright (c) 1993-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 _BRepPrimAPI_MakeCylinder_HeaderFile
18#define _BRepPrimAPI_MakeCylinder_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <BRepPrim_Cylinder.hxx>
25#include <BRepPrimAPI_MakeOneAxis.hxx>
26#include <Standard_Real.hxx>
27#include <Standard_Address.hxx>
28class Standard_DomainError;
29class gp_Ax2;
30class BRepPrim_Cylinder;
31
32
33//! Describes functions to build cylinders or portions of cylinders.
34//! A MakeCylinder object provides a framework for:
35//! - defining the construction of a cylinder,
36//! - implementing the construction algorithm, and
37//! - consulting the result.
38class BRepPrimAPI_MakeCylinder : public BRepPrimAPI_MakeOneAxis
39{
40public:
41
42 DEFINE_STANDARD_ALLOC
43
44
45 //! Make a cylinder of radius R and length H.
46 Standard_EXPORT BRepPrimAPI_MakeCylinder(const Standard_Real R, const Standard_Real H);
47
48 //! Make a cylinder of radius R and length H with
49 //! angle H.
50 Standard_EXPORT BRepPrimAPI_MakeCylinder(const Standard_Real R, const Standard_Real H, const Standard_Real Angle);
51
52 //! Make a cylinder of radius R and length H.
53 Standard_EXPORT BRepPrimAPI_MakeCylinder(const gp_Ax2& Axes, const Standard_Real R, const Standard_Real H);
54
55 //! Make a cylinder of radius R and length H with
56 //! angle H.
57 //! Constructs
58 //! - a cylinder of radius R and height H, or
59 //! - a portion of cylinder of radius R and height H, and of
60 //! the angle Angle defining the missing portion of the cylinder.
61 //! The cylinder is constructed about the "Z Axis" of either:
62 //! - the global coordinate system, or
63 //! - the local coordinate system Axes.
64 //! It is limited in this coordinate system as follows:
65 //! - in the v parametric direction (the Z axis), by the two
66 //! parameter values 0 and H,
67 //! - and in the u parametric direction (the rotation angle
68 //! around the Z Axis), in the case of a portion of a
69 //! cylinder, by the two parameter values 0 and Angle.
70 //! Angle is given in radians.
71 //! The resulting shape is composed of:
72 //! - a lateral cylindrical face,
73 //! - two planar faces in the planes z = 0 and z = H
74 //! (in the case of a complete cylinder, these faces are circles), and
75 //! - in case of a portion of a cylinder, two additional
76 //! planar faces to close the shape.(two rectangles in the
77 //! planes u = 0 and u = Angle).
78 //! Exceptions Standard_DomainError if:
79 //! - R is less than or equal to Precision::Confusion(), or
80 //! - H is less than or equal to Precision::Confusion().
81 Standard_EXPORT BRepPrimAPI_MakeCylinder(const gp_Ax2& Axes, const Standard_Real R, const Standard_Real H, const Standard_Real Angle);
82
83 //! Returns the algorithm.
84 Standard_EXPORT Standard_Address OneAxis();
85
86 //! Returns the algorithm.
87 Standard_EXPORT BRepPrim_Cylinder& Cylinder();
88
89
90
91
92protected:
93
94
95
96
97
98private:
99
100
101
102 BRepPrim_Cylinder myCylinder;
103
104
105};
106
107
108
109
110
111
112
113#endif // _BRepPrimAPI_MakeCylinder_HeaderFile