C3D Toolkit
Kernel - 117982, Vision - 2.9.2.2
|
Multiline. More...
#include <multiline.h>
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... | |
MbPlaneItem & | Duplicate (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... | |
MbProperty & | CreateProperty (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 MbContour & | GetBasisCurve () const |
Base curve. | |
MbContour & | SetBasisCurve () |
Get base curve for editing. | |
size_t | GetVerticesCount () const |
Count of vertices. | |
const StVertexOfMultilineInfo & | GetVertex (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 StMLTipParams & | GetBegTipParams () const |
Parameters of tip at the beginning of multiline. | |
const StMLTipParams & | GetEndTipParams () 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 MbContourWithBreaks * | GetCurve (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 MbContour * | GetTipCurve (size_t i) const |
Tip-curve by an index. Index must be less than the count of tips. | |
const MbContour * | GetBegTipCurve () const |
Tip at the beginning of a multiline. | |
const MbContour * | GetEndTipCurve () 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 | |
MbMultiline * | Trimmed (double t1, double t2, int sense) const |
Truncate multiline. More... | |
![]() | |
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. | |
![]() | |
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. | |
![]() | |
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. | |
![]() | |
MbPlaneItem () | |
Constructor. | |
![]() | |
MbRefItem () | |
Constructor without parameters. | |
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.
MbMultiline::MbMultiline | ( | const MbContour & | _basisCurve, |
const StVertexOfMultilineInfo & | vertInfo, | ||
const SArray< double > & | _equidRadii, | ||
const StMLTipParams & | _begTipParams, | ||
const StMLTipParams & | _endTipParams, | ||
bool | _processClosed, | ||
bool | _isTransparent | ||
) |
Constructor.
Constructor.
[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. |
|
overridevirtual |
Determine whether objects are equal.
Objects of the same types with similar (equal) data are considered to be equal.
[in] | item | - Object for comparison. |
[in] | accuracy | - The accuracy. |
Implements MbPlaneItem.
|
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).
[in] | item | - Object for comparison. |
Reimplemented from MbPlaneItem.
|
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.
[in] | item | - Object for initialization. |
Implements MbPlaneItem.
|
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.
[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.
|
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.
[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.
|
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.
[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.
|
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.
[in] | iReg | - Registrator. |
Implements MbPlaneItem.
|
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.
[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. |
Implements MbPlaneItem.
|
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.
[in] | to | - Point. |
[in,out] | d | - Specified distance from object on input. Distance from point to object on output if operation succeeded. |
Implements MbPlaneItem.
|
overridevirtual |
Get properties of the object.
Get internal data (properties) of an object for viewing and modification.
[in] | properties | - Container for internal data of an object. |
Implements MbPlaneItem.
|
overridevirtual |
Change properties of the object.
Change internal data (properties) of object is performed by copying of corresponding values from the given object.
[in] | properties | - Container for internal data of an object. |
Implements MbPlaneItem.
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.
[in] | _basisCurve | - New base curve. |
[in] | vertInfo | - New information about vertices of multiline. |
bool MbMultiline::AddBasisSegment | ( | MbCurve * | segment, |
const StVertexOfMultilineInfo & | vertInfo | ||
) |
Add a segment to a base curve.
Add a segment to a base curve.
[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. |
size_t MbMultiline::InsertVertex | ( | double | t, |
const StVertexOfMultilineInfo & | vertInfo | ||
) |
Insert a vertex.
Insert a vertex. Segment is split into two segments.
[in] | t | - Parameter on the base curve. |
[in] | vertInfo | - Information about new vertex of a multiline. |
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.
[in] | i | - An index of a vertex. |
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.
[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. |
bool MbMultiline::DelBasisCurvesGeoHotPoint | ( | size_t | segInd, |
size_t | subInd | ||
) |
Delete a geometric hot-point.
Delete a geometric hot-point of the base curve.
[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). |
bool MbMultiline::FilletTwoBasisSegments | ( | ptrdiff_t & | index, |
double | rad, | ||
const StVertexOfMultilineInfo & | vertInfo | ||
) |
Fillet two neighboring segments.
Fillet two neighboring segments of base curve.
[in] | index | - Index of the first segment to fillet. |
[in] | rad | - The radius of fillet. |
[in] | vertInfo | - Information for new vertices of a multiline. |
bool MbMultiline::FilletBasisCurve | ( | double | rad, |
const StVertexOfMultilineInfo & | vertInfo | ||
) |
Fillet the base curve.
Fillet all corners of the base curve.
[in] | rad | - The radius of fillet. |
[in] | vertInfo | - Information for new vertices of a multiline. |
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.
[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. |
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.
[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. |
void MbMultiline::SetSmoothJoint | ( | size_t | i, |
bool | othSmoothJoint | ||
) |
Set the flag of smooth joint.
Set the flag of smooth joint at a vertex.
[in] | i | - An index of a vertex of a multiline. |
[in] | othSmoothJoint | - Flag of smooth joint. |
void MbMultiline::SetTracingType | ( | size_t | i, |
EnMLVertexTracingType | othTracingType | ||
) |
Set the type of traverse.
Set the type of traverse of the vertex.
[in] | i | - An index of a vertex of a multiline. |
[in] | othTracingType | - Type of traverse. |
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.
[in] | i | - An index of a vertex of a multiline. |
[in] | othSpecFilletRad | - Radius. |
void MbMultiline::SetTipType | ( | size_t | i, |
EnMLInnerTipType | othTipType | ||
) |
Set the type of a tip.
Set the type of tip (splitter) at the vertex.
[in] | i | - An index of a vertex of a multiline. |
[in] | othTipType | - Type of tip. |
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.
[in] | i | - An index of a vertex of a multiline. |
[in] | othFirstSegTip | - Direction of tip, if true - from the first segment. |
void MbMultiline::SetVertexOfMultilineInfo | ( | size_t | i, |
const StVertexOfMultilineInfo & | vertInfo | ||
) |
Set the information about a vertex.
Set the information about a vertex of multiline.
[in] | i | - An index of a vertex of a multiline. |
[in] | vertInfo | - Information about a vertex. |
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.
[in] | i | - An index of curve of multiline. |
[in] | radius | - New value of the radius. |
[out] | newIndex | - New index of curve. |
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.
[in] | newRadii | - New values of radii of curves. |
void MbMultiline::ChangeRadius | ( | double | oldRadius, |
double | radius | ||
) |
Change the radius.
Change the radius of a curve of multiline.
[in] | oldRadius | - Old value of the radius. |
[in] | radius | - New value of the radius. |
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.
[in] | radius | - Value of radius. |
bool MbMultiline::RemoveRadius | ( | size_t | i | ) |
Delete a curve.
Delete a curve of multiline.
[in] | i | - A curve index. |
bool MbMultiline::RemoveRadius | ( | double | oldRadius | ) |
Delete a curve.
Delete a curve of multiline.
[in] | oldRadius | - Radius of a curve. |
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.
[in] | othTipType | - New type of tip. |
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.
[in] | othTipParam | - New parameter of tip. |
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.
[in] | othTipType | - New type of tip. |
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.
[in] | othTipParam | - New parameter of tip. |
void MbMultiline::SetProcessClosed | ( | bool | othProcessClosed | ) |
Change the closedness processing.
Change the flag of the closedness processing.
[in] | othProcessClosed | - Flag of the closedness processing. |
|
inline |
Change the transparency of multiline.
Change the flag of transparency of multiline.
[in] | othTransparent | - Transparency flag. |
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.
[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. |
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.
[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. |
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.
[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. |
bool MbMultiline::DeleteBreaks | ( | ) |
Remove breaks.
Delete all breaks of multiline.
bool MbMultiline::DeleteBreaks | ( | size_t | cNumber | ) |
Remove breaks of curve.
Delete all breaks of curve of multiline.
[in] | cNumber | - Index of curve. |
bool MbMultiline::DeleteBreak | ( | size_t | cNumber, |
double | t | ||
) |
Delete a break of curve.
Delete a break by a parameter on the curve.
[in] | cNumber | - Index of curve. |
[in] | t | - A parameter on the curve. |
bool MbMultiline::DeleteBreakAtNumber | ( | size_t | cNumber, |
size_t | brNumber | ||
) |
Delete a break.
Delete a break by an index.
[in] | cNumber | - Index of curve. |
[in] | brNumber | - Index of a break on the curve. |
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.
[in] | cNumber | - Index of a curve of multiline. |
[in] | length | - Minimal length of invisible piece. |
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.
[in] | cNumber | - Index of a curve of multiline. |
[in] | length | - Minimal length of visible piece. |
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.
[in] | cNumber | - Index of a curve of multiline. |
[in] | rect | - Interval to check. |
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()).
[out] | invisContours | - Set of invisible contours of all curves of multiline. |
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.
[in] | invisContours | - Set of invisible contours of all curves of multiline. |
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.
[in] | p1 | - The first point of a segment. |
[in] | p2 | - The second point of a segment. |
[out] | cNumbers | - Indices of contours. |
|
inline |
Get width of multiline.
Get width of multiline.
size_t MbMultiline::FindRadius | ( | double | radius | ) |
Find an index of a curve of multiline.
Find an index of a curve of multiline.
[in] | radius | - Radius of the required curve. |
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.
[in] | t1 | - Start parameter of trimming. |
[in] | t2 | - End parameter of trimming. |
[in] | sense | - Direction of the trimmed base curve. |