Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-11 09:17:16

0001 // Created on: 1993-07-22
0002 // Created by: Remi LEQUETTE
0003 // Copyright (c) 1993-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _BRepPrimAPI_MakeSphere_HeaderFile
0018 #define _BRepPrimAPI_MakeSphere_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 
0023 #include <BRepPrim_Sphere.hxx>
0024 #include <BRepPrimAPI_MakeOneAxis.hxx>
0025 class gp_Pnt;
0026 class gp_Ax2;
0027 
0028 //! Describes functions to build spheres or portions of spheres.
0029 //! A MakeSphere object provides a framework for:
0030 //! -   defining the construction of a sphere,
0031 //! -   implementing the construction algorithm, and
0032 //! -   consulting the result.
0033 class BRepPrimAPI_MakeSphere : public BRepPrimAPI_MakeOneAxis
0034 {
0035 public:
0036   DEFINE_STANDARD_ALLOC
0037 
0038   //! Make a sphere.
0039   //! @param[in] R  sphere radius
0040   Standard_EXPORT BRepPrimAPI_MakeSphere(const double R);
0041 
0042   //! Make a sphere (spherical wedge).
0043   //! @param[in] R      sphere radius
0044   //! @param[in] angle  angle between the radii lying within the bounding semidisks
0045   Standard_EXPORT BRepPrimAPI_MakeSphere(const double R, const double angle);
0046 
0047   //! Make a sphere (spherical segment).
0048   //! @param[in] R  sphere radius
0049   //! @param[in] angle1  first angle defining a spherical segment
0050   //! @param[in] angle2  second angle defining a spherical segment
0051   Standard_EXPORT BRepPrimAPI_MakeSphere(const double R, const double angle1, const double angle2);
0052 
0053   //! Make a sphere (spherical segment).
0054   //! @param[in] R       sphere radius
0055   //! @param[in] angle1  first angle defining a spherical segment
0056   //! @param[in] angle2  second angle defining a spherical segment
0057   //! @param[in] angle3  angle between the radii lying within the bounding semidisks
0058   Standard_EXPORT BRepPrimAPI_MakeSphere(const double R,
0059                                          const double angle1,
0060                                          const double angle2,
0061                                          const double angle3);
0062 
0063   //! Make a sphere.
0064   //! @param[in] Center  sphere center coordinates
0065   //! @param[in] R       sphere radius
0066   Standard_EXPORT BRepPrimAPI_MakeSphere(const gp_Pnt& Center, const double R);
0067 
0068   //! Make a sphere (spherical wedge).
0069   //! @param[in] Center  sphere center coordinates
0070   //! @param[in] R       sphere radius
0071   //! @param[in] angle   angle between the radii lying within the bounding semidisks
0072   Standard_EXPORT BRepPrimAPI_MakeSphere(const gp_Pnt& Center, const double R, const double angle);
0073 
0074   //! Make a sphere (spherical segment).
0075   //! @param[in] Center  sphere center coordinates
0076   //! @param[in] R       sphere radius
0077   //! @param[in] angle1  first angle defining a spherical segment
0078   //! @param[in] angle2  second angle defining a spherical segment
0079   Standard_EXPORT BRepPrimAPI_MakeSphere(const gp_Pnt& Center,
0080                                          const double  R,
0081                                          const double  angle1,
0082                                          const double  angle2);
0083 
0084   //! Make a sphere (spherical segment).
0085   //! @param[in] Center  sphere center coordinates
0086   //! @param[in] R       sphere radius
0087   //! @param[in] angle1  first angle defining a spherical segment
0088   //! @param[in] angle2  second angle defining a spherical segment
0089   //! @param[in] angle3  angle between the radii lying within the bounding semidisks
0090   Standard_EXPORT BRepPrimAPI_MakeSphere(const gp_Pnt& Center,
0091                                          const double  R,
0092                                          const double  angle1,
0093                                          const double  angle2,
0094                                          const double  angle3);
0095 
0096   //! Make a sphere.
0097   //! @param[in] Axis  coordinate system for the construction of the sphere
0098   //! @param[in] R     sphere radius
0099   Standard_EXPORT BRepPrimAPI_MakeSphere(const gp_Ax2& Axis, const double R);
0100 
0101   //! Make a sphere (spherical wedge).
0102   //! @param[in] Axis   coordinate system for the construction of the sphere
0103   //! @param[in] R      sphere radius
0104   //! @param[in] angle  angle between the radii lying within the bounding semidisks
0105   Standard_EXPORT BRepPrimAPI_MakeSphere(const gp_Ax2& Axis, const double R, const double angle);
0106 
0107   //! Make a sphere (spherical segment).
0108   //! @param[in] Axis    coordinate system for the construction of the sphere
0109   //! @param[in] R       sphere radius
0110   //! @param[in] angle1  first angle defining a spherical segment
0111   //! @param[in] angle2  second angle defining a spherical segment
0112   Standard_EXPORT BRepPrimAPI_MakeSphere(const gp_Ax2& Axis,
0113                                          const double  R,
0114                                          const double  angle1,
0115                                          const double  angle2);
0116 
0117   //! Make a sphere of radius R.
0118   //! For all algorithms The resulting shape is composed of
0119   //! -   a lateral spherical face,
0120   //! -   two planar faces parallel to the plane z = 0 if the
0121   //! sphere is truncated in the v parametric direction, or
0122   //! only one planar face if angle1 is equal to -p/2 or if
0123   //! angle2 is equal to p/2 (these faces are circles in
0124   //! case of a complete truncated sphere),
0125   //! -   and in case of a portion of sphere, two planar faces
0126   //! to shut the shape.(in the planes u = 0 and u = angle).
0127   Standard_EXPORT BRepPrimAPI_MakeSphere(const gp_Ax2& Axis,
0128                                          const double  R,
0129                                          const double  angle1,
0130                                          const double  angle2,
0131                                          const double  angle3);
0132 
0133   //! Returns the algorithm.
0134   Standard_EXPORT void* OneAxis() override;
0135 
0136   //! Returns the algorithm.
0137   Standard_EXPORT BRepPrim_Sphere& Sphere();
0138 
0139 private:
0140   BRepPrim_Sphere mySphere;
0141 };
0142 
0143 #endif // _BRepPrimAPI_MakeSphere_HeaderFile