C3D Toolkit  Kernel - 117982, Vision - 2.9.2.2

Multiline. More...

#include <multiline.h>

+ Inheritance diagram for MbMultiline:
+ Collaboration diagram for MbMultiline:

Public Member Functions

 MbMultiline ()
 Constructor of an empty multiline.

 
 MbMultiline (const MbContour &_basisCurve, const StVertexOfMultilineInfo &vertInfo, const SArray< double > &_equidRadii, const StMLTipParams &_begTipParams, const StMLTipParams &_endTipParams, bool _processClosed, bool _isTransparent)
 Constructor. More...
 
Common functions of a geometric object
MbePlaneType IsA () const override
 Get the object type.
 
MbePlaneType Type () const override
 Get the group type of the object.
 
MbePlaneType Family () const override
 Get family of object.
 
bool IsSame (const MbPlaneItem &other, double accuracy=LENGTH_EPSILON) const override
 Determine whether objects are equal. More...
 
bool IsSimilar (const MbPlaneItem &item) const override
 Determine whether the objects are similar. More...
 
bool SetEqual (const MbPlaneItem &item) override
 Make the objects equal. More...
 
void Transform (const MbMatrix &matr, MbRegTransform *=nullptr, const MbSurface *newSurface=nullptr) override
 Transform according to the matrix. More...
 
void Move (const MbVector &to, MbRegTransform *=nullptr, const MbSurface *newSurface=nullptr) override
 Translate along a vector. More...
 
void Rotate (const MbCartPoint &pnt, const MbDirection &angle, MbRegTransform *=nullptr, const MbSurface *newSurface=nullptr) override
 Rotate about a point. More...
 
MbPlaneItemDuplicate (MbRegDuplicate *=nullptr) const override
 Create a copy. More...
 
void AddYourGabaritTo (MbRect &r) const override
 Extend the given bounding rectangle so that it encloses this object.
 
bool IsVisibleInRect (const MbRect &r, bool exact=false) const override
 Determine visibility of an object in rectangle. More...
 
double DistanceToPoint (const MbCartPoint &toP) const override
 Calculate the distance to a point.
 
bool DistanceToPointIfLess (const MbCartPoint &to, double &distance) const override
 Calculate the distance to a point. More...
 
MbPropertyCreateProperty (MbePrompt name) const override
 Create your own property with specified name.
 
void GetProperties (MbProperties &properties) override
 Get properties of the object. More...
 
void SetProperties (const MbProperties &properties) override
 Change properties of the object. More...
 
void GetBasisPoints (MbControlData &) const override
 Get control points of object.
 
void SetBasisPoints (const MbControlData &) override
 Change the object by control points.
 
Functions for access to data
const MbContourGetBasisCurve () const
 Base curve.
 
MbContourSetBasisCurve ()
 Get base curve for editing.
 
size_t GetVerticesCount () const
 Count of vertices.
 
const StVertexOfMultilineInfoGetVertex (size_t i) const
 Vertex by an index. Index must be less than count of vertices.
 
size_t GetEquidRadiiCount () const
 Count of radii of equidistant curves.
 
double GetEquidRadius (size_t i) const
 Radius of equidistant curve by an index. Index must be less than count of radii.
 
const StMLTipParamsGetBegTipParams () const
 Parameters of tip at the beginning of multiline.
 
const StMLTipParamsGetEndTipParams () const
 Parameters of a tip at the end of a multiline.
 
bool IsProcessClosed () const
 An attribute of the base curve closedness processing.
 
bool IsTransparent () const
 Transparency of multiline.
 
size_t GetCurvesCount () const
 Count of curves of a multiline.
 
const MbContourWithBreaksGetCurve (size_t i) const
 Curve of multiline by an index. Index must be less than count of curves.
 
size_t GetTipCurvesCount () const
 Count of tip-curves at vertices of multiline.
 
const MbContourGetTipCurve (size_t i) const
 Tip-curve by an index. Index must be less than the count of tips.
 
const MbContourGetBegTipCurve () const
 Tip at the beginning of a multiline.
 
const MbContourGetEndTipCurve () const
 Tip at the end of a multiline.
 
double GetMaxPosRadius () const
 Maximum possible positive radius for non-everted construction.
 
double GetMinNegRadius () const
 Minimum possible negative radius for non-everted construction.
 
size_t GetMinNotDegInd () const
 Index of non-degenerated curve of a multiline with minimal radius.
 
size_t GetMaxNotDegInd () const
 Index of non-degenerated curve of a multiline with maximal radius.
 
Functions for changing data: changing the base curve of a multiline
void ClearBasisCurve ()
 Clear the base curve.
 
void ReplaceBasisCurve (const MbContour &_basisCurve, const StVertexOfMultilineInfo &vertInfo)
 Replace the base curve. More...
 
bool AddBasisSegment (MbCurve *segment, const StVertexOfMultilineInfo &vertInfo)
 Add a segment to a base curve. More...
 
void DeleteLastBasisSegment ()
 Delete the last segment of the base curve.
 
size_t InsertVertex (double t, const StVertexOfMultilineInfo &vertInfo)
 Insert a vertex. More...
 
bool RemoveVertex (size_t i)
 Delete a vertex of multiline. More...
 
bool SetBasisCurvesGeoHotPoint (size_t segInd, size_t subInd, const MbCartPoint &newPoint)
 Shift a geometric hot-point. More...
 
bool DelBasisCurvesGeoHotPoint (size_t segInd, size_t subInd)
 Delete a geometric hot-point. More...
 
Functions for changing data: fillet and chamfer of the base curve
bool FilletTwoBasisSegments (ptrdiff_t &index, double rad, const StVertexOfMultilineInfo &vertInfo)
 Fillet two neighboring segments. More...
 
bool FilletBasisCurve (double rad, const StVertexOfMultilineInfo &vertInfo)
 Fillet the base curve. More...
 
bool ChamferTwoBasisSegments (ptrdiff_t &index, double len, double par, bool type, bool firstSeg, const StVertexOfMultilineInfo &vertInfo)
 Insert a chamfer between two neighboring segments of the base curve of a multiline. More...
 
bool ChamferBasisCurve (double len, double par, bool type, const StVertexOfMultilineInfo &vertInfo)
 Insert a chamfer between each two neighboring segments of the base curve of a multiline. More...
 
Functions for changing data: changing the parameters of a vertex of a multiline
void SetSmoothJoint (size_t i, bool othSmoothJoint)
 Set the flag of smooth joint. More...
 
void SetTracingType (size_t i, EnMLVertexTracingType othTracingType)
 Set the type of traverse. More...
 
void SetSpecFilletRad (size_t i, double othSpecFilletRad)
 Set the radius of a special fillet. More...
 
void SetTipType (size_t i, EnMLInnerTipType othTipType)
 Set the type of a tip. More...
 
void SetTipDirection (size_t i, bool othFirstSegTip)
 Set the direction of a tip. More...
 
void SetVertexOfMultilineInfo (size_t i, const StVertexOfMultilineInfo &vertInfo)
 Set the information about a vertex. More...
 
Functions for changing data: changing the radii of equidistant curves
bool SetRadius (size_t i, double radius, size_t &newIndex)
 Set the value of radius of curve. More...
 
bool SetRadii (const CSSArray< double > &newRadii)
 Changing all radii of curves. More...
 
void ChangeRadius (double oldRadius, double radius)
 Change the radius. More...
 
size_t AddRadius (double radius)
 Add the radius of a curve of multiline. More...
 
bool RemoveRadius (size_t i)
 Delete a curve. More...
 
bool RemoveRadius (double oldRadius)
 Delete a curve. More...
 
Functions for changing data: change the parameters of tips
void SetBegTipType (EnMLTipType othTipType)
 Change the type of a tip at the beginning. More...
 
void SetBegTipParam (double othTipParam)
 Change the parameter of a tip at the beginning. More...
 
void SetEndTipType (EnMLTipType othTipType)
 Change the type of a tip at the end. More...
 
void SetEndTipParam (double othTipParam)
 Change the parameter of a tip at the end. More...
 
Functions for changing data
void SetProcessClosed (bool othProcessClosed)
 Change the closedness processing. More...
 
void SetTransparent (bool othTransparent)
 Change the transparency of multiline. More...
 
Working with breaks: addition of breaks
bool DeletePartP1P2 (MbContourWithBreaks *contour, const MbCartPoint &point1, const MbCartPoint &point2, const MbCartPoint &point3, bool invertBreak=false)
 Trimming of a piece of a curve of multiline between points. More...
 
bool DeletePartP1P2 (size_t cNumber, const MbCartPoint &point1, const MbCartPoint &point2, const MbCartPoint &point3, bool invertBreak=false)
 Trimming of a piece of a curve of multiline between points. More...
 
bool DeletePartP1P2 (size_t cNumber, double t1, double t2, double t3, bool invertBreak=false)
 Trimming of a piece of a curve of multiline between parameters of contour. More...
 
Working with breaks: deletion of breaks
bool DeleteBreaks ()
 Remove breaks. More...
 
bool DeleteBreaks (size_t cNumber)
 Remove breaks of curve. More...
 
bool DeleteBreak (size_t cNumber, double t)
 Delete a break of curve. More...
 
bool DeleteBreakAtNumber (size_t cNumber, size_t brNumber)
 Delete a break. More...
 
bool DeleteSmallBreaks (size_t cNumber, double length)
 Delete breaks of small length. More...
 
bool DeleteSmallVisContours (size_t cNumber, double length)
 Delete small visible pieces. More...
 
Working with breaks
bool IsRectInBreak (size_t cNumber, const MbRect1D &rect)
 Whether the interval is on a break. More...
 
void GetBreaksInInvisContours (RPArray< MbContour > &invisContours)
 Memorize the breaks. More...
 
void AddBreaksByInvisContours (RPArray< MbContour > &invisContours)
 Add breaks. More...
 
void CurvesIntersectNumbers (const MbCartPoint &p1, const MbCartPoint &p2, SArray< size_t > &cNumbers) const
 Indices of contours intersected with a segment. More...
 
Information about multiline.
bool IsDegenerate (double lenEps=Math::LengthEps) const
 Whether the multiline is degenerate.
 
bool IsClosed () const
 Whether the multiline is closed.
 
double GetWidth () const
 Get width of multiline.
More...
 
bool IsPointOn (const MbCartPoint &point) const
 Whether the given point is on multiline.
 
size_t FindRadius (double radius)
 Find an index of a curve of multiline. More...
 
Operations with multiline
MbMultilineTrimmed (double t1, double t2, int sense) const
 Truncate multiline. More...
 
- Public Member Functions inherited from MbPlaneItem
virtual ~MbPlaneItem ()
 Destructor.
 
void PrepareWrite () const
 Object registration. More...
 
MbeRefType RefType () const override
 Get the registration type (for copying, duplication).
 
virtual void Rotate (const MbCartPoint &pnt, double angle, MbRegTransform *iReg=nullptr, const MbSurface *newSurface=nullptr)
 Rotate about a point. More...
 
virtual void Refresh ()
 Set all temporary (mutable) data of object to undefined (initial) state.
 
- 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.
 
- Public Member Functions inherited from MbRefItem
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.
 

Protected Member Functions

 MbMultiline (const MbMultiline &)
 Copy-constructor.
 
- Protected Member Functions inherited from MbPlaneItem
 MbPlaneItem ()
 Constructor.
 
- Protected Member Functions inherited from MbRefItem
 MbRefItem ()
 Constructor without parameters.
 

Detailed Description

Multiline.

Multiline is a composite geometric object consisting of
1) 'curves' curves constructed to be equidistant to base line 'basisCurve' of the multiline with 'equidRadii' radii. The method of traverse of corners for each vertex of 'basisCurve' is defined separately (with the help of vertices.tracingType and vertices.specFilletRad).
2) 'tipCurves' array of tips at vertices of multiline, which type is defined by corresponding vertices[i].tipParams.tipType.
3) 'begTipCurve' and 'endTipCurve' tips at the ends of multiline, which type is defined with the help of 'begTipParams' and 'endTipParams'.
While creating line of multiline (adding equidistance radius) the contour is created which will be alive (can be changed only internally) while the 'equidRadii' array contains element at the beginning corresponding to it.
The contour of a tip will be alive while the corresponding type of the tip isn't equal to m_t_UndefTip.
SetTipType functions care about the existence and removal of tips.
Degenerated regions are excluded only at vertices (overlaps) while constructing the curves of a multiline.

Constructor & Destructor Documentation

◆ MbMultiline()

MbMultiline::MbMultiline ( const MbContour _basisCurve,
const StVertexOfMultilineInfo vertInfo,
const SArray< double > &  _equidRadii,
const StMLTipParams _begTipParams,
const StMLTipParams _endTipParams,
bool  _processClosed,
bool  _isTransparent 
)

Constructor.

Constructor.

Parameters
[in]_basisCurve- Base curve.
[in]vertInfo- Information about a vertex of the multiline (applied to all vertices).
[in]_equidRadii- Sorted array of radii of equidistant curves.
[in]_begTipParams- Parameters of tip at the beginning of multiline.
[in]_endTipParams- Parameters of a tip at the end of a multiline.
[in]_processClosed- Whether to process the closedness of the base curve.
[in]_isTransparent- Whether the multiline is "transparent"
parameter isn't used, multiline is considered to be transparent.

Member Function Documentation

◆ IsSame()

bool MbMultiline::IsSame ( const MbPlaneItem item,
double  accuracy = LENGTH_EPSILON 
) const
overridevirtual

Determine whether objects are equal.

Objects of the same types with similar (equal) data are considered to be equal.

Parameters
[in]item- Object for comparison.
[in]accuracy- The accuracy.
Returns
Whether the objects are equal.

Implements MbPlaneItem.

◆ IsSimilar()

bool MbMultiline::IsSimilar ( const MbPlaneItem item) const
overridevirtual

Determine whether the objects are similar.

Objects of the same type are considered to be similar if data of the objects can be equated or the data are also similar (pointers). Similar object can be initialized by data of object similar to it (equate one to another without changing of addresses).

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

Reimplemented from MbPlaneItem.

◆ SetEqual()

bool MbMultiline::SetEqual ( const MbPlaneItem item)
overridevirtual

Make the objects equal.

It is possible to make equal only similar objects. Similar object is equated to a given one by changing of numerical data.

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

Implements MbPlaneItem.

◆ Transform()

void MbMultiline::Transform ( const MbMatrix matr,
MbRegTransform iReg = nullptr,
const MbSurface newSurface = nullptr 
)
overridevirtual

Transform according to the matrix.

Transform the initial object according to the matrix using the registrator. If the object contains references to the other geometric objects, then the nested objects are transformed according to the matrix. The registrator is used for preventing multiple transformation of the object. The function can be used without the registrator to transform a single object. The registrator must be used to transform a set of interdependent objects to prevent repeated transformation of the nested objects, since it is not ruled out that several objects from the set contain references to one or several common objects subject to transformation.

Parameters
[in]matr- A transformation matrix.
[in]iReg- Registrator.
[in]surface- New base surface of object provided that 'matr' is a transformation matrix from the old surface to a new one. For transformation of projection curve. It isn't considered if the surface is planar.

Implements MbPlaneItem.

◆ Move()

void MbMultiline::Move ( const MbVector to,
MbRegTransform iReg = nullptr,
const MbSurface newSurface = nullptr 
)
overridevirtual

Translate along a vector.

Translate a geometric object along the vector using the registrator. If the object contains references to the other objects, then the translation operation is applied to the nested objects. The registrator is used for preventing multiple transformation of the object. The function can be used without the registrator to transform a single object. The registrator must be used to transform a set of interdependent objects to prevent repeated transformation of the nested objects, since it is not ruled out that several objects from the set contain references to one or several common objects subject to translation.

Parameters
[in]to- Translation vector.
[in]iReg- Registrator.
[in]surface- New base surface of object provided that 'matr' is a transformation matrix from the old surface to a new one. For transformation of projection curve. It isn't considered if the surface is planar.

Implements MbPlaneItem.

◆ Rotate()

void MbMultiline::Rotate ( const MbCartPoint pnt,
const MbDirection angle,
MbRegTransform iReg = nullptr,
const MbSurface newSurface = nullptr 
)
overridevirtual

Rotate about a point.

Rotate an object about a point by the given angle using the registrator. If the object contains references to the other geometric objects, then the rotation operation is applied to the nested objects too. The registrator is used for preventing multiple transformation of the object. The function can be used without the registrator to transform a single object. The registrator must be used to transform a set of interdependent objects to prevent repeated transformation of the nested objects, since it is not ruled out that several objects from the set contain references to one or several common objects subject to rotation.

Parameters
[in]pnt- Fixed point.
[in]angle- The rotation angle.
[in]iReg- Registrator.
[in]surface- New base surface of object provided that 'matr' is a transformation matrix from the old surface to a new one. For transformation of projection curve. It isn't considered if the surface is planar.

Implements MbPlaneItem.

◆ Duplicate()

MbPlaneItem& MbMultiline::Duplicate ( MbRegDuplicate iReg = nullptr) const
overridevirtual

Create a copy.

Create a copy of the object using the registrator. The registrator is used for preventing multiple copying of an object. If the object contains references to other objects, then the included objects are copied too. It is allowed not to pass the registrator to a function. Then the new copy of the object will be created. It is allowed not to use the registrator while copying a single object or a set of disconnected objects. The registrator must be used to copy several correlated objects successively. It is possible that the objects' connection means that the objects contain references to the common objects. Then, while copying without using the registrator, one can get a set of copies which contain references to the different copies of a single included object, what leads to loss of connection between the copies.

Parameters
[in]iReg- Registrator.
Returns
Copy of the object.

Implements MbPlaneItem.

◆ IsVisibleInRect()

bool MbMultiline::IsVisibleInRect ( const MbRect rect,
bool  exact = false 
) const
overridevirtual

Determine visibility of an object in rectangle.

It is considered that the object is visible in rectangle if bounds of an object is crossed with the given rectangle or (high requirements to accuracy, exact = true) at least one point of object is in the rectangle.

Parameters
[in]rect- Rectangle to check getting to.
[in]exact- Check accuracy. If exact = true, then at least one point of object gets to the rectangle. if exact = false, it is sufficient to find intersection between rectangle and bounding box of an object.
Returns
true, if the object is visible in the rectangle, otherwise false.

Implements MbPlaneItem.

◆ DistanceToPointIfLess()

bool MbMultiline::DistanceToPointIfLess ( const MbCartPoint to,
double &  d 
) const
overridevirtual

Calculate the distance to a point.

Calculate distance to object from a given point near the object. Distance is calculated and stored to 'd' variable if it is less then initial value of 'd'. There can be performance benefit in comparison with DistanceToPoint function due to primarily checking the distance from point to bounding box and performing the further calculations only if this distance is not greater than the given one.

Parameters
[in]to- Point.
[in,out]d- Specified distance from object on input. Distance from point to object on output if operation succeeded.
Returns
True if distance from point to the object is less than the given one, otherwise false. Calculate the distance from a point and change the given value of distance if the distance is less than the given one.

Implements MbPlaneItem.

◆ GetProperties()

void MbMultiline::GetProperties ( MbProperties properties)
overridevirtual

Get properties of the object.

Get internal data (properties) of an object for viewing and modification.

Parameters
[in]properties- Container for internal data of an object.

Implements MbPlaneItem.

◆ SetProperties()

void MbMultiline::SetProperties ( const MbProperties properties)
overridevirtual

Change properties of the object.

Change internal data (properties) of object is performed by copying of corresponding values from the given object.

Parameters
[in]properties- Container for internal data of an object.

Implements MbPlaneItem.

◆ ReplaceBasisCurve()

void MbMultiline::ReplaceBasisCurve ( const MbContour _basisCurve,
const StVertexOfMultilineInfo vertInfo 
)

Replace the base curve.

Replace the base curve.

When replacing the base curve of multiline all of its breaks are removed.

Parameters
[in]_basisCurve- New base curve.
[in]vertInfo- New information about vertices of multiline.

◆ AddBasisSegment()

bool MbMultiline::AddBasisSegment ( MbCurve segment,
const StVertexOfMultilineInfo vertInfo 
)

Add a segment to a base curve.

Add a segment to a base curve.

Parameters
[in]segment- Segment to add,
if it is polyline or contour, then only component segments are added to the multiline.
[in]vertInfo- Information is assigned to all added or changed vertices.
Returns
True if a segment has been added.

◆ InsertVertex()

size_t MbMultiline::InsertVertex ( double  t,
const StVertexOfMultilineInfo vertInfo 
)

Insert a vertex.

Insert a vertex. Segment is split into two segments.

Parameters
[in]t- Parameter on the base curve.
[in]vertInfo- Information about new vertex of a multiline.
Returns
Index of split segment.

◆ RemoveVertex()

bool MbMultiline::RemoveVertex ( size_t  i)

Delete a vertex of multiline.

Delete a vertex of multiline.

Pair of segments adjoining the vertex is replaced by a segment.
Breaks on adjacent segments are disappeared. Breaks on straight adjacent segments are remained by binding to the vertices of a new segment.

Parameters
[in]i- An index of a vertex.
Returns
True if a vertex is deleted.

◆ SetBasisCurvesGeoHotPoint()

bool MbMultiline::SetBasisCurvesGeoHotPoint ( size_t  segInd,
size_t  subInd,
const MbCartPoint newPoint 
)

Shift a geometric hot-point.

Shift a geometric hot-point of the base curve.

While shifting point, the contour breaks corresponding to adjacent straight segments are bound to the neighboring fixed vertices of the base curve.

Parameters
[in]segInd- An index of a segment.
[in]subInd- An index of a point on the segment:
if subInd = 0 - common point between two segments (can be specified for any segment),
if subInd = 1 - middle point of a segment, middle point of an arc, the base point of pt_Nurbs and pt_Bezier splines,
if subInd > 1 - base point of pt_Nurbs and pt_Bezier splines.
[in]newPoint- New position of the point.
Returns
Point has been shifted.

◆ DelBasisCurvesGeoHotPoint()

bool MbMultiline::DelBasisCurvesGeoHotPoint ( size_t  segInd,
size_t  subInd 
)

Delete a geometric hot-point.

Delete a geometric hot-point of the base curve.

Parameters
[in]segInd- An index of a segment.
[in]subInd- An index of a point on the segment:
if subInd = 0 - result is similar to deletion of the 'RemoveVertex' vertex of a multiline,
if subInd = 1 - deletion of the middle point of an arc (the arc is replaced by segment), deletion of the base point of pt_Nurbs and pt_Bezier splines (changing of shape),
if subInd > 1 - deletion of the base point of pt_Nurbs and pt_Bezier splines (changing of shape).
Returns
True if hot-point has been deleted.

◆ FilletTwoBasisSegments()

bool MbMultiline::FilletTwoBasisSegments ( ptrdiff_t &  index,
double  rad,
const StVertexOfMultilineInfo vertInfo 
)

Fillet two neighboring segments.

Fillet two neighboring segments of base curve.

Parameters
[in]index- Index of the first segment to fillet.
[in]rad- The radius of fillet.
[in]vertInfo- Information for new vertices of a multiline.
Returns
Returns true if the operation succeeded.

◆ FilletBasisCurve()

bool MbMultiline::FilletBasisCurve ( double  rad,
const StVertexOfMultilineInfo vertInfo 
)

Fillet the base curve.

Fillet all corners of the base curve.

Parameters
[in]rad- The radius of fillet.
[in]vertInfo- Information for new vertices of a multiline.
Returns
True if at least one fillet is added.

◆ ChamferTwoBasisSegments()

bool MbMultiline::ChamferTwoBasisSegments ( ptrdiff_t &  index,
double  len,
double  par,
bool  type,
bool  firstSeg,
const StVertexOfMultilineInfo vertInfo 
)

Insert a chamfer between two neighboring segments of the base curve of a multiline.

Insert a chamfer between two neighboring segments of the base curve of a multiline.

Parameters
[in]index- Index of the first segment to fillet.
[in]len- Length of chamfer.
[in]par- Parameter depending on 'type' type:
if type = true, par is a corner
if type = false, par is a size.
[in]type- The type of a chamfer specification:
true - chamfer specified as size + angle,
false - chamfer specified as size + size.
[in]firstSeg- True if 'par' parameter is related to the first segment.
[in]vertInfo- Information for new vertices of a multiline.
Returns
Returns true if the operation succeeded.

◆ ChamferBasisCurve()

bool MbMultiline::ChamferBasisCurve ( double  len,
double  par,
bool  type,
const StVertexOfMultilineInfo vertInfo 
)

Insert a chamfer between each two neighboring segments of the base curve of a multiline.

Insert a chamfer between each two neighboring segments of the base curve of a multiline.

'par' parameter is related to the first segment of each pair.

Parameters
[in]len- Length of chamfer.
[in]par- Parameter depending on 'type' type:
if type = true, par is a corner,
if type = false, par is a size.
[in]type- The type of a chamfer specification:
true - chamfer specified as size + angle,
false - chamfer specified as size + size.
[in]vertInfo- Information for new vertices of a multiline.
Returns
True if at least one chamfer is added. Insert chamfer of the base curve

◆ SetSmoothJoint()

void MbMultiline::SetSmoothJoint ( size_t  i,
bool  othSmoothJoint 
)

Set the flag of smooth joint.

Set the flag of smooth joint at a vertex.

Parameters
[in]i- An index of a vertex of a multiline.
[in]othSmoothJoint- Flag of smooth joint.

◆ SetTracingType()

void MbMultiline::SetTracingType ( size_t  i,
EnMLVertexTracingType  othTracingType 
)

Set the type of traverse.

Set the type of traverse of the vertex.

Parameters
[in]i- An index of a vertex of a multiline.
[in]othTracingType- Type of traverse.

◆ SetSpecFilletRad()

void MbMultiline::SetSpecFilletRad ( size_t  i,
double  othSpecFilletRad 
)

Set the radius of a special fillet.

Set the radius of special fillet of a vertex of the multiline.

Parameters
[in]i- An index of a vertex of a multiline.
[in]othSpecFilletRad- Radius.

◆ SetTipType()

void MbMultiline::SetTipType ( size_t  i,
EnMLInnerTipType  othTipType 
)

Set the type of a tip.

Set the type of tip (splitter) at the vertex.

Parameters
[in]i- An index of a vertex of a multiline.
[in]othTipType- Type of tip.

◆ SetTipDirection()

void MbMultiline::SetTipDirection ( size_t  i,
bool  othFirstSegTip 
)

Set the direction of a tip.

Set the direction of a tip at a vertex of multiline.

Parameters
[in]i- An index of a vertex of a multiline.
[in]othFirstSegTip- Direction of tip, if true - from the first segment.

◆ SetVertexOfMultilineInfo()

void MbMultiline::SetVertexOfMultilineInfo ( size_t  i,
const StVertexOfMultilineInfo vertInfo 
)

Set the information about a vertex.

Set the information about a vertex of multiline.

Parameters
[in]i- An index of a vertex of a multiline.
[in]vertInfo- Information about a vertex.

◆ SetRadius()

bool MbMultiline::SetRadius ( size_t  i,
double  radius,
size_t &  newIndex 
)

Set the value of radius of curve.

Set the value of radius of curve.

Parameters
[in]i- An index of curve of multiline.
[in]radius- New value of the radius.
[out]newIndex- New index of curve.
Returns
True if a radius has been changed.

◆ SetRadii()

bool MbMultiline::SetRadii ( const CSSArray< double > &  newRadii)

Changing all radii of curves.

Simultaneous changing all radii of curves.
Values of radii will be changed if their count in 'newRadii' is coincident to the count of curves.

Parameters
[in]newRadii- New values of radii of curves.
Returns
True if radii has been changed.

◆ ChangeRadius()

void MbMultiline::ChangeRadius ( double  oldRadius,
double  radius 
)

Change the radius.

Change the radius of a curve of multiline.

Parameters
[in]oldRadius- Old value of the radius.
[in]radius- New value of the radius.

◆ AddRadius()

size_t MbMultiline::AddRadius ( double  radius)

Add the radius of a curve of multiline.

Add the radius of a curve of multiline.
Actually, addition of a curve of multiline.

Parameters
[in]radius- Value of radius.
Returns
Value of an index of the new curve.
if curve was not added, then the index is equal to SYS_MAX_T.

◆ RemoveRadius() [1/2]

bool MbMultiline::RemoveRadius ( size_t  i)

Delete a curve.

Delete a curve of multiline.

Parameters
[in]i- A curve index.
Returns
True if curve has been deleted.

◆ RemoveRadius() [2/2]

bool MbMultiline::RemoveRadius ( double  oldRadius)

Delete a curve.

Delete a curve of multiline.

Parameters
[in]oldRadius- Radius of a curve.
Returns
True if curve has been deleted.

◆ SetBegTipType()

void MbMultiline::SetBegTipType ( EnMLTipType  othTipType)

Change the type of a tip at the beginning.

Change the type of a tip of multiline at the beginning.

Parameters
[in]othTipType- New type of tip.

◆ SetBegTipParam()

void MbMultiline::SetBegTipParam ( double  othTipParam)

Change the parameter of a tip at the beginning.

Change the parameter of a tip of multiline at the beginning.

Parameters
[in]othTipParam- New parameter of tip.

◆ SetEndTipType()

void MbMultiline::SetEndTipType ( EnMLTipType  othTipType)

Change the type of a tip at the end.

Change the type of a tip of multiline at the end.

Parameters
[in]othTipType- New type of tip.

◆ SetEndTipParam()

void MbMultiline::SetEndTipParam ( double  othTipParam)

Change the parameter of a tip at the end.

Change the parameter of a tip of multiline at the end.

Parameters
[in]othTipParam- New parameter of tip.

◆ SetProcessClosed()

void MbMultiline::SetProcessClosed ( bool  othProcessClosed)

Change the closedness processing.

Change the flag of the closedness processing.

Parameters
[in]othProcessClosed- Flag of the closedness processing.

◆ SetTransparent()

void MbMultiline::SetTransparent ( bool  othTransparent)
inline

Change the transparency of multiline.

Change the flag of transparency of multiline.

Parameters
[in]othTransparent- Transparency flag.

◆ DeletePartP1P2() [1/3]

bool MbMultiline::DeletePartP1P2 ( MbContourWithBreaks contour,
const MbCartPoint point1,
const MbCartPoint point2,
const MbCartPoint point3,
bool  invertBreak = false 
)

Trimming of a piece of a curve of multiline between points.

Trimming of a piece of a curve of multiline between points.
Add a break.

Parameters
[in]contour- Curve of multiline for addition of a break.
[in]point1- The first boundary of the break.
[in]point2- The second boundary of the break.
[in]point3- The point indicating the piece of a closed contour to be deleted,
ignored in case of the opened contour.
[in]invertBreak- If 'true', then the break is applied to the opposite piece of the contour.
Returns
True if a break has been added.

◆ DeletePartP1P2() [2/3]

bool MbMultiline::DeletePartP1P2 ( size_t  cNumber,
const MbCartPoint point1,
const MbCartPoint point2,
const MbCartPoint point3,
bool  invertBreak = false 
)

Trimming of a piece of a curve of multiline between points.

Trimming of a piece of a curve of multiline between points.
Add a break.

Parameters
[in]cNumber- Index of curve of multiline for addition of a break.
[in]point1- The first boundary of the break.
[in]point2- The second boundary of the break.
[in]point3- The point indicating the piece of a closed contour to be deleted,
ignored in case of the opened contour.
[in]invertBreak- If 'true', then the break is applied to the opposite piece of the contour.
Returns
True if a break has been added.

◆ DeletePartP1P2() [3/3]

bool MbMultiline::DeletePartP1P2 ( size_t  cNumber,
double  t1,
double  t2,
double  t3,
bool  invertBreak = false 
)

Trimming of a piece of a curve of multiline between parameters of contour.

Trimming of a piece of a curve of multiline between parameters of contour.
Add a break.

Parameters
[in]cNumber- Index of curve of multiline for addition of a break.
[in]t1- The first boundary of the break.
[in]t2- The second boundary of the break.
[in]t3- A parameter which indicates a removable part of the closed contour,
ignored in case of opened contour.
[in]invertBreak- If 'true', then the break is applied to the opposite piece of the contour.
Returns
True if a break has been added.

◆ DeleteBreaks() [1/2]

bool MbMultiline::DeleteBreaks ( )

Remove breaks.

Delete all breaks of multiline.

Returns
true, if at least one break has been deleted.

◆ DeleteBreaks() [2/2]

bool MbMultiline::DeleteBreaks ( size_t  cNumber)

Remove breaks of curve.

Delete all breaks of curve of multiline.

Parameters
[in]cNumber- Index of curve.
Returns
true, if at least one break has been deleted.

◆ DeleteBreak()

bool MbMultiline::DeleteBreak ( size_t  cNumber,
double  t 
)

Delete a break of curve.

Delete a break by a parameter on the curve.

Parameters
[in]cNumber- Index of curve.
[in]t- A parameter on the curve.
Returns
True if a break has been deleted.

◆ DeleteBreakAtNumber()

bool MbMultiline::DeleteBreakAtNumber ( size_t  cNumber,
size_t  brNumber 
)

Delete a break.

Delete a break by an index.

Parameters
[in]cNumber- Index of curve.
[in]brNumber- Index of a break on the curve.
Returns
True if a break has been deleted.

◆ DeleteSmallBreaks()

bool MbMultiline::DeleteSmallBreaks ( size_t  cNumber,
double  length 
)

Delete breaks of small length.

Delete breaks of small length of a curve of multiline.
In case of success the line of multiline is rebuilt according to breaks.

Parameters
[in]cNumber- Index of a curve of multiline.
[in]length- Minimal length of invisible piece.
Returns
True if at least one break of the curve has been deleted.

◆ DeleteSmallVisContours()

bool MbMultiline::DeleteSmallVisContours ( size_t  cNumber,
double  length 
)

Delete small visible pieces.

Delete small visible pieces of a curve of multiline with small metric length.

Corresponds to union of close breaks into one. In case of success the visible contours of the line is rebuilt according to breaks.

Parameters
[in]cNumber- Index of a curve of multiline.
[in]length- Minimal length of visible piece.
Returns
True if breaks has been changed.

◆ IsRectInBreak()

bool MbMultiline::IsRectInBreak ( size_t  cNumber,
const MbRect1D rect 
)

Whether the interval is on a break.

Whether the interval of parameters is on a break of a curve.

Parameters
[in]cNumber- Index of a curve of multiline.
[in]rect- Interval to check.
Returns
True if interval entirely is on the break or coincides with it.

◆ GetBreaksInInvisContours()

void MbMultiline::GetBreaksInInvisContours ( RPArray< MbContour > &  invisContours)

Memorize the breaks.

Memorize the breaks as invisible contours.

For using together with AddBreaksByInvisContours.
Deletes all breaks of multiline.
All 'invisContours' contours has a reference counter = 1 (called AddRef()).

Parameters
[out]invisContours- Set of invisible contours of all curves of multiline.

◆ AddBreaksByInvisContours()

void MbMultiline::AddBreaksByInvisContours ( RPArray< MbContour > &  invisContours)

Add breaks.

Add the breaks as invisible contours.

For using together with GetBreaksInInvisContours.

'invisContours' contours are deleted (called Release()).
It is possible to apply breaks to multiline by this function, if they were obtained by GetBreaksInInvisContours method from this multiline and shape of multiline wasn't changed.

Parameters
[in]invisContours- Set of invisible contours of all curves of multiline.

◆ CurvesIntersectNumbers()

void MbMultiline::CurvesIntersectNumbers ( const MbCartPoint p1,
const MbCartPoint p2,
SArray< size_t > &  cNumbers 
) const

Indices of contours intersected with a segment.

Indices of contours which are intersected with segment by two points.

Parameters
[in]p1- The first point of a segment.
[in]p2- The second point of a segment.
[out]cNumbers- Indices of contours.

◆ GetWidth()

double MbMultiline::GetWidth ( ) const
inline

Get width of multiline.

Get width of multiline.

◆ FindRadius()

size_t MbMultiline::FindRadius ( double  radius)

Find an index of a curve of multiline.

Find an index of a curve of multiline.

Parameters
[in]radius- Radius of the required curve.
Returns
A curve index.

◆ Trimmed()

MbMultiline* MbMultiline::Trimmed ( double  t1,
double  t2,
int  sense 
) const

Truncate multiline.

Truncate multiline.
Return multiline which base curve is a copy of piece between parameters t1 and t2 of the base curve of a given multiline.

Parameters
[in]t1- Start parameter of trimming.
[in]t2- End parameter of trimming.
[in]sense- Direction of the trimmed base curve.
Returns
New multiline.

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