C3D Toolkit  Kernel - 117982, Vision - 2.9.2.2

Duplication by grid. More...

#include <op_duplication_parameter.h>

+ Inheritance diagram for DuplicationMeshValues:
+ Collaboration diagram for DuplicationMeshValues:

Public Member Functions

 DuplicationMeshValues (bool polar=false)
 Constructor by a type. More...
 
 DuplicationMeshValues (bool isPolar, const MbVector3D &dir1, const double step1, const uint num1, const MbVector3D &dir2, const double step2, const uint num2, const MbCartPoint3D *center=nullptr, bool isAlongAxis=false)
 Constructor by parameters and a type. More...
 
virtual ~DuplicationMeshValues ()
 Destructor.
 
void Init (const DuplicationMeshValues &)
 Copy function.
 
bool Init (const DuplicationValues &) override
 Copy function.
 
MbeDuplicatesType Type () const override
 Type of parameters.
 
void Transform (const MbMatrix3D &, MbRegTransform *=nullptr) override
 Transform grid according to the matrix.
 
void Move (const MbVector3D &, MbRegTransform *=nullptr) override
 Move grid along a vector.
 
void Rotate (const MbAxis3D &, double ang, MbRegTransform *=nullptr) override
 Rotate grid at a given angle around an axis.
 
void GetProperties (MbProperties &) override
 Get properties of the object.
 
void SetProperties (const MbProperties &) override
 Set properties of the object.
 
bool IsSame (const DuplicationValues &, double accuracy) const override
 Determine whether an object is equal? More...
 
DuplicationValuesDuplicate (MbRegDuplicate *=nullptr) const override
 Create a copy of the object.
 
void GenerateTransformMatrices (std::vector< MbMatrix3D > &) const override
 Generate matrix of transformation by.
 
size_t Count () const override
 Number of copies.
 
void SetDirection (bool first, const MbVector3D &dir)
 Set one of the directions of grid. More...
 
void GetDirection (bool first, MbVector3D &dir) const
 Get one of the directions of grid. More...
 
void SetStep (bool first, const double step)
 Set the step along of one of the directions of grid. More...
 
void GetStep (bool first, double &step) const
 Get the step along of one of the directions of grid. More...
 
void SetNumStep (bool first, const uint num)
 Set the number of steps along of one of the directions of grid. More...
 
bool IsPolar () const
 Is mesh polar? More...
 
void SetPolar (bool p)
 Set mesh type. More...
 
void GetNumStep (bool first, uint &num) const
 Get the number of steps along of one of the directions of grid. More...
 
bool IsAlongAxis () const
 Is body along radial axis? More...
 
MbCartPoint3D GetCenter () const
 Return center of the polar system. More...
 
void SetCenter (MbCartPoint3D &cntr)
 Set center of the polar system. More...
 
- Public Member Functions inherited from DuplicationValues
virtual ~DuplicationValues ()
 Destructor.
 

Protected Attributes

MbVector3D axis1
 Direction of duplication (dt_Grid and dt_Polar).
 
MbVector3D axis2
 Direction of duplication (dt_Grid), direction of axis of rotation (dt_Polar).
 
double step1
 Step along of axis1 (dt_Grid and dt_Polar).
 
double step2
 Step along of axis1 (dt_Grid), angle of rotation (dt_Polar).
 
uint num1
 Number of steps along of axis1 (dt_Grid and dt_Polar).
 
uint num2
 Number of steps along of axis2 (dt_Grid), number of angular steps (dt_Polar).
 
bool isPolar
 
bool isAlongAxis
 true - along polar axis, false - parallel to initial body.
 
MbCartPoint3D center
 Origin of the coordinate system.
 

Additional Inherited Members

- Protected Member Functions inherited from DuplicationValues
 DuplicationValues ()
 Default constructor.
 

Detailed Description

Duplication by grid.

Parameters of duplication by Cartesian grid or polar grid.
Type of grid is determined by flag 'isPolar':
false - dt_Grid, true - dt_Polar.
The original solid locate in the center of the grid.
Vector 'axis1' define one of the directions of the Cartesian grid or direction of the ray in the polar grid.
Vector 'axis2' define other directions of the Cartesian grid or the axis of rotation in the polar grid, point of axis doesn't matter because only vector will be rotated. 'step1' and 'step2' define steps along the directions.
'step1' define 'step' along the ray of polar grid, step2 define angle of rotation.
'num1 and 'num2' define number of steps 'step1' and 'step2'.
Orientation of the bodies on the grid is controlled by 'isAlongAxis' flag.
If 'isAlongAxis' = true, then bodies are oriented along radial axis, false - parallel to the origin body.
'center' determines the origin of local coordinate system.

Constructor & Destructor Documentation

◆ DuplicationMeshValues() [1/2]

DuplicationMeshValues::DuplicationMeshValues ( bool  polar = false)

Constructor by a type.

Constructor of duplication by grid.
Vectors and values are initialized to zero, type of grid is initialized by parameter, default 'false'.

◆ DuplicationMeshValues() [2/2]

DuplicationMeshValues::DuplicationMeshValues ( bool  isPolar,
const MbVector3D dir1,
const double  step1,
const uint  num1,
const MbVector3D dir2,
const double  step2,
const uint  num2,
const MbCartPoint3D center = nullptr,
bool  isAlongAxis = false 
)

Constructor by parameters and a type.

Constructor of duplication by grid.
Type of grid, vectors, steps and numbers of steps are initialized to parameters.

Member Function Documentation

◆ IsSame()

bool DuplicationMeshValues::IsSame ( const DuplicationValues ,
double  accuracy 
) const
overridevirtual

Determine whether an object is equal?

Determine whether an object is equal?

Implements DuplicationValues.

◆ SetDirection()

void DuplicationMeshValues::SetDirection ( bool  first,
const MbVector3D dir 
)

Set one of the directions of grid.

Set one of the directions of grid.

◆ GetDirection()

void DuplicationMeshValues::GetDirection ( bool  first,
MbVector3D dir 
) const

Get one of the directions of grid.

Get one of the directions of grid.

◆ SetStep()

void DuplicationMeshValues::SetStep ( bool  first,
const double  step 
)

Set the step along of one of the directions of grid.

Set the step along of one of the directions of grid.

◆ GetStep()

void DuplicationMeshValues::GetStep ( bool  first,
double &  step 
) const

Get the step along of one of the directions of grid.

Get the step along of one of the directions of grid.

◆ SetNumStep()

void DuplicationMeshValues::SetNumStep ( bool  first,
const uint  num 
)

Set the number of steps along of one of the directions of grid.

Set the number of steps along of one of the directions of grid.

◆ IsPolar()

bool DuplicationMeshValues::IsPolar ( ) const
inline

Is mesh polar?

Is local system of mesh polar?

◆ SetPolar()

void DuplicationMeshValues::SetPolar ( bool  p)
inline

Set mesh type.

Set local system of mesh.

◆ GetNumStep()

void DuplicationMeshValues::GetNumStep ( bool  first,
uint &  num 
) const

Get the number of steps along of one of the directions of grid.

Get the number of steps along of one of the directions of grid.

◆ IsAlongAxis()

bool DuplicationMeshValues::IsAlongAxis ( ) const
inline

Is body along radial axis?

Is body along radial axis?

◆ GetCenter()

MbCartPoint3D DuplicationMeshValues::GetCenter ( ) const
inline

Return center of the polar system.

Return center of the polar system.

◆ SetCenter()

void DuplicationMeshValues::SetCenter ( MbCartPoint3D cntr)
inline

Set center of the polar system.

Set center of the polar system.


The documentation for this class was generated from the following file: