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

Defines a surface of revolution. More...

#include <cadex/ModelData_SurfaceOfRevolution.hxx>

Inheritance diagram for cadex::ModelData_SurfaceOfRevolution:
cadex::ModelData_SweptSurface cadex::ModelData_Surface

Public Types

typedef cadex::internal::ModelData_SurfaceOfRevolutionImpl ImplType
 
- Public Types inherited from cadex::ModelData_SweptSurface
typedef cadex::internal::ModelData_SweptSurfaceImpl ImplType
 

Public Member Functions

 ModelData_SurfaceOfRevolution ()
 Constructor.
 
 ModelData_SurfaceOfRevolution (const ModelData_Curve &theBasisCurve, const ModelData_Point &theLocation, const ModelData_Direction &theDirection)
 Constructor.
 
const ModelData_PointLocation () const
 Returns an origin point of a rotation axis.
 
 ModelData_SurfaceOfRevolution (const Handle_C &)
 
- Public Member Functions inherited from cadex::ModelData_SweptSurface
 ModelData_SweptSurface ()
 Constructor.
 
ModelData_Curve BasisCurve () const
 
const ModelData_DirectionDirection () const
 
- 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_SweptSurface
 operator Handle_C const
 

Detailed Description

Defines a surface of revolution.

Surface of revolution is defined by a basis curve and a rotation axis. The following image depicts an example of a surface of revolution:

Surface of revolution

A surface of revolution is parametrized as follows: \(\mathbf{S}(u,v) = \mathbf{Z}(v) + \cos(u)(\mathbf{B}(v) - \mathbf{Z}(v)) + \mathbf{D}\times\sin(u)(\mathbf{B}(v) - \mathbf{Z}(v))\), where:

  • \(\mathbf{P}\) is an origin point specifying rotation axis,
  • \(\mathbf{D}\) is unit vector specifying rotation axis,
  • \(\mathbf{B}(v)\) is a basis curve,
  • \(\mathbf{Z}(v)\) is a projection of a point on the basis curve onto a rotation axis, \(\mathbf{Z}(v) = \mathbf{P} + ((\mathbf{B}(v) - \mathbf{P})\cdot\mathbf{D})\mathbf{D}\),
  • \(u\) belongs to \([0, 2\pi]\),
  • \(v\) belongs to a basis curve definition domain.

U-parameter is an angle of rotation around the axis counterclockwise, and V-parameter is s a parameter along the curve \(\mathbf{B}(v)\). Thus, U-isolines are correspond to curve \(\mathbf{B}(v)\) rotated around the rotation axis and V-isolines are circles perpendicular to rotation axis with radius equal to distance from the axis to a point on the basis curve at parameter V. U-isoline at \(u=0\) is the basis curve itself.

The curve \(\mathbf{B}(v)\) should be planar although this is not enforced. It should not cross the rotation axis, except possibly at the end points.

Surface or revolution is periodic along U with period \(2\pi\). It is V-periodic if the basis curve is periodic itself.

If a face lies on a full range of U its boundary wire will contain two seam-edges at parameters UMin() and UMax(). Likewise, if the surface is V-periodic the wire will contain two seam-edges at parameters VMin() and VMax(). If the basis curve has end point(s) lying on a rotation axis then the wire will contain degenerated edge(s) at respective point(s).

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

Constructor & Destructor Documentation

◆ ModelData_SurfaceOfRevolution() [1/2]

cadex::ModelData_SurfaceOfRevolution::ModelData_SurfaceOfRevolution ( )
inline

Constructor.

Empty constructor.

◆ ModelData_SurfaceOfRevolution() [2/2]

cadex::ModelData_SurfaceOfRevolution::ModelData_SurfaceOfRevolution ( const ModelData_Curve theBasisCurve,
const ModelData_Point theLocation,
const ModelData_Direction theDirection 
)

Constructor.

Creates a surface of revolution from a basis curve and a rotation axis.

Member Function Documentation

◆ Location()

const ModelData_Point & cadex::ModelData_SurfaceOfRevolution::Location ( ) const

Returns an origin point of a rotation axis.

Returns the value specified in the constructor.

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