1 // Created on: 1993-07-22
2 // Created by: Remi LEQUETTE
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _BRepPrimAPI_MakeSphere_HeaderFile
18 #define _BRepPrimAPI_MakeSphere_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <BRepPrim_Sphere.hxx>
25 #include <BRepPrimAPI_MakeOneAxis.hxx>
26 #include <Standard_Real.hxx>
27 #include <Standard_Address.hxx>
28 class Standard_DomainError;
31 class BRepPrim_Sphere;
34 //! Describes functions to build spheres or portions of spheres.
35 //! A MakeSphere object provides a framework for:
36 //! - defining the construction of a sphere,
37 //! - implementing the construction algorithm, and
38 //! - consulting the result.
39 class BRepPrimAPI_MakeSphere : public BRepPrimAPI_MakeOneAxis
46 //! Make a sphere of radius R.
47 Standard_EXPORT BRepPrimAPI_MakeSphere(const Standard_Real R);
49 //! Make a sphere of radius R.
50 Standard_EXPORT BRepPrimAPI_MakeSphere(const Standard_Real R, const Standard_Real angle);
52 //! Make a sphere of radius R.
53 Standard_EXPORT BRepPrimAPI_MakeSphere(const Standard_Real R, const Standard_Real angle1, const Standard_Real angle2);
55 //! Make a sphere of radius R.
56 Standard_EXPORT BRepPrimAPI_MakeSphere(const Standard_Real R, const Standard_Real angle1, const Standard_Real angle2, const Standard_Real angle3);
58 //! Make a sphere of radius R.
59 Standard_EXPORT BRepPrimAPI_MakeSphere(const gp_Pnt& Center, const Standard_Real R);
61 //! Make a sphere of radius R.
62 Standard_EXPORT BRepPrimAPI_MakeSphere(const gp_Pnt& Center, const Standard_Real R, const Standard_Real angle);
64 //! Make a sphere of radius R.
65 Standard_EXPORT BRepPrimAPI_MakeSphere(const gp_Pnt& Center, const Standard_Real R, const Standard_Real angle1, const Standard_Real angle2);
67 //! Make a sphere of radius R.
68 Standard_EXPORT BRepPrimAPI_MakeSphere(const gp_Pnt& Center, const Standard_Real R, const Standard_Real angle1, const Standard_Real angle2, const Standard_Real angle3);
70 //! Make a sphere of radius R.
71 Standard_EXPORT BRepPrimAPI_MakeSphere(const gp_Ax2& Axis, const Standard_Real R);
73 //! Make a sphere of radius R.
74 Standard_EXPORT BRepPrimAPI_MakeSphere(const gp_Ax2& Axis, const Standard_Real R, const Standard_Real angle);
76 //! Make a sphere of radius R.
77 Standard_EXPORT BRepPrimAPI_MakeSphere(const gp_Ax2& Axis, const Standard_Real R, const Standard_Real angle1, const Standard_Real angle2);
79 //! Make a sphere of radius R.
80 //! For all algorithms The resulting shape is composed of
81 //! - a lateral spherical face,
82 //! - two planar faces parallel to the plane z = 0 if the
83 //! sphere is truncated in the v parametric direction, or
84 //! only one planar face if angle1 is equal to -p/2 or if
85 //! angle2 is equal to p/2 (these faces are circles in
86 //! case of a complete truncated sphere),
87 //! - and in case of a portion of sphere, two planar faces
88 //! to shut the shape.(in the planes u = 0 and u = angle).
89 Standard_EXPORT BRepPrimAPI_MakeSphere(const gp_Ax2& Axis, const Standard_Real R, const Standard_Real angle1, const Standard_Real angle2, const Standard_Real angle3);
91 //! Returns the algorithm.
92 Standard_EXPORT Standard_Address OneAxis();
94 //! Returns the algorithm.
95 Standard_EXPORT BRepPrim_Sphere& Sphere();
110 BRepPrim_Sphere mySphere;
121 #endif // _BRepPrimAPI_MakeSphere_HeaderFile