C3D Toolkit
Kernel - 117982, Vision - 2.9.2.2
|
Curvilinear spine for sweep surface. More...
#include <surf_spine.h>
Public Types | |
enum | LocalAxes { la_planeParallel = 0 , la_calcDirection = 1 , la_userDirection = 2 , la_surfaceNormal = 3 , la_optionalCurve = 4 } |
Methods of movement of the local coordinate system along the guide curve "curve". More... | |
Public Member Functions | |
Base functions | |
MbeSpaceType | IsA () const |
A type of element. | |
MbSpine & | Duplicate (MbRegDuplicate *=nullptr) const |
Create a copy of the element. | |
bool | SetEqual (const MbSpine &) |
Make equal. | |
bool | IsSimilar (const MbSpine &) const |
Determine whether the objects are similar. | |
bool | IsSame (const MbSpine &other, double accuracy=LENGTH_EPSILON) const |
Whether the objects are equal. | |
void | Transform (const MbMatrix3D &, MbRegTransform *=nullptr) |
Transform element according to the matrix. | |
void | Move (const MbVector3D &, MbRegTransform *=nullptr) |
Translation. | |
void | Rotate (const MbAxis3D &, double angle, MbRegTransform *=nullptr) |
Rotate around an axis. | |
void | Inverse (MbRegTransform *iReg=nullptr) |
Change the direction. | |
void | Reset () |
Reset temporary data of an object. | |
General descriptions of a spine curve domain | |
double | GetTMax () const |
Get the maximum value of parameter. | |
double | GetTMin () const |
Get the minimum value of parameter. | |
bool | IsClosed () const |
Check for curve closeness. | |
Functions for working in the spine curve's domain. | |
Functions PointOn, FirstDer... correct parameters when getting out of the spine curve domain bounds. | |
void | PointOn (double &t, MbCartPoint3D &p) const |
Point on the curve. | |
void | FirstDer (double &t, MbVector3D &p) const |
The first derivative. | |
void | SecondDer (double &t, MbVector3D &p) const |
The second derivative. | |
void | ThirdDer (double &t, MbVector3D &p) const |
Third derivative. | |
Functions for working inside and outside the spine curve's domain | |
functions _PointOn, _FirstDer... correct parameters when getting out of the spine curve domain bounds. | |
void | _PointOn (double t, MbCartPoint3D &p) const |
Point on the curve. | |
void | _FirstDer (double t, MbVector3D &p) const |
The first derivative. | |
void | _SecondDer (double t, MbVector3D &p) const |
The second derivative. | |
void | _ThirdDer (double t, MbVector3D &p) const |
Third derivative. | |
virtual void | Explore (double &t, bool ext, MbCartPoint3D &pnt, MbVector3D &fir, MbVector3D *sec, MbVector3D *thir) const |
Calculate point and derivatives of object for given parameter. | |
Function of moving by spine curve | |
double | Step (double t, double sag) const |
Calculation of the approximation step by the value of sag. | |
double | DeviationStep (double t, double angle) const |
Calculation of the approximation step by the deviation angle of the normal vector. | |
Functions for changing data and access to data | |
void | TransformMatrix (double v, MbMatrix3D &matrix) const |
Determination of a transfer matrix for generatrix. More... | |
void | MoveVector (double &v, MbVector3D &vect) const |
Determination of a transfer vector for generatrix. More... | |
const MbVector3D & | GetOrt0 () const |
The first vector of basis in the calculated spine. More... | |
void | CalculateMatrix (double &v, bool ext, MbMatrix3D &matrix0, MbMatrix3D &matrix1, MbMatrix3D &matrix2) const |
Calculation of transformation matrices. More... | |
void | CalculateMatrix (double &v, bool ext, MbMatrix3D &matrix0, MbMatrix3D &matrix1) const |
void | CalculateMatrix0 (double &v, bool ext, MbMatrix3D &matrix0) const |
void | CalculateMatrix1 (double &v, bool ext, MbMatrix3D &matrix1) const |
void | CalculateMatrix2 (double &v, bool ext, MbMatrix3D &matrix2) const |
const MbCurve3D & | GetCurve () const |
The spine curve. | |
MbCurve3D & | SetCurve () |
Get spine curve for editing. | |
const MbCurve3D * | GetDirectionCurve () const |
Direction curve. | |
VERSION | GetVersion () const |
A version of calculation of the vector of transformation matrix orientation. | |
void | ChangeCurve (const MbCurve3D &) |
Change the spine curve. | |
void | ChangeOptionalCurve (const MbCurve3D &) |
Change the direction curve. | |
const MbVector3D & | GetDirection () const |
Vector of transformation matrix orientation. | |
bool | SetDirection (const MbVector3D &d, bool checkBySpineCurve=false) |
Change the vector of transformation matrix orientation. | |
LocalAxes | GetLocalAxisMethod () const |
Get the method of orientation of the local coordinate system. | |
void | SetLocalAxisMethod (LocalAxes la) |
Get the method of orientation of the local coordinate system. | |
bool | IsParallel () const |
Attribute of plane-parallel translation. | |
bool | IsUserDirection () const |
Attribute of user direction. | |
bool | BySurfaceNormal () const |
Attribute of direction as surface normal. | |
bool | ByOptionalCurve () const |
Attribute of direction by optional curve. | |
double | GetOrtParam () const |
Parameter of a curve with calculated basis of spine. | |
void | SetOrtParam (double t) |
Set the parameter of a curve with calculated basis of spine. | |
void | BaseVectors0 (double &v, bool ext, MbCartPoint3D &origin, MbVector3D &vector0, MbVector3D &vector1, MbVector3D &vector2) const |
void | BaseVectors1 (double &v, bool ext, MbVector3D &origin1, MbVector3D &vector0, MbVector3D &vector1, MbVector3D &vector2, MbVector3D &derive0, MbVector3D &derive1, MbVector3D &derive2) const |
void | BaseVectors2 (double &v, bool ext, MbVector3D &origin1, MbVector3D &origin2, MbVector3D &vector0, MbVector3D &vector1, MbVector3D &vector2, MbVector3D &derive0, MbVector3D &derive1, MbVector3D &derive2, MbVector3D &second0, MbVector3D &second1, MbVector3D &second2) const |
MbPlacement3D | GetPlacement (double v) const |
Construct placement in the given point. More... | |
void | GetPlacement (double v, MbPlacement3D &pl) const |
Initialize placement for the given point. | |
size_t | GetSegmentsCount () const |
The number of segments of the spine curve. | |
void | PrepareWrite () const |
Function of registration by the number of references to avoid multiple writing. More... | |
const MbSurface * | GetSpineSurface () const |
The surface of the "curve", if it is curve on surface. | |
const MbCurve * | GetFeatureCurve () const |
Two-dimensional curve of the "curve", if it is curve on surface. | |
Public Member Functions inherited from MbRefItem | |
virtual MbeRefType | RefType () const |
Registration type (for copying, duplication). | |
refcount_t | GetUseCount () const |
Get count of references (get count of owners of an object). | |
refcount_t | AddRef () const |
Increase count of references by one. | |
refcount_t | DecRef () const |
Decrease count of references by one. | |
refcount_t | Release () const |
Decrease count of references by one and if count of references became zero, then remove itself. | |
Public Member Functions inherited from TapeBase | |
TapeBase (RegistrableRec regs=noRegistrable) | |
Constructor. | |
TapeBase (const TapeBase &) | |
Copy-constructor. | |
virtual | ~TapeBase () |
Destructor. | |
RegistrableRec | GetRegistrable () const |
Whether the stream class is registrable. | |
void | SetRegistrable (RegistrableRec regs=registrable) const |
Set the state of registration of the stream class. | |
virtual const char * | GetPureName (const VersionContainer &) const |
Get the class name. | |
virtual bool | IsFamilyRegistrable () const |
Whether the object belongs to a registrable family. | |
Static Public Member Functions | |
static MbSpine & | Create (const MbCurve3D &c, bool parallel, bool same, VERSION vers=Math::DefaultMathVersion()) |
Constructor by spine curve. More... | |
static MbSpine * | Create (const MbCurve3D &c, bool same, const MbVector3D &dir, bool parallel, VERSION vers=Math::DefaultMathVersion()) |
Constructor by spine curve and a vector of transformation matrix orientation. More... | |
static MbSpine * | Create (const MbCurve3D &sp, bool sameS, const MbCurve3D &dc, bool sameD, bool parallel, VERSION vers=Math::DefaultMathVersion()) |
Constructor by spine curve and a curve of the vector of transformation matrix orientation. More... | |
static MbSpine * | Create (const MbCurve3D &sp, bool sameS, const MbSurface &surf, const MbCurve *pCrv, VERSION vers) |
Constructor by spine curve on a curve associated with a surface. More... | |
static MbSpine * | Create (const MbWireFrame &wireFrame, bool same, const MbVector3D *direction, bool parallel, VERSION version) |
Constructor by wireFrame. More... | |
static MbSpine * | Create (const MbWireFrame &wireFrame, bool same, const MbSurface &surface, const MbCurve *pCurve, VERSION version) |
Constructor by wireFrame. More... | |
Protected Member Functions | |
MbSpine (const MbCurve3D &cur, bool par, bool same, VERSION vers=Math::DefaultMathVersion()) | |
Constructor by spine curve. More... | |
MbSpine (const MbCurve3D &cur, bool same, const MbVector3D &dir, bool par, VERSION vers=Math::DefaultMathVersion()) | |
Constructor by spine curve and a vector of transformation matrix orientation. More... | |
MbSpine (const MbCurve3D &cur, bool same, const MbCurve3D &opt, bool sameO, bool par, VERSION vers=Math::DefaultMathVersion()) | |
Constructor by spine curve and a curve of the vector of transformation matrix orientation. More... | |
Protected Member Functions inherited from MbRefItem | |
MbRefItem () | |
Constructor without parameters. | |
Curvilinear spine for sweep surface.
Curvilinear spine for sweep surface serves for calculation of a spine curve in the local coordinate system at each point.
The local axis 0 is oriented in direction of the curve "curve" tangent.
The local axis 1 is oriented in direction of the vector "direction" or of the curve "optionalCurve".
The local axis 2 complements the local system to the right coordinate system.
enum MbSpine::LocalAxes |
Methods of movement of the local coordinate system along the guide curve "curve".
|
protected |
Constructor by spine curve.
Constructor by spine curve.
[in] | cur | - A spine curve. |
[in] | par | - Attribute of parallel translation. |
[in] | same | - Attribute of using the original of spine curve instead of its copy. |
[in] | vers | - Version of operation. |
|
protected |
Constructor by spine curve and a vector of transformation matrix orientation.
Constructor by spine curve and a vector of transformation matrix orientation.
[in] | cur | - A spine curve. |
[in] | same | - Attribute of using the original of spine curve instead of its copy. |
[in] | dir | - Vector of transformation matrix orientation. |
[in] | par | - Attribute of parallel translation. |
[in] | vers | - Version of calculation the local coordinate system. |
|
protected |
Constructor by spine curve and a curve of the vector of transformation matrix orientation.
Constructor by spine curve and a curve of the vector of transformation matrix orientation.
[in] | cur | - A spine curve |
[in] | same | - Attribute of using the original of spine curve instead of its copy |
[in] | opt | - A curve of the vector of transformation matrix orientation |
[in] | sameO | - Attribute of using the original of a curve of the vector of transformation matrix orientation instead of its copy |
[in] | par | - Attribute of parallel translation. |
[in] | vers | - Version of calculation the local coordinate system. |
|
static |
Constructor by spine curve.
Constructor by spine curve.
[in] | c | - A spine curve |
[in] | parallel | - Attribute of parallel translation. |
[in] | same | - Attribute of using the original of spine curve instead of its copy |
[in] | vers | - Version of calculation the local coordinate system. |
|
static |
Constructor by spine curve and a vector of transformation matrix orientation.
Constructor by spine curve and a vector of transformation matrix orientation.
[in] | c | - A spine curve |
[in] | same | - Attribute of using the original of spine curve instead of its copy |
[in] | direction | - Vector of transformation matrix orientation. |
[in] | parallel | - Attribute of parallel translation. |
[in] | vers | - Version of calculation the local coordinate system. |
|
static |
Constructor by spine curve and a curve of the vector of transformation matrix orientation.
Constructor by spine curve and a curve of the vector of transformation matrix orientation.
[in] | sp | - A spine curve |
[in] | sameS | - Attribute of using the original of spine curve instead of its copy |
[in] | dc | - A curve of the vector of transformation matrix orientation |
[in] | sameD | - Attribute of using the original of a curve of the vector of transformation matrix orientation instead of its copy |
[in] | parallel | - Attribute of parallel translation. |
[in] | vers | - Version of calculation the local coordinate system. |
|
static |
Constructor by spine curve on a curve associated with a surface.
Constructor by spine curve and the surface on which the spine curve lies.
[in] | sp | - A spine curve |
[in] | sameS | - Attribute of using the original of spine curve instead of its copy |
[in] | surf | - The surface of the sp, it should be curve on surface. |
[in] | pCrv | - The two-dimensional curve on the surface of the guide curve. |
[in] | vers | - Version of calculation the local coordinate system. |
|
static |
Constructor by wireFrame.
Constructor by wireFrame.
[in] | wireFrame | - Wire frame with a spine curve. |
[in] | same | - Attribute of using the original of spine curve instead of its copy |
[in] | direction | - Vector of transformation matrix orientation. |
[in] | parallel | - Attribute of parallel translation. |
[in] | version | - Version of calculation the local coordinate system. |
|
static |
Constructor by wireFrame.
Constructor by wireFrame.
[in] | wireFrame | - A spine curve |
[in] | same | - Attribute of using the original of spine curve instead of its copy |
[in] | surface | - The surface of the sp, it should be curve on surface. |
[in] | pCurve | - The two-dimensional curve on the surface of the guide curve. |
[in] | version | - Version of calculation the local coordinate system. |
void MbSpine::TransformMatrix | ( | double | v, |
MbMatrix3D & | matrix | ||
) | const |
Determination of a transfer matrix for generatrix.
Determination of a transfer matrix for generatrix.
[in] | v | - Parameter on spine curve |
[out] | matrix | - The result is a matrix |
void MbSpine::MoveVector | ( | double & | v, |
MbVector3D & | vect | ||
) | const |
Determination of a transfer vector for generatrix.
Determination of a transfer vector for generatrix.
[in] | v | - Parameter on spine curve |
[out] | vect | - The result is a vector |
|
inline |
The first vector of basis in the calculated spine.
The first vector of basis in the calculated spine.
void MbSpine::CalculateMatrix | ( | double & | v, |
bool | ext, | ||
MbMatrix3D & | matrix0, | ||
MbMatrix3D & | matrix1, | ||
MbMatrix3D & | matrix2 | ||
) | const |
Calculation of transformation matrices.
Calculation of transformation matrices for radius vector (matrix0) and for first and second derivatives (matrix1, matrix2) for the parameter on a spine. The function moves the parameter v inside the spine curve domain when ext==true.
[in,out] | v | - Parameter on spine curve |
MbPlacement3D MbSpine::GetPlacement | ( | double | v | ) | const |
Construct placement in the given point.
Construct placement in the given point.
[in] | v | - Parameter on spine curve |
|
inline |
Function of registration by the number of references to avoid multiple writing.
Function of registration by the number of references to avoid multiple writing.