|
|
|||
File indexing completed on 2026-06-13 08:29:55
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 Standard_Real 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 Standard_Real R, const Standard_Real 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 Standard_Real R, 0052 const Standard_Real angle1, 0053 const Standard_Real angle2); 0054 0055 //! Make a sphere (spherical segment). 0056 //! @param[in] R sphere radius 0057 //! @param[in] angle1 first angle defining a spherical segment 0058 //! @param[in] angle2 second angle defining a spherical segment 0059 //! @param[in] angle3 angle between the radii lying within the bounding semidisks 0060 Standard_EXPORT BRepPrimAPI_MakeSphere(const Standard_Real R, 0061 const Standard_Real angle1, 0062 const Standard_Real angle2, 0063 const Standard_Real angle3); 0064 0065 //! Make a sphere. 0066 //! @param[in] Center sphere center coordinates 0067 //! @param[in] R sphere radius 0068 Standard_EXPORT BRepPrimAPI_MakeSphere(const gp_Pnt& Center, const Standard_Real R); 0069 0070 //! Make a sphere (spherical wedge). 0071 //! @param[in] Center sphere center coordinates 0072 //! @param[in] R sphere radius 0073 //! @param[in] angle angle between the radii lying within the bounding semidisks 0074 Standard_EXPORT BRepPrimAPI_MakeSphere(const gp_Pnt& Center, 0075 const Standard_Real R, 0076 const Standard_Real angle); 0077 0078 //! Make a sphere (spherical segment). 0079 //! @param[in] Center sphere center coordinates 0080 //! @param[in] R sphere radius 0081 //! @param[in] angle1 first angle defining a spherical segment 0082 //! @param[in] angle2 second angle defining a spherical segment 0083 Standard_EXPORT BRepPrimAPI_MakeSphere(const gp_Pnt& Center, 0084 const Standard_Real R, 0085 const Standard_Real angle1, 0086 const Standard_Real angle2); 0087 0088 //! Make a sphere (spherical segment). 0089 //! @param[in] Center sphere center coordinates 0090 //! @param[in] R sphere radius 0091 //! @param[in] angle1 first angle defining a spherical segment 0092 //! @param[in] angle2 second angle defining a spherical segment 0093 //! @param[in] angle3 angle between the radii lying within the bounding semidisks 0094 Standard_EXPORT BRepPrimAPI_MakeSphere(const gp_Pnt& Center, 0095 const Standard_Real R, 0096 const Standard_Real angle1, 0097 const Standard_Real angle2, 0098 const Standard_Real angle3); 0099 0100 //! Make a sphere. 0101 //! @param[in] Axis coordinate system for the construction of the sphere 0102 //! @param[in] R sphere radius 0103 Standard_EXPORT BRepPrimAPI_MakeSphere(const gp_Ax2& Axis, const Standard_Real R); 0104 0105 //! Make a sphere (spherical wedge). 0106 //! @param[in] Axis coordinate system for the construction of the sphere 0107 //! @param[in] R sphere radius 0108 //! @param[in] angle angle between the radii lying within the bounding semidisks 0109 Standard_EXPORT BRepPrimAPI_MakeSphere(const gp_Ax2& Axis, 0110 const Standard_Real R, 0111 const Standard_Real angle); 0112 0113 //! Make a sphere (spherical segment). 0114 //! @param[in] Axis coordinate system for the construction of the sphere 0115 //! @param[in] R sphere radius 0116 //! @param[in] angle1 first angle defining a spherical segment 0117 //! @param[in] angle2 second angle defining a spherical segment 0118 Standard_EXPORT BRepPrimAPI_MakeSphere(const gp_Ax2& Axis, 0119 const Standard_Real R, 0120 const Standard_Real angle1, 0121 const Standard_Real angle2); 0122 0123 //! Make a sphere of radius R. 0124 //! For all algorithms The resulting shape is composed of 0125 //! - a lateral spherical face, 0126 //! - two planar faces parallel to the plane z = 0 if the 0127 //! sphere is truncated in the v parametric direction, or 0128 //! only one planar face if angle1 is equal to -p/2 or if 0129 //! angle2 is equal to p/2 (these faces are circles in 0130 //! case of a complete truncated sphere), 0131 //! - and in case of a portion of sphere, two planar faces 0132 //! to shut the shape.(in the planes u = 0 and u = angle). 0133 Standard_EXPORT BRepPrimAPI_MakeSphere(const gp_Ax2& Axis, 0134 const Standard_Real R, 0135 const Standard_Real angle1, 0136 const Standard_Real angle2, 0137 const Standard_Real angle3); 0138 0139 //! Returns the algorithm. 0140 Standard_EXPORT Standard_Address OneAxis(); 0141 0142 //! Returns the algorithm. 0143 Standard_EXPORT BRepPrim_Sphere& Sphere(); 0144 0145 protected: 0146 private: 0147 BRepPrim_Sphere mySphere; 0148 }; 0149 0150 #endif // _BRepPrimAPI_MakeSphere_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|