|
||||
File indexing completed on 2025-01-18 10:03:16
0001 // Created on: 1993-07-21 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_MakeTorus_HeaderFile 0018 #define _BRepPrimAPI_MakeTorus_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 #include <Standard_Handle.hxx> 0023 0024 #include <BRepPrim_Torus.hxx> 0025 #include <BRepPrimAPI_MakeOneAxis.hxx> 0026 class gp_Ax2; 0027 0028 0029 //! Describes functions to build tori or portions of tori. 0030 //! A MakeTorus object provides a framework for: 0031 //! - defining the construction of a torus, 0032 //! - implementing the construction algorithm, and 0033 //! - consulting the result. 0034 class BRepPrimAPI_MakeTorus : public BRepPrimAPI_MakeOneAxis 0035 { 0036 public: 0037 0038 DEFINE_STANDARD_ALLOC 0039 0040 0041 //! Make a torus. 0042 //! @param R1 [in] distance from the center of the pipe to the center of the torus 0043 //! @param R2 [in] radius of the pipe 0044 Standard_EXPORT BRepPrimAPI_MakeTorus(const Standard_Real R1, const Standard_Real R2); 0045 0046 //! Make a section of a torus. 0047 //! @param R1 [in] distance from the center of the pipe to the center of the torus 0048 //! @param R2 [in] radius of the pipe 0049 //! @param angle [in] angle to create a torus pipe segment 0050 Standard_EXPORT BRepPrimAPI_MakeTorus(const Standard_Real R1, const Standard_Real R2, const Standard_Real angle); 0051 0052 //! Make a torus with angles on the small circle. 0053 //! @param R1 [in] distance from the center of the pipe to the center of the torus 0054 //! @param R2 [in] radius of the pipe 0055 //! @param angle1 [in] first angle to create a torus ring segment 0056 //! @param angle2 [in] second angle to create a torus ring segment 0057 Standard_EXPORT BRepPrimAPI_MakeTorus(const Standard_Real R1, const Standard_Real R2, const Standard_Real angle1, const Standard_Real angle2); 0058 0059 //! Make a torus with angles on the small circle. 0060 //! @param R1 [in] distance from the center of the pipe to the center of the torus 0061 //! @param R2 [in] radius of the pipe 0062 //! @param angle1 [in] first angle to create a torus ring segment 0063 //! @param angle2 [in] second angle to create a torus ring segment 0064 //! @param angle [in] angle to create a torus pipe segment 0065 Standard_EXPORT BRepPrimAPI_MakeTorus(const Standard_Real R1, const Standard_Real R2, const Standard_Real angle1, const Standard_Real angle2, const Standard_Real angle); 0066 0067 //! Make a torus. 0068 //! @param Axes [in] coordinate system for the construction of the sphere 0069 //! @param R1 [in] distance from the center of the pipe to the center of the torus 0070 //! @param R2 [in] radius of the pipe 0071 Standard_EXPORT BRepPrimAPI_MakeTorus(const gp_Ax2& Axes, const Standard_Real R1, const Standard_Real R2); 0072 0073 //! Make a section of a torus. 0074 //! @param Axes [in] coordinate system for the construction of the sphere 0075 //! @param R1 [in] distance from the center of the pipe to the center of the torus 0076 //! @param R2 [in] radius of the pipe 0077 //! @param angle [in] angle to create a torus pipe segment 0078 Standard_EXPORT BRepPrimAPI_MakeTorus(const gp_Ax2& Axes, const Standard_Real R1, const Standard_Real R2, const Standard_Real angle); 0079 0080 //! Make a torus. 0081 //! @param Axes [in] coordinate system for the construction of the sphere 0082 //! @param R1 [in] distance from the center of the pipe to the center of the torus 0083 //! @param R2 [in] radius of the pipe 0084 //! @param angle1 [in] first angle to create a torus ring segment 0085 //! @param angle2 [in] second angle to create a torus ring segment 0086 Standard_EXPORT BRepPrimAPI_MakeTorus(const gp_Ax2& Axes, const Standard_Real R1, const Standard_Real R2, const Standard_Real angle1, const Standard_Real angle2); 0087 0088 //! Make a section of a torus of radii R1 R2. 0089 //! For all algorithms The resulting shape is composed of 0090 //! - a lateral toroidal face, 0091 //! - two conical faces (defined by the equation v = angle1 and 0092 //! v = angle2) if the sphere is truncated in the v parametric 0093 //! direction (they may be cylindrical faces in some 0094 //! particular conditions), and in case of a portion 0095 //! of torus, two planar faces to close the shape.(in the planes 0096 //! u = 0 and u = angle). 0097 //! Notes: 0098 //! - The u parameter corresponds to a rotation angle around the Z axis. 0099 //! - The circle whose radius is equal to the minor radius, 0100 //! located in the plane defined by the X axis and the Z axis, 0101 //! centered on the X axis, on its positive side, and positioned 0102 //! at a distance from the origin equal to the major radius, is 0103 //! the reference circle of the torus. The rotation around an 0104 //! axis parallel to the Y axis and passing through the center 0105 //! of the reference circle gives the v parameter on the 0106 //! reference circle. The X axis gives the origin of the v 0107 //! parameter. Near 0, as v increases, the Z coordinate decreases. 0108 Standard_EXPORT BRepPrimAPI_MakeTorus(const gp_Ax2& Axes, const Standard_Real R1, const Standard_Real R2, const Standard_Real angle1, const Standard_Real angle2, const Standard_Real angle); 0109 0110 //! Returns the algorithm. 0111 Standard_EXPORT Standard_Address OneAxis(); 0112 0113 //! Returns the algorithm. 0114 Standard_EXPORT BRepPrim_Torus& Torus(); 0115 0116 0117 0118 0119 protected: 0120 0121 0122 0123 0124 0125 private: 0126 0127 0128 0129 BRepPrim_Torus myTorus; 0130 0131 0132 }; 0133 0134 0135 0136 0137 0138 0139 0140 #endif // _BRepPrimAPI_MakeTorus_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |