CAD Exchanger SDK
cadex::ModelData_SphericalSurface Class Reference

Defines a spherical surface. More...

Inheritance diagram for cadex::ModelData_SphericalSurface:
cadex::ModelData_ElementarySurface cadex::ModelData_Surface

Public Member Functions

 ModelData_SphericalSurface ()
 Constructor. More...
 
 ModelData_SphericalSurface (const ModelData_Axis3Placement &thePosition, double theRadius)
 Constructor. More...
 
 ModelData_SphericalSurface (const Handle_C &)
 Constructor.
 
double Radius () const
 Returns radius. More...
 
 operator const Handle_C & () const
 Cast operator.
 
- Public Member Functions inherited from cadex::ModelData_ElementarySurface
 ModelData_ElementarySurface ()
 Constructor. More...
 
const ModelData_Axis3PlacementPosition () const
 Returns a surface axis. More...
 
const ModelData_PointLocation () const
 Returns origin point. More...
 
const ModelData_DirectionDirection () const
 Returns Z direction of the axis placement. More...
 
ModelData_Point2d Parameter (const ModelData_Point &thePoint) const
 Returns UV-point in surface parametric space for a 3D point. More...
 
 operator const Handle_C & () const
 Cast operator.
 
- 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.
 
 operator const Handle_C & () const
 Cast operator.
 
ModelData_SurfaceType Type () const
 Returns a surface type.
 
bool IsNull () const
 Returns true if the object has not been initialized yet.
 
 operator bool () const
 
bool IsUPeriodic () const
 Returns true if the surface is periodic in U direction. More...
 
bool IsVPeriodic () const
 Returns true if the surface is periodic in V direction. More...
 
double UMin () const
 Returns a minimum parameter of a definition domain in U direction. More...
 
double UMax () const
 Returns a maximum parameter of a definition domain in U direction. More...
 
double VMin () const
 Returns a minimum parameter of a definition domain in V direction. More...
 
double VMax () const
 Returns a maximum parameter of a definition domain in V direction. More...
 
void Domain (double &theUMin, double &theUMax, double &theVMin, double &theVMax) const
 Returns a definition domain. More...
 
ModelData_Point Value (double theParameterU, double theParameterV) const
 Evaluates a point on the surface. More...
 
void Transform (const ModelData_Transformation &theTransformation)
 Applies transformation matrix to this object. More...
 
ModelData_Surface Transformed (const ModelData_Transformation &theTransformation) const
 Returns a copy this object after applying transformation. More...
 
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. More...
 
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. More...
 
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. More...
 
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.
 
template<typename T >
ModelData_Surface Mirrored (const T &theRef) const
 
void Rotate (const ModelData_Axis1Placement &theAxis, double theAngle)
 Rotates the surface around the axis.
 
ModelData_Surface Rotated (const ModelData_Axis1Placement &theAxis, double theAngle)
 
void Translate (const ModelData_Vector &theVector)
 Translates the surface along the vector.
 
ModelData_Surface Translated (const ModelData_Vector &theVector)
 
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)
 

Additional Inherited Members

- Protected Member Functions inherited from cadex::ModelData_ElementarySurface
 ModelData_ElementarySurface (const Handle_C &, ModelData_SurfaceType)
 Constructor. More...
 
- Protected Member Functions inherited from cadex::ModelData_Surface
 ModelData_Surface (const Handle_C &, ModelData_SurfaceType)
 Constructor.
 
internal::ModelData_SurfaceImpl & Impl ()
 Returns internal implementation object.
 

Detailed Description

Defines a spherical surface.

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

spherical_surface.png
Spherical surface

A spherical surface is parametrized as follows: S(u,v) = P + R * cos(v) * (cos(u) * Dx + sin(u) * Dy) + R * sin(v) * Dz, where

  • P is an origin point,
  • Dx, Dy and Dz are directions (unit vectors) of X, Y and Z axes respectively,
  • R is a radius,
  • u belongs to [0, 2 * PI],
  • v belongs to [-PI/2, +PI/2].

U-parameter is an angle of rotation around the Dz axis counterclockwise (i.e. similar to longitude on the Earth), and V-parameter is an angle between plane defined by an axis placement and line from P to a point on a sphere (i.e. latitude). Thus, U-isolines are semi-circles and V-isoline are circles.

V-isoline at V=0 is a circle of radius R in the plane defined by an axis placement. U-isoline at U=0 corresponds to a semi-circle from south to north pole.

Spherical surface is U-periodical with period 2 * PI.

If a face lies on a full spherical surface its boundary wire will contain two a degenerated edges corresponding to the south and north poles (V equals -PI/2 and PI/2 respectively), and a seam-edge.

Constructor & Destructor Documentation

◆ ModelData_SphericalSurface() [1/2]

cadex::ModelData_SphericalSurface::ModelData_SphericalSurface ( )
inline

Constructor.

Empty constructor.

◆ ModelData_SphericalSurface() [2/2]

cadex::ModelData_SphericalSurface::ModelData_SphericalSurface ( const ModelData_Axis3Placement thePosition,
double  theRadius 
)

Constructor.

Creates a spherical surface from an axis placement and radius.

theRadius must be positive.

Member Function Documentation

◆ Radius()

double cadex::ModelData_SphericalSurface::Radius ( ) const

Returns radius.

Returns the value specified in the constructor.