Hide menu
Loading...
Searching...
No Matches
cadex::ModelData_ToroidalSurface Class Reference

Defines a toroidal surface. More...

#include <cadex/ModelData_ToroidalSurface.hxx>

Inheritance diagram for cadex::ModelData_ToroidalSurface:
cadex::ModelData_ElementarySurface cadex::ModelData_Surface

Public Types

typedef cadex::internal::ModelData_ToroidalSurfaceImpl ImplType
 
- Public Types inherited from cadex::ModelData_ElementarySurface
typedef cadex::internal::ModelData_ElementarySurfaceImpl ImplType
 

Public Member Functions

 ModelData_ToroidalSurface ()
 Constructor.
 
 ModelData_ToroidalSurface (const ModelData_Axis3Placement &thePosition, double theMajorRadius, double theMinorRadius)
 Constructor.
 
 ModelData_ToroidalSurface (const Handle_C &)
 
double MajorRadius () const
 Returns major radius.
 
double MinorRadius () const
 Returns minor radius.
 
- Public Member Functions inherited from cadex::ModelData_ElementarySurface
 ModelData_ElementarySurface ()
 Constructor.
 
const ModelData_Axis3PlacementPosition () const
 Returns a surface axis.
 
const ModelData_PointLocation () const
 Returns origin point.
 
const ModelData_DirectionDirection () const
 Returns Z direction of the axis placement.
 
ModelData_Point2d Parameter (const ModelData_Point &thePoint) const
 Returns UV-point in surface parametric space for a 3D point.
 
- Public Member Functions inherited from cadex::ModelData_Surface
 ModelData_Surface ()
 Constructor.
 
 ModelData_Surface (const ModelData_Surface &theOther)
 Constructor.
 
 ModelData_Surface (ModelData_Surface &&theOther)
 Constructor.
 
 ~ModelData_Surface ()
 Destructor.
 
ModelData_Surfaceoperator= (const ModelData_Surface &theOther)
 Assignment operator.
 
ModelData_Surfaceoperator= (ModelData_Surface &&theOther)
 Move assignment operator.
 
ModelData_SurfaceType Type () const
 Returns a surface type.
 
bool IsNull () const
 Returns true if the object has not been initialized yet.
 
void Nullify ()
 Resets the object.
 
 operator bool () const
 
bool IsUPeriodic () const
 Returns true if the surface is periodic in U direction.
 
bool IsVPeriodic () const
 Returns true if the surface is periodic in V direction.
 
double UMin () const
 Returns a minimum parameter of a definition domain in U direction.
 
double UMax () const
 Returns a maximum parameter of a definition domain in U direction.
 
double VMin () const
 Returns a minimum parameter of a definition domain in V direction.
 
double VMax () const
 Returns a maximum parameter of a definition domain in V direction.
 
void Domain (double &theUMin, double &theUMax, double &theVMin, double &theVMax) const
 Returns a definition domain.
 
ModelData_Point Value (double theParameterU, double theParameterV) const
 Evaluates a point on the surface.
 
void Transform (const ModelData_Transformation &theTransformation)
 Applies transformation matrix to this object.
 
ModelData_Surface Transformed (const ModelData_Transformation &theTransformation) const
 Returns a copy this object after applying transformation.
 
ModelData_Continuity Continuity () const
 Returns a continuity type of the surface.
 
void D0 (double theParameterU, double theParameterV, ModelData_Point &theValue) const
 Returns the point theValue of parameter theU, theV on the surface.
 
void D1 (double theParameterU, double theParameterV, ModelData_Point &theValue, ModelData_Vector &theD1U, ModelData_Vector &theD1V) const
 Returns the point theValue and the first derivatives in the directions U theD1U and V theD1V at this point.
 
void D2 (double theParameterU, double theParameterV, ModelData_Point &theValue, ModelData_Vector &theD1U, ModelData_Vector &theD1V, ModelData_Vector &theD2U, ModelData_Vector &theD2V, ModelData_Vector &theD2UV) const
 Returns the point theValue, the first and the second derivatives in the directions U and V at this point.
 
bool DN (double theParameterU, double theParameterV, size_t theDerivativeOrder, ModelData_Point &theValue, ModelData_Vector theD[]) const
 
void Curvature (double theParameterU, double theParameterV, ModelData_Vector &thePrincipalMaxDirection, ModelData_Vector &thePrincipalMinDirection) const
 Returns the max and min principal curvature directions multiplied by max and min value of curvature respectively.
 
void Curvature (double theParameterU, double theParameterV, ModelData_Direction &thePrincipalMaxDirection, ModelData_Direction &thePrincipalMinDirection, double &theMaxCurvature, double &theMinCurvature) const
 Returns the max and min principal curvature directions and their values.
 
void Normal (double theParameterU, double theParameterV, ModelData_Direction &theNormal) const
 Returns the normal direction theNormal at the current point.
 
void Mirror (const ModelData_Point &thePoint)
 Mirrors the surface relative to the point.
 
void Mirror (const ModelData_Axis1Placement &theAxis)
 Mirrors the surface relative to the axis placement.
 
void Mirror (const ModelData_Axis2Placement &theAxis)
 Mirrors the surface relative to the axis placement.
 
ModelData_Surface Mirrored (const ModelData_Point &theRef) const
 Returns a copy this surface mirrored along the object.
 
ModelData_Surface Mirrored (const ModelData_Axis1Placement &theAxis) const
 Returns a copy this surface mirrored along the object.
 
ModelData_Surface Mirrored (const ModelData_Axis2Placement &theAxis) const
 Returns a copy this surface mirrored along the object.
 
void Rotate (const ModelData_Axis1Placement &theAxis, double theAngle)
 Rotates the surface around the axis.
 
ModelData_Surface Rotated (const ModelData_Axis1Placement &theAxis, double theAngle) const
 Returns a copy this surface rotated along the axis.
 
void Translate (const ModelData_Vector &theVector)
 Translates the surface along the vector.
 
ModelData_Surface Translated (const ModelData_Vector &theVector) const
 Returns a copy this surface translated along the vector.
 
void Scale (const ModelData_Point &thePoint, double theScale)
 Scales the surface with respect to the point.
 
ModelData_Surface Scaled (const ModelData_Point &thePoint, double theScale) const
 Returns a copy this surface scaled with respect to the point.
 

Public Attributes

 operator Handle_C const
 
- Public Attributes inherited from cadex::ModelData_ElementarySurface
 operator Handle_C const
 

Detailed Description

Defines a toroidal surface.

A toroidal surface is defined by an axis placement and a major and minor radius. The following image depicts a toroidal surface example:

Toroidal surface

A toroidal surface is parametrized as follows: \(\mathbf{S}(u,v) = \mathbf{P} + (R_1 + R_2\cos(v))(\cos(u)\mathbf{D}_x + \sin(u)\mathbf{D}_y) + R_2\sin(v)\mathbf{D}_z\), where

  • \(\mathbf{P}\) is an origin point,
  • \(\mathbf{D}_x\), \(\mathbf{D}_y\) and \(\mathbf{D}_z\) are directions (unit vectors) of X, Y and Z axes respectively,
  • \(R_1\) is a major radius,
  • \(R_2\) is a minor radius,
  • \(u\) belongs to \([0, 2\pi]\),
  • \(v\) belongs to \([0, 2\pi]\),

U-parameter is an angle when rotating around the \(\mathbf{D}_z\) axis counterclockwise, and V-parameter is an angle in circular section at a given parameter U. Thus, U-isolines circles lying in the plane containing Z axis and V-isolines are circles in the planes perpendicular to Z axis.

V-isoline at \(v=0\) is a circle of radius \(R_1+R_2\) in the plane defined by an axis placement. U-isoline at \(u=0\) is a circle of radius \(R_2\) in the plane containing Z and X axes.

Radii \(R_1\) and \(R_2\) must be positive. If \(R_2>R_1\) then toroidal surface will be self-intersecting.

Toroidal surface is both U- and V-periodical with periods \(2\pi\).

If a face lies on a full toroidal surface its boundary wire will contain two seam-edges, corresponding to \(u=0\) and \(u=2\pi\), and \(v=0\) and \(v=2\pi\) respectively.

Examples
exploring/brepgeometry/Program.cs, exploring/brepgeometry/main.cxx, modeling/brep/Program.cs, and modeling/brep/main.cxx.

Constructor & Destructor Documentation

◆ ModelData_ToroidalSurface() [1/2]

cadex::ModelData_ToroidalSurface::ModelData_ToroidalSurface ( )
inline

Constructor.

Empty constructor.

◆ ModelData_ToroidalSurface() [2/2]

cadex::ModelData_ToroidalSurface::ModelData_ToroidalSurface ( const ModelData_Axis3Placement thePosition,
double  theMajorRadius,
double  theMinorRadius 
)

Constructor.

Creates a toroidal surface from an axis placement, major radius and minor radius.

theMajorRadius and theMinorRadius must be positive.

Member Function Documentation

◆ MajorRadius()

double cadex::ModelData_ToroidalSurface::MajorRadius ( ) const

Returns major radius.

Returns the value specified in the constructor.

Examples
exploring/brepgeometry/Program.cs, and exploring/brepgeometry/main.cxx.

◆ MinorRadius()

double cadex::ModelData_ToroidalSurface::MinorRadius ( ) const

Returns minor radius.

Returns the value specified in the constructor.

Examples
exploring/brepgeometry/Program.cs, and exploring/brepgeometry/main.cxx.