C3D Toolkit  Kernel - 117982, Vision - 2.9.2.2

Parameters for a solid direct modification. More...

#include <op_direct_mod_parameter.h>

+ Inheritance diagram for MbModifiedSolidParams:
+ Collaboration diagram for MbModifiedSolidParams:

Public Member Functions

 MbModifiedSolidParams (const MbModifiedSolidParams &other, MbRegDuplicate *iReg=nullptr)
 Copy contructor.
 
 MbModifiedSolidParams (TapeInit)
 The read constructor.
 
 MbModifiedSolidParams (MbeModifyingMode modType, const MbSNameMaker &names, const c3d::EdgeFacesIndices &edges, const c3d::BoolVector &beginOrEnd)
 Constructor. More...
 
 ~MbModifiedSolidParams ()
 Destructor.
 
void Init (const MbModifiedSolidParams &other, MbRegDuplicate *iReg=nullptr)
 Initialization.
 
void GetFaces (c3d::ItemIndices &faces) const
 Get faces from values. More...
 
void GetFaces (SArray< MbItemIndex > &faces) const
 Get faces from values. More...
 
template<class FacesArray >
void FindFaces (const MbFaceShell &shell, FacesArray &faces) const
 Get faces from values for the given shell. More...
 
const MbSNameMakerGetNameMaker () const
 Get the object defining names generation in the operation.
 
MbSNameMakerSetNameMaker ()
 Get the object defining names generation in the operation.
 
void SetNameMaker (const MbSNameMaker &other, bool setVersion=true)
 Set the object defining names generation in the operation.
 
void Transform (const MbMatrix3D &matr, MbRegTransform *ireg=nullptr)
 Transform by matrix.
 
void Move (const MbVector3D &to, MbRegTransform *ireg=nullptr)
 Move.
 
void Rotate (const MbAxis3D &axis, double angle, MbRegTransform *ireg=nullptr)
 Rotate.
 
void GetProperties (MbProperties &properties)
 Get properties of the object.
 
void SetProperties (const MbProperties &properties)
 Set properties of the object.
 
Constructors by faces array.
 MbModifiedSolidParams (MbeModifyingMode modType, const MbSNameMaker &names, const c3d::ItemIndices &faces)
 Constructor. More...
 
 MbModifiedSolidParams (MbeModifyingMode type, const MbSNameMaker &names, const c3d::ItemIndices &faces, double value)
 Constructor. More...
 
 MbModifiedSolidParams (MbeModifyingMode type, const MbSNameMaker &names, const c3d::ItemIndices &faces, const MbAxis3D &axis, double angle)
 Constructor. More...
 
 MbModifiedSolidParams (MbeModifyingMode type, const MbSNameMaker &names, const c3d::ItemIndices &faces, const MbVector3D &direction)
 Constructor. More...
 
template<class SurfArray >
 MbModifiedSolidParams (MbeModifyingMode type, const MbSNameMaker &names, const c3d::ItemIndices &faces, const SurfArray &surfaces)
 Constructor. More...
 
template<class SurfArray >
MATH_FUNC_EX MbModifiedSolidParams (MbeModifyingMode type, const MbSNameMaker &names, const c3d::ItemIndices &replacedFaces, const SurfArray &replacementSurfaces, bool sameSurfaces, const c3d::NumbersVector &surfaceParts, const c3d::DoubleVector &offsets)
 Constructor. More...
 
Functions to add edges.
bool AddEdge (const MbEdgeFacesIndexes &edge, bool beginOrEnd)
 Add edge to values. More...
 
bool AddEdges (const c3d::EdgeFacesIndices &edges, const c3d::BoolVector &beginOrEnds)
 Add edges to values. More...
 
void GetEdges (c3d::EdgeFacesIndices &edges, c3d::BoolVector &beginOrEnds) const
 Get edges from values. More...
 
void GetEdges (SArray< MbEdgeFacesIndexes > &edges, c3d::BoolVector &beginOrEnds) const
 Get edges from values. More...
 
Functions to add surfaces.
bool AddSurface (MbSurface *surf)
 Add surface to change faces. More...
 
template<class SurfArray >
bool AddSurfaces (const SurfArray &surfs)
 Add surfaces to change faces. More...
 
void GetSurfaces (c3d::SurfacesVector &surfs)
 Get surfaces to change faces. More...
 
- Public Member Functions inherited from MbCollectFacesParams
 MbCollectFacesParams (MbeModifyingMode modType, const c3d::ItemIndices &faces, VERSION version=Math::DefaultMathVersion())
 Constructor. More...
 
 MbCollectFacesParams (MbeModifyingMode type, const c3d::ItemIndices &faces, double value, VERSION version=Math::DefaultMathVersion())
 Constructor. More...
 
 ~MbCollectFacesParams ()
 Destructor.
 
void AddFace (const MbItemIndex &face)
 Add face to values. More...
 
void AddFaces (const c3d::ItemIndices &faces)
 Add faces to values. More...
 
template<class DMValues >
std::shared_ptr< DMValues > GetValues () const
 Get the values of the requested type.
 
bool IsValid (const MbFaceShell *shell=nullptr) const
 Whether the created parameters are valid. More...
 
MbeModifyingMode GetType () const
 Get the modification type.
 
- Public Member Functions inherited from MbPrecision
 MbPrecision ()
 Default constructor.
 
 MbPrecision (double _precision, double _deviation)
 Constructor by the specified precision.
 
 MbPrecision (const MbPrecision &other)
 Copy-constructor.
 
 ~MbPrecision ()
 Destructor.
 
void Init (const MbPrecision &other)
 Initialization function.
 
void Init (double _precision)
 Initialization function.
 
MbPrecisionoperator= (const MbPrecision &other)
 Assignment operator.
 
bool IsSame (const MbPrecision &other, double accuracy) const
 Determine whether an object is equal?
 
double GetPrecision () const
 Get precision.
 
void SetPrecision (double a)
 Set precision.
 

Protected Attributes

MbSNameMaker _names
 Name maker.
 
- Protected Attributes inherited from MbCollectFacesParams
MbeModifyingMode _modificationType
 Type of modification.
 
std::shared_ptr< DirectModValues > _modValues
 The unique values, depending on the operation.
 
VERSION _version
 The operation version.
 
- Protected Attributes inherited from MbPrecision
double precision
 The metric precision of the construction of objects.
 
double deviation
 The angular precision of the construction of objects.
 

Friends

class MbFaceModifiedSolid
 
MbCreatorCreateFaceModifiedSolid (MbFaceShell *outer, MbeCopyMode sameShell, const ModifyValues &oldParams, const RPArray< MbFace > &faces, const RPArray< MbCurveEdge > &edges, const MbSNameMaker &names, MbResultType &res, MbFaceShell *&shell)
 Construct the modified shell. More...
 
MbResultType EdgeModifiedSolid (MbSolid &solid, MbeCopyMode sameShell, const ModifyValues &oldParams, const RPArray< MbCurveEdge > &edges, const MbSNameMaker &names, MbSolid *&result)
 Modify a solid by the methods of direct modeling. More...
 
MbResultType FaceModifiedSolid (MbSolid &solid, MbeCopyMode sameShell, const ModifyValues &params, const RPArray< MbFace > &faces, const MbSNameMaker &names, MbSolid *&result)
 Modify a solid by the methods of direct modeling. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from MbPrecision
static double GetMaxMetricTolerance ()
 Get the maximum metric tolerance. More...
 
static double GetMaxAngleTolerance ()
 Get the maximum angular tolerance. More...
 
- Protected Member Functions inherited from MbCollectFacesParams
 MbCollectFacesParams (MbeModifyingMode type, VERSION version=Math::DefaultMathVersion())
 Inner constructor. More...
 
template<class DMValues >
std::shared_ptr< DMValues > _GetValues () const
 Get the values of the requested type.
 

Detailed Description

Parameters for a solid direct modification.

Parameters for a solid direct modification include the type of operation (MbeModifyingMode) and its parameters. The possible operations depend on the '_modificationType' parameter and are listed below:

  1. Removal of the specified faces without the adjacent fillets dmm_RemoveFaces.
    Removal of the specified faces with the adjacent fillets dmm_RemoveFacesWithAdjacentFillets. Remove the close cylindric, spherical faces, extrusion and rotation faces below specified radius with the adjacent fillets dmm_RemoveBelowRadiusWithAdjacentFillets.
    Remove the close cylindric, spherical faces, extrusion and rotation faces below specified radius without the adjacent fillets dmm_RemoveBelowRadius.
  2. Creation of a solid from the specified faces with the neighborhood dmm_Create.
  3. Translation of the specified faces with neighborhood relative to the other faces of the solid dmm_MoveFacesByVector. The translation direction is defined by the 'direction' vector.
  4. Replacement of the specified faces by offset faces dmm_OffsetFaces. The distance of the offset (or radius change) is defined by 'value'.
  5. Radius change of the specified fillet faces dmm_FilletChange. The value of radius change is defined by 'value'.
  6. Replacement of the specified faces of a solid with a deformable NURBS faces for editing dmm_ConvertFacesToNurbs.
  7. Remove of the specified fillet faces from a solid dmm_PurifyFillets. Remove of the specified fillet faces with all smoothly connected fillets _modificationType==dmm_PurifyFilletsChains. Remove all fillets below specified radius from a solid _modificationType==dmm_PurifyFilletsBelowRadius.
  8. Edge vertices merging and edges removal dmm_DeleteEdges.
  9. Replacement of the smoothly joined faces with a single face dmm_UniteFaces.
  10. Rotation of the chosen faces dmm_RotateFaces with the adjacent fillets adaptation or dmm_RotateFacesNoFilletAdaptation without the adaptation. The parameters are the rotation angle and the rotation axis.
  11. Replacement of the specified faces of a solid dmm_ReplaceFaces.

Constructor & Destructor Documentation

◆ MbModifiedSolidParams() [1/7]

MbModifiedSolidParams::MbModifiedSolidParams ( MbeModifyingMode  modType,
const MbSNameMaker names,
const c3d::ItemIndices &  faces 
)

Constructor.

Constructor by parameters.

Parameters
[in]modType- Modification type. Available types for this constructor are: dmm_UniteFaces, dmm_Create, dmm_ConvertFacesToNurbs, dmm_PurifyFillets*.
[in]names- An object defining names generation in the operation.
[in]faces- Faces for the modification.

◆ MbModifiedSolidParams() [2/7]

MbModifiedSolidParams::MbModifiedSolidParams ( MbeModifyingMode  type,
const MbSNameMaker names,
const c3d::ItemIndices &  faces,
double  value 
)
inline

Constructor.

Constructor by parameters.

Parameters
[in]type- Modification type. Available types for this constructor are: dmm_OffsetFaces, dmm_FilletChange, dmm_RemoveBelowRadius, dmm_RemoveBelowRadiusWithAdjacentFillets, dmm_PurifyFilletsBelowRadius.
[in]names- An object defining names generation in the operation.
[in]faces- Faces for the modification.
[in]value- Offset value for dmm_OffsetFaces, value of fillet radius change for dmm_FilletChange, max value of a radius for dmm_Remove* and dmm_Purify*.

◆ MbModifiedSolidParams() [3/7]

MbModifiedSolidParams::MbModifiedSolidParams ( MbeModifyingMode  type,
const MbSNameMaker names,
const c3d::ItemIndices &  faces,
const MbAxis3D axis,
double  angle 
)
inline

Constructor.

Constructor by parameters.

Parameters
[in]type- Modification type. Available types for this constructor are: dmm_RotateFaces, dmm_RotateFacesNoFilletAdaptation.
[in]names- An object defining names generation in the operation.
[in]faces- Faces for the modification.
[in]axis- Rotation axis.
[in]angle- Rotation angle.

◆ MbModifiedSolidParams() [4/7]

MbModifiedSolidParams::MbModifiedSolidParams ( MbeModifyingMode  type,
const MbSNameMaker names,
const c3d::ItemIndices &  faces,
const MbVector3D direction 
)
inline

Constructor.

Constructor by parameters.

Parameters
[in]type- Modification type. Available types for this constructor are: dmm_MoveFacesByVector.
[in]names- An object defining names generation in the operation.
[in]faces- Faces for the modification.
[in]direction- Shiftdirection.

◆ MbModifiedSolidParams() [5/7]

template<class SurfArray >
MbModifiedSolidParams::MbModifiedSolidParams ( MbeModifyingMode  type,
const MbSNameMaker names,
const c3d::ItemIndices &  faces,
const SurfArray &  surfaces 
)
inline

Constructor.

Constructor by parameters.

Parameters
[in]type- Modification type. Available types for this constructor are: dmm_ConvertFacesToNurbs.
[in]names- An object defining names generation in the operation.
[in]faces- Faces for the modification.
[in]surfaces- Surfaces for the change (may be empty).

◆ MbModifiedSolidParams() [6/7]

template<class SurfArray >
MATH_FUNC_EX MbModifiedSolidParams::MbModifiedSolidParams ( MbeModifyingMode  type,
const MbSNameMaker names,
const c3d::ItemIndices &  replacedFaces,
const SurfArray &  replacementSurfaces,
bool  sameSurfaces,
const c3d::NumbersVector surfaceParts,
const c3d::DoubleVector offsets 
)

Constructor.

Constructor by parameters.

Parameters
[in]type- Modification type. Available types for this constructor are: dmm_ReplaceFaces.
[in]names- An object defining names generation in the operation.
[in]replacedFaces- Faces to be replaced.
[in]replacementSurfaces- Replacement surfaces.
[in]surfaceParts- An array of part numbers of surfaces to be used in several possible replacement options.
[in]sameSurfaces- Use the source surfaces (true) or its copies (false).
[in]offsets- Offsets from replacement surfaces.

◆ MbModifiedSolidParams() [7/7]

MbModifiedSolidParams::MbModifiedSolidParams ( MbeModifyingMode  modType,
const MbSNameMaker names,
const c3d::EdgeFacesIndices &  edges,
const c3d::BoolVector beginOrEnd 
)
inline

Constructor.

Constructor by parameters.

Parameters
[in]modType- Modification type. Available types for this constructor are: dmm_DeleteEdges.
[in]names- An object defining names generation in the operation.
[in]edges- Edges for the modification.
[in]beginOrEnd- Delete the beginning or the end of the corresponding edge.

Member Function Documentation

◆ GetFaces() [1/2]

void MbModifiedSolidParams::GetFaces ( c3d::ItemIndices &  faces) const

Get faces from values.

Get faces from values.

Parameters
[out]faces- Array of faces indices in shell, existing values are added at the end.

◆ GetFaces() [2/2]

void MbModifiedSolidParams::GetFaces ( SArray< MbItemIndex > &  faces) const

Get faces from values.

Get faces from values.

Parameters
[out]faces- Array of faces indices in shell, existing values are added at the end.

◆ FindFaces()

template<class FacesArray >
void MbModifiedSolidParams::FindFaces ( const MbFaceShell shell,
FacesArray &  faces 
) const

Get faces from values for the given shell.

Get faces from values for the given shell.

Parameters
[in]shell- Shell, where the faces are searched for.
[out]faces- Array of faces pointers, existing values are added at the end.

◆ AddEdge()

bool MbModifiedSolidParams::AddEdge ( const MbEdgeFacesIndexes edge,
bool  beginOrEnd 
)

Add edge to values.

Add edge to values wihout repeats.

Parameters
[in]edge- Edge index.
[in]beginOrEnd- Delete the beginning or the end of the edge.

◆ AddEdges()

bool MbModifiedSolidParams::AddEdges ( const c3d::EdgeFacesIndices &  edges,
const c3d::BoolVector beginOrEnds 
)

Add edges to values.

Add edges to values wihout repeats.

Parameters
[in]edges- Array of edge indices.
[in]beginOrEnds- Array of flags showing whether to delete the beginning or the end of the edge.

◆ GetEdges() [1/2]

void MbModifiedSolidParams::GetEdges ( c3d::EdgeFacesIndices &  edges,
c3d::BoolVector beginOrEnds 
) const

Get edges from values.

Get edges from values.

Parameters
[out]edges- Array of edges indices, existing values are added at the end.

◆ GetEdges() [2/2]

void MbModifiedSolidParams::GetEdges ( SArray< MbEdgeFacesIndexes > &  edges,
c3d::BoolVector beginOrEnds 
) const

Get edges from values.

Get edges from values.

Parameters
[out]edges- Array of edges indices, existing values are added at the end.

◆ AddSurface()

bool MbModifiedSolidParams::AddSurface ( MbSurface surf)

Add surface to change faces.

Add surface to change faces.

Parameters
[in]surf- Surface pointer.

◆ AddSurfaces()

template<class SurfArray >
bool MbModifiedSolidParams::AddSurfaces ( const SurfArray &  surfs)

Add surfaces to change faces.

Add surfaces to change faces.

Parameters
[in]surfs- Surface pointers array.

◆ GetSurfaces()

void MbModifiedSolidParams::GetSurfaces ( c3d::SurfacesVector &  surfs)

Get surfaces to change faces.

Get surfaces to change faces.

Parameters
[in]surfs- Surface pointers array.

Friends And Related Function Documentation

◆ CreateFaceModifiedSolid

MbCreator* CreateFaceModifiedSolid ( MbFaceShell outer,
MbeCopyMode  sameShell,
const ModifyValues oldParams,
const RPArray< MbFace > &  faces,
const RPArray< MbCurveEdge > &  edges,
const MbSNameMaker names,
MbResultType res,
MbFaceShell *&  shell 
)
friend

Construct the modified shell.

Construct the solid's shell by modification the source shell. The method performs one of the following actions depending on the parameter ModifyValues:

  1. Removal of the specified faces with the neighborhood from a solid (param.way==dmt_Remove).
  2. Creation of a solid from the specified faces with the neighborhood (param.way==dmt_Create).
  3. Translation of the specified faces with neighborhood relative to the other faces of the solid (param.way==dmt_Action).
  4. Replacement of the specified faces by offset faces (param.way==dmt_Offset).
  5. Radius change of the specified fillet faces (param.way==dmt_Fillet).
  6. Replacement of the specified faces of a solid with a deformable NURBS faces for editing (param.way==dmt_Supple).
  7. Removal of the specified fillet faces from a solid (param.way==dmt_Purify).
  8. Edge vertices merging and edges removal (param.way==dmt_Merger).
  9. Replacement of the smoothly joined faces with a single face (param.way==dmt_United).
  10. Rotation of the chosen faces (param.way==dmt_Rotate).
    The function simultaneously creates the shell and its constructor.
    Deprecated:
    The method is deprecated and will be removed in version 2024.
    Parameters
    [in]outer- The source shell.
    [in]sameShell- Mode of copying the source shell.
    [in]parameters- Parameters of the modification.
    [in]faces- Faces to be modified.
    [in]edges- Edges to be modified.
    [in]names- An object defining names generation in the operation.
    [out]res- The extrusion operation result code.
    [out]shell- The resultant shell.
    Returns
    Returns the shell constructor.

◆ EdgeModifiedSolid

MbResultType EdgeModifiedSolid ( MbSolid solid,
MbeCopyMode  sameShell,
const ModifyValues oldParams,
const RPArray< MbCurveEdge > &  edges,
const MbSNameMaker names,
MbSolid *&  result 
)
friend

Modify a solid by the methods of direct modeling.

Deprecated:
The method is deprecated and will be removed in version 2024.

The method performs the deletion of selectsd edges, merging their vertices and modification of surrounding faces (param.way==dmt_Merger). The direction of the vector "params.direction" determines whether the start vertex of an edge is merged with the end vertex, or whether the end vertex of an edge is merged with the start vertex.

Parameters
[in]solid- The initial solid.
[in]sameShell- The mode of copying of the initial solid.
[in]params- Parameters of the modification, the way must be equal to param.way==dmt_Merger.
[in]edges- Edges to be removed.
[in]names- An object for naming the new objects.
[out]result- The modified solid.
Returns
Returns operation result code.

◆ FaceModifiedSolid

MbResultType FaceModifiedSolid ( MbSolid solid,
MbeCopyMode  sameShell,
const ModifyValues params,
const RPArray< MbFace > &  faces,
const MbSNameMaker names,
MbSolid *&  result 
)
friend

Modify a solid by the methods of direct modeling.

Deprecated:
The method is deprecated and will be removed in version 2024.

The method performs one of the following actions depending on the parameter ModifyValues:

  1. Removal of the specified faces with the neighborhood from a solid (param.way==dmt_Remove).
  2. Creation of a solid from the specified faces with the neighborhood (param.way==dmt_Create).
  3. Translation of the specified faces with neighborhood relative to the other faces of the solid (param.way==dmt_Action).
  4. Replacement of the specified faces by offset faces (param.way==dmt_Offset).
  5. Radius change of the specified fillet faces (param.way==dmt_Fillet).
  6. Replacement of the specified faces of a solid with a deformable faces for editing (param.way==dmt_Supple).
  7. Removal of the specified fillet faces from a solid (param.way==dmt_Purify).
  8. Replacement of the smoothly joined faces with a single face (param.way==dmt_United).
  9. Rotation of the chosen faces (param.way==dmt_Rotate).
    Parameters
    [in]solid- The initial solid.
    [in]sameShell- The mode of copying of the initial solid.
    [in]params- Parameters of the modification.
    [in]faces- Faces to be modified.
    [in]names- An object for naming the new objects.
    [out]result- The modified solid.
    Returns
    Returns operation result code.

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