C3D Toolkit  Kernel - 117982, Vision - 2.9.2.2

The generating data. More...

#include <op_swept_parameter.h>

Public Types

enum class  MbeWireFrameType { undefined = 0 , planeContours = 1 , surfaceContours = 2 , spaceContours = 3 }
 Wire frame interpretation type. More...
 

Public Member Functions

 MbSweptData ()
 Default constructor.
 
 MbSweptData (const MbSweptData &, MbRegDuplicate *ireg=nullptr)
 Copy-constructor.
 
 MbSweptData (const MbPlacement3D &place, MbContour &contour)
 Constructor of planar swept. More...
 
 MbSweptData (MbSurface &_surface, RPArray< MbContour > &_contours)
 Constructor. More...
 
 MbSweptData (MbSurface &_surface, c3d::PlaneContoursSPtrVector &_contours)
 Constructor. More...
 
 MbSweptData (MbCurve3D &_curve3d)
 Constructor. More...
 
 MbSweptData (c3d::SpaceCurvesSPtrVector &_curves3d)
 Constructor by 3d curves. More...
 
 MbSweptData (MbContour3D &_contour3d)
 Constructor. More...
 
 MbSweptData (RPArray< MbContour3D > &_contours3d)
 Constructor. More...
 
 MbSweptData (c3d::SpaceContoursSPtrVector &_contours3d)
 Constructor. More...
 
 MbSweptData (MbSolid &_solid, const MbSNameMaker *newNameMaker=nullptr)
 Constructor. More...
 
 MbSweptData (MbSurface *_surface, RPArray< MbContour > &_contours, RPArray< MbContour3D > &_contours3d, MbSolid *_solid)
 Constructor. More...
 
 MbSweptData (MbWireFrame &_wireFrame, MbeWireFrameType _wireFrameType=MbeWireFrameType::undefined)
 Constructor. More...
 
 ~MbSweptData ()
 Destructor.
 
bool AddData (MbSurface &_surface, const RPArray< MbContour > &_contours)
 Add data. More...
 
bool AddData (MbSurface &_surface, c3d::PlaneContoursSPtrVector &_contours)
 Add data. More...
 
size_t CurvesCount () const
 The count of all the curves. More...
 
SPtr< MbCurve3DGetCurve3D (size_t i) const
 Get the curve by the index. More...
 
bool IsSurfaceCurvesData () const
 Is there data of two-dimensional curves on the surface?
 
bool IsSpaceCurvesData () const
 Is there data of spatial curves?
 
bool IsWireFrameData () const
 Is there data about the wire frame?
 
bool IsSolidData () const
 Is there data about the solid?
 
const MbSurfaceGetSurface () const
 Get the surface.
 
MbSurfaceSetSurface ()
 Get the surface for editing.
 
void SetSurface (const MbSurface &surf)
 Set a surface. More...
 
const c3d::PlaneContoursSPtrVector & GetContours () const
 Get the set of two-dimensional contours.
 
const c3d::SpaceContoursSPtrVector & GetContours3D () const
 Get the set of three-dimensional contours.
 
const MbWireFrameGetWireFrame () const
 Get the wire frame.
 
MbWireFrameSetWireFrame () const
 Get the wire frame for editing.
 
MbeWireFrameType GetWireFrameType () const
 Get wire frame interpretation type.
 
const MbSolidGetSolid () const
 Get the solid.
 
MbSolidSetSolid () const
 Get the solid for editing.
 
void RebuildItem ()
 Rebuild object according to the history tree. For rebuilding the wire frame.
 
void GetWireFrameContours (c3d::PlaneContoursSPtrVector &wireContours, c3d::SurfaceSPtr &wireSurface, c3d::SpaceContoursSPtrVector &wireContours3D, RPArray< MbSNameMaker > *contoursNames=nullptr) const
 Get two-dimensional contours with a surface or three-dimensional contours obtained from a wireframe. More...
 
size_t GetWireFrameSurfaceContours (c3d::SurfacesSPtrVector &wireSurfaces, std::vector< c3d::PlaneContoursSPtrVector > &wireContours, std::vector< c3d::SNamesMakerSPtrVector > &contoursNames, VERSION version=Math::DefaultMathVersion()) const
 Get two-dimensional contours with a surface obtained from a wireframe. More...
 
size_t GetWireFrameSpaceContours (c3d::SpaceContoursSPtrVector &wireContours3D, c3d::SNamesMakerSPtrVector &contoursNames) const
 Get space contours obtained from a wireframe. More...
 
void Transform (const MbMatrix3D &matr, MbRegTransform *iReg=nullptr)
 Transform the object. More...
 
void Move (const MbVector3D &to, MbRegTransform *iReg=nullptr)
 Move the object. More...
 
void Rotate (const MbAxis3D &axis, double angle, MbRegTransform *iReg=nullptr)
 Rotate the object. More...
 
bool IsSame (const MbSweptData &other, double accuracy) const
 Determine whether the objects are equal. More...
 
bool IsSimilar (const MbSweptData &other) const
 Determine whether the objects are similar. More...
 
bool SetEqual (const MbSweptData &other)
 Make objects equal. More...
 
bool IsContoursClosed () const
 Whether all contours are closed. More...
 
bool CheckSurfaceContourConnection (double eps) const
 Check that there are no gaps between the segments of the surface contours.
 
bool CheckSpaceContourConnection (double eps) const
 Check that there are no gaps between the segments of the spatial contours.
 

Detailed Description

The generating data.

Data about generating of movement operation.
При указании тела и поверхности одновременно предполагается, что выполняется кинематическая операция над телом вдоль кривой на этой поверхности, причем движение согласовано с нормалью.
Generating of extrusion operation, rotation or sweeping operation can include a set of two-dimensional contours, a set of three-dimensional contours, wire frame, solid.
For a set of two-dimensional contours on the surface, the following restrictions:

  • can be one or multiple contours;
  • If there are multiple contours, all of them must be either closed or open;
  • if contours are closed, then they can be nested into each other, the level of nesting is not limited;
  • contours can't overlap each other or self-intersect.
    For two-dimensional contour on the non-planar surface is additional constraint: all the contours must be closed.
    Constructing operation by two-dimensional contours on non-planar surface it is necessary to specify the by the user face of solid as generating. In this case, the generating data can be obtained by the method of face MbFace::GetSurfaceCurvesData.
    Constraints for three-dimensional contour:
  • contours can't overlap each other or self-intersect.
    When set a solid and a surface at the same time, we suppose that sweeping operation over solid along curve on surface is done, and moving is according to surface normal.

Member Enumeration Documentation

◆ MbeWireFrameType

Wire frame interpretation type.

Enumerator
undefined 

Undefined.

planeContours 

Contours on plane.

surfaceContours 

Contours on surface.

spaceContours 

Space contours.

Constructor & Destructor Documentation

◆ MbSweptData() [1/11]

MbSweptData::MbSweptData ( const MbPlacement3D place,
MbContour contour 
)

Constructor of planar swept.

Constructor of planar swept from one contour.

Parameters
[in]place- A local coordinate system.
[in]contour- Contour in parameters of the given coordinate system. Used original.

◆ MbSweptData() [2/11]

MbSweptData::MbSweptData ( MbSurface _surface,
RPArray< MbContour > &  _contours 
)

Constructor.

Constructor by a set of contours on a surface.

Parameters
[in]_surface- The surface. Used original.
[in]_contours- A set of contours. Used originals.

◆ MbSweptData() [3/11]

MbSweptData::MbSweptData ( MbSurface _surface,
c3d::PlaneContoursSPtrVector &  _contours 
)

Constructor.

Constructor by a set of contours on a surface.

Parameters
[in]_surface- The surface. Used original.
[in]_contours- A set of contours. Used originals.

◆ MbSweptData() [4/11]

MbSweptData::MbSweptData ( MbCurve3D _curve3d)

Constructor.

Constructor by a contour.

Parameters
[in]_curve3d- A curve. Used originals.

◆ MbSweptData() [5/11]

MbSweptData::MbSweptData ( c3d::SpaceCurvesSPtrVector &  _curves3d)

Constructor by 3d curves.

Constructor by 3d curves.

Parameters
[in]_curves3d- A curves. Used originals.

◆ MbSweptData() [6/11]

MbSweptData::MbSweptData ( MbContour3D _contour3d)

Constructor.

Constructor by a contour.

Parameters
[in]_contour3d- A contour. Used originals.

◆ MbSweptData() [7/11]

MbSweptData::MbSweptData ( RPArray< MbContour3D > &  _contours3d)

Constructor.

Constructor by a set of spatial contours.

Parameters
[in]_contours3d- A set of contours. Used originals.

◆ MbSweptData() [8/11]

MbSweptData::MbSweptData ( c3d::SpaceContoursSPtrVector &  _contours3d)

Constructor.

Constructor by a set of spatial contours.

Parameters
[in]_contours3d- A set of contours. Used originals.

◆ MbSweptData() [9/11]

MbSweptData::MbSweptData ( MbSolid _solid,
const MbSNameMaker newNameMaker = nullptr 
)

Constructor.

Constructor by a solid.

Parameters
[in]_solid- A solid. Used original of object.
[in]newNameMaker- New main name for names of solid's topological elements.

◆ MbSweptData() [10/11]

MbSweptData::MbSweptData ( MbSurface _surface,
RPArray< MbContour > &  _contours,
RPArray< MbContour3D > &  _contours3d,
MbSolid _solid 
)

Constructor.

Constructor of mixed swept.

Parameters
[in]_surface- The surface. Used original.
[in]_contours- Set of two-dimensional contours in the parameters of the given surface. Used originals.
[in]_contours3d- A set of three-dimensional contours. Used originals.
[in]_solid- A solid. Used original of object.

◆ MbSweptData() [11/11]

MbSweptData::MbSweptData ( MbWireFrame _wireFrame,
MbeWireFrameType  _wireFrameType = MbeWireFrameType::undefined 
)

Constructor.

Constructor по three-dimensional wire frame. Used original.

Parameters
[in]_wireFrame- Three-dimensional wire frame.
[in]_wireFrameType- Wire frame interpretation type.

Member Function Documentation

◆ AddData() [1/2]

bool MbSweptData::AddData ( MbSurface _surface,
const RPArray< MbContour > &  _contours 
)

Add data.

Add data about contours to the surface.

Parameters
[in]_surface- The surface. Added original of the object.
[in]_contours- A set of contours. Originals are added.

◆ AddData() [2/2]

bool MbSweptData::AddData ( MbSurface _surface,
c3d::PlaneContoursSPtrVector &  _contours 
)

Add data.

Add data about contours to the surface.

Parameters
[in]_surface- The surface. Added original of the object.
[in]_contours- A set of contours. Originals are added.

◆ CurvesCount()

size_t MbSweptData::CurvesCount ( ) const

The count of all the curves.

The total count of two and three-dimensional curves.

◆ GetCurve3D()

SPtr<MbCurve3D> MbSweptData::GetCurve3D ( size_t  i) const

Get the curve by the index.

Get the curve from set of curves on the surface and three-dimensional curves.

Parameters
[in]i- The index of curve from 0 to CurvesCount().
Returns
Curve on the surface or three-dimensional curve.

◆ SetSurface()

void MbSweptData::SetSurface ( const MbSurface surf)
inline

Set a surface.

Set a surface.

Set surface carrier of two-dimensional contours or desired surface-carrier of guide curve.

Parameters
[in]surf- Surface carrier of two-dimensional contours or desired surface-carrier of guide curve.

◆ GetWireFrameContours()

void MbSweptData::GetWireFrameContours ( c3d::PlaneContoursSPtrVector &  wireContours,
c3d::SurfaceSPtr wireSurface,
c3d::SpaceContoursSPtrVector &  wireContours3D,
RPArray< MbSNameMaker > *  contoursNames = nullptr 
) const

Get two-dimensional contours with a surface or three-dimensional contours obtained from a wireframe.

Get two-dimensional contours with a surface or three-dimensional contours obtained from a wireframe. A wireframe is treated as a surface contours if the contours have a common surface, else than spatial.

Parameters
[out]wireContours- Set of two-dimensional contours..
[out]wireSurface- Surface.
[out]wireContours3D- Set of three-dimensional contours.
[in,out]contoursNames- At the input - the frame edge namer. At the output - the namer of the obtained contours.

◆ GetWireFrameSurfaceContours()

size_t MbSweptData::GetWireFrameSurfaceContours ( c3d::SurfacesSPtrVector &  wireSurfaces,
std::vector< c3d::PlaneContoursSPtrVector > &  wireContours,
std::vector< c3d::SNamesMakerSPtrVector > &  contoursNames,
VERSION  version = Math::DefaultMathVersion() 
) const

Get two-dimensional contours with a surface obtained from a wireframe.

Get two-dimensional contours with a surface obtained from a wireframe. Contours will be created if the wireframe type is set to frameType == wft_planeContours or frameType == wft_surfaceContours. The frame is treated as flat or surface contours, depending on the specified frameType

Parameters
[out]wireSurfaces- A set of surfaces.
[out]wireContours- Sets of two-dimensional contours for all surface.
Returns
Number of surfaces and contour sets.

◆ GetWireFrameSpaceContours()

size_t MbSweptData::GetWireFrameSpaceContours ( c3d::SpaceContoursSPtrVector &  wireContours3D,
c3d::SNamesMakerSPtrVector &  contoursNames 
) const

Get space contours obtained from a wireframe.

Get space contours obtained from a wireframe. Contours will be created if frameType == wrf_spaceContours is set.

Parameters
[out]wireContours- Sets of two-dimensional contours for all surface.
Returns
Number of contours.

◆ Transform()

void MbSweptData::Transform ( const MbMatrix3D matr,
MbRegTransform iReg = nullptr 
)

Transform the object.

Transform the initial object according to the matrix using the registrator.

Parameters
[in]matr- A transformation matrix.
[in]iReg- Registrator.

◆ Move()

void MbSweptData::Move ( const MbVector3D to,
MbRegTransform iReg = nullptr 
)

Move the object.

Move a geometric object along the vector using the registrator.

Parameters
[in]to- Translation vector.
[in]iReg- Registrator.

◆ Rotate()

void MbSweptData::Rotate ( const MbAxis3D axis,
double  angle,
MbRegTransform iReg = nullptr 
)

Rotate the object.

Rotate an object about the axis by the given angle using the registrator.

Parameters
[in]axis- The rotation axis.
[in]angle- The rotation angle.
[in]iReg- Registrator.

◆ IsSame()

bool MbSweptData::IsSame ( const MbSweptData other,
double  accuracy 
) const

Determine whether the objects are equal.

Determine whether the objects are equal with defined accuracy.

Parameters
[in]other- Object for comparison.
Returns
Whether the objects are similar.

◆ IsSimilar()

bool MbSweptData::IsSimilar ( const MbSweptData other) const

Determine whether the objects are similar.

Similar object can be initialized by data of object which is similar to it.

Parameters
[in]other- Object for comparison.
Returns
Whether the objects are similar.

◆ SetEqual()

bool MbSweptData::SetEqual ( const MbSweptData other)

Make objects equal.

It is possible to make equal only similar objects.

Parameters
[in]init- Object for initialization.
Returns
Whether the object is made equal to the given one.

◆ IsContoursClosed()

bool MbSweptData::IsContoursClosed ( ) const

Whether all contours are closed.

Whether all contours are closed.

Returns
Returns true if all contours are closed.

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