C3D Toolkit  Kernel - 117982, Vision - 2.9.2.2

Contour with breaks. More...

#include <cur_contour_with_breaks.h>

+ Inheritance diagram for MbContourWithBreaks:
+ Collaboration diagram for MbContourWithBreaks:

Public Member Functions

 MbContourWithBreaks ()
 Creation of empty contour. More...
 
 MbContourWithBreaks (const MbContour &cnt)
 Copy-constructor.
 
Common functions of a geometric object.
MbePlaneType IsA () const override
 Get the object type.
 
void Transform (const MbMatrix &matr, MbRegTransform *ireg=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...
 
Functions for access to data: breaks.
size_t GetBreaksCount () const
 The number of breaks.
 
MbBreakGetBreak (size_t i) const
 A break by the number. More...
 
MbRect1D GetBreaksRange (size_t i) const
 A break by the number in contour parameters. More...
 
Functions for access to data: visible regions.
size_t GetVisibleCount () const
 The number of visible parts. More...
 
const MbContourGetVisibleContour (size_t i) const
 A visible part by the number. More...
 
Functions for access to data: Invisible regions.
MbContourGetInvisibleContour (size_t i) const
 Invisible part by the number of break. More...
 
Working with breaks: addition.
bool AddBreak (const MbCartPoint &point1, const MbCartPoint &point2, const MbCartPoint &point3, bool invertBreak=false)
 Add a break between points. More...
 
bool AddBreak (double t1, double t2, double t3, bool invertBreak=false)
 Add a break between contour parameters. More...
 
bool AddBreak (const MbRect1D &range)
 Add a break by interval of contour parameters. More...
 
Working with breaks: removing.
bool DeleteBreaks ()
 Remove breaks. More...
 
bool DeleteBreakAtNumber (size_t breakIndex, bool rebuild=false)
 Remove a break by the number. More...
 
bool DeleteBreakAtParam (double t)
 Remove a break by parameter on the contour. More...
 
void DeleteBreaksAtBaseNumber (size_t baseNumber, bool delTracingBreaks, bool delEquidBreaks, bool delInLineSeg=true)
 Remove breaks on the segments with the corresponding base number. More...
 
Removing of breaks and visible parts of the small metric length.
bool DeleteSmallBreaks (double length)
 Remove breaks of the small metric length. More...
 
bool DeleteSmallVisContours (double length)
 Remove visible parts of the small metric length. More...
 
Working with breaks
bool GetBreakAtPoint (const MbCartPoint &p, double rad, size_t &index) const
 The number of break the edge of which is into point neighbourhood. More...
 
bool GetBreaksInRect (const MbRect &rect, SArray< size_t > &breaksNumbers) const
 Numbers of breaks which at least one edge fall into the region. More...
 
bool GetBreaksInRect (const MbContour &contour, SArray< size_t > &breaksNumbers) const
 Numbers of breaks which at least one edge fall into the region. More...
 
bool HitToBreaks (const MbCartPoint &p) const
 Determine whether a point it inside a break. More...
 
bool IsRectInBreak (const MbRect1D &rect)
 Whether the interval of parameters is on break. More...
 
void RebuildBreaks (SArray< size_t > &oldBaseNumbers)
 Update visible and invisible contours. More...
 
void RebuildBreaks ()
 Update visible and invisible contours. More...
 
void TransformMultlinesBreaks (const MbMatrix &matr)
 Transform according to matrix. More...
 
double GetLocalBreaksParam (const MbBreaksPart &brPart, size_t &segNumber) const
 A binding parameter of a break part. More...
 
Working with breaks: changing a break.
void SetBreakFixedPoint (const MbCartPoint &newPoint, MbBreaksPart &part)
 Fix the point. More...
 
void SetBreakFixedVar (double newFixedVar, MbBreaksPart &part)
 Fix the variable. More...
 
Working with breaks: tracking a break
size_t GetBaseNumbersCount () const
 Count of segments numbers of the base contour

 
void GetBaseNumbers (SArray< size_t > &baseNumbers) const
 Numbers of segments of base contour.
 
size_t GetBaseNumber (size_t i) const
 Segment number of the base contour. More...
 
void AddBaseSegNumber (size_t number)
 Add number of the base segment. More...
 
void AddBaseSegNumberAtBegin (size_t number)
 Add number of the base segment. More...
 
void InsertLastSegNumber (size_t lastInd)
 Insert number after the lastInd. More...
 
void DeleteBaseSegNumber (size_t ind)
 Delete element by an index. More...
 
void ClearBaseSegNumbers ()
 Clear the array with numbers of base segments.
 
void ChangeBreaksSegNumbers (size_t begBaseNumber, ptrdiff_t deltaN)
 Change numbers of segments in the breaks. More...
 
void ChangeBreaksAtClosed (bool newClosed)
 Change breaks of closedness respectively. More...
 
void MoveBreaksSegNumbers (ptrdiff_t deltaN)
 Change segments numbers of breaks parts. More...
 
bool IsTrasingBreaksPart (const MbBreaksPart &part, size_t &vertNumber) const
 Is the break part of this contour located on the segment of vertices traverse. More...
 
void SwapBreaksAndBaseNumbers (MbContourWithBreaks &other)
 Swap breaks. More...
 
void AddContoursBreaks (const MbContourWithBreaks &other)
 Add contour breaks. More...
 
void ChangeBaseNumbers (const MbContourWithBreaks &other)
 Replace the numbers of base segments. More...
 
- Public Member Functions inherited from MbContour
 MbContour ()
 Empty contour.
 
template<class Curves >
 MbContour (const Curves &initCurves, bool sameCurves)
 Constructor by curves vector. More...
 
MbePlaneType Type () const override
 Get the group type of the object.
 
bool IsSimilar (const MbPlaneItem &) const override
 Determine whether the objects are similar. More...
 
bool SetEqual (const MbPlaneItem &) override
 Make the objects equal. More...
 
bool IsSame (const MbPlaneItem &, double accuracy=LENGTH_EPSILON) const override
 Determine whether objects are equal. More...
 
MbCurveOffset (double rad) const override
 Construct the equidistant curve which is shifted by the given value. More...
 
void AddYourGabaritTo (MbRect &) const override
 Extend the given bounding rectangle so that it encloses this object.
 
void CalculateGabarit (MbRect &) const override
 Detect the bounding box of a curve. More...
 
void CalculateLocalGabarit (const MbMatrix &into, MbRect &local) const override
 Calculate bounding box in the local coordinate system. More...
 
const MbRectGetGabarit () const
 
const MbRectGetCube () const
 
void SetDirtyGabarit () const
 Reset the calculated contour bounding box.

 
void CopyGabarit (const MbContour &c)
 Copy contour bounding box to contour copy (use only to transfer into contour copy).
 
bool IsGabaritEmpty () const
 Is the contour bounding box empty?

 
double DistanceToPoint (const MbCartPoint &) const override
 Calculate the distance to a point.
 
MbeState Deformation (const MbRect &, const MbMatrix &) override
 Deform the curve. More...
 
bool IsInRectForDeform (const MbRect &) const override
 Determine visibility of a curve in rectangle.
 
void Refresh () override
 Set all temporary (mutable) data of object to undefined (initial) state.
 
void PrepareIntegralData (const bool forced) const override
 Calculate temporary (mutable) data of an object. More...
 
MbeState DeletePart (double t1, double t2, MbCurve *&part2) override
 Delete the piece of a curve. More...
 
MbeState TrimmPart (double t1, double t2, MbCurve *&part2) override
 Keep the piece of a curve. More...
 
MbCurveTrimmed (double t1, double t2, int sense, const MbDimAccuracy &xyEps, bool saveParamLenAndLaw) const override
 Construct a trimmed curve with the given two-dimensional accuracy. More...
 
virtual MbCurveTrimmed (double t1, double t2, int sense, bool saveParamLenAndLaw=false) const
 Construct a trimmed curve. More...
 
virtual MbCurveTrimmed (double t1, double t2, int sense, const MbDimAccuracy &xyEps, bool saveParamLenAndLaw) const=0
 Construct a trimmed curve with the given two-dimensional accuracy. More...
 
double GetTMin () const override
 Get the minimum value of parameter.
 
double GetTMax () const override
 Get the maximum value of parameter.
 
bool IsClosed () const override
 Define whether the curve is periodic. More...
 
bool IsStraight (bool ignoreParams=false) const override
 Define whether the curve is rectilinear..
 
bool IsSmoothConnected (double angleEps) const override
 Define whether joints of contour/curve are smooth.
 
void PointOn (double &, MbCartPoint &) const override
 Calculate a point on the curve. More...
 
void FirstDer (double &, MbVector &) const override
 Calculate first derivative.
 
void SecondDer (double &, MbVector &) const override
 Calculate second derivative.
 
void ThirdDer (double &, MbVector &) const override
 Calculate third derivative.
 
void _PointOn (double, MbCartPoint &) const override
 Calculate point at curve and its extension. More...
 
void _FirstDer (double, MbVector &) const override
 Calculate first derivative at curve and its extension.
 
void _SecondDer (double, MbVector &) const override
 Calculate second derivative at curve and its extension.
 
void _ThirdDer (double, MbVector &) const override
 Calculate third derivative at curve and its extension.
 
void Explore (double &t, bool ext, MbCartPoint &pnt, MbVector &fir, MbVector *sec, MbVector *thir) const override
 Calculate point and derivatives of object for given parameter. More...
 
double Step (double t, double sag) const override
 Calculate parameter step. More...
 
double DeviationStep (double t, double angle) const override
 Calculate parameter step. More...
 
bool HasLength (double &) const override
 Calculate the metric length of a curve. More...
 
double GetMetricLength () const override
 Calculate the metric length of a curve. More...
 
double GetLengthEvaluation () const override
 Calculate the metric length of a curve. More...
 
double CalculateMetricLength () const override
 Calculate the metric length of a curve.
 
double GetParamLength () const
 
double CalculateParamLength ()
 
double GetArea (double sag=Math::deviateSag) const
 Calculation of contour area if contour is closed.

 
MbNurbsNurbsCurve (const MbCurveIntoNurbsInfo &) const override
 Construct a NURBS copy of a curve. More...
 
MbContourNurbsContour () const override
 Approximate of a curve by the contour from NURBS curves.
 
void SetClosed ()
 Set the closedness attribute of contour.
 
void CheckClosed (double closedEps=Math::LengthEps)
 Set the closedness attribute of contour.
 
void InitClosed (bool c)
 Set the closedness attribute of contour.
 
bool IsClosedContinuousC0 (double eps=5.0 *PARAM_NEAR) const
 Check for closedness and continuity of contour points. More...
 
void CloseByLineSeg (bool calcInternalData)
 Close the contour by segment.
 
double CalculateLength (double t1, double t2) const override
 Calculate the metric length of a curve. More...
 
bool DistanceAlong (double &t, double len, int curveDir, double eps=Math::LengthEps, VERSION version=Math::DefaultMathVersion()) const override
 Translate parameter along the curve. More...
 
void Clear (bool calculateParamLength=true)
 Reset variables caching.
 
ptrdiff_t FindSegment (double &t, double &tSeg) const
 Find a contour segment. More...
 
size_t GetSegmentsCount () const
 Get the number of contour segments.
 
const MbCurveGetSegment (size_t ind) const
 Get contour segment by the index.
 
MbCurveSetSegment (size_t ind)
 Get contour segment by the index.
 
MbeItemLocation PointRelative (const MbCartPoint &pnt, double eps=Math::LengthEps) const override
 Define the point position relative to the curve. More...
 
MbeLocation PointLocation (const MbCartPoint &pnt, double eps=Math::LengthEps) const override
 The point position relative to the curve.
 
double PointProjection (const MbCartPoint &) const override
 Calculate the point projection to the curve. More...
 
bool NearPointProjection (const MbCartPoint &, double xEpsilon, double yEpsilon, double &t, bool ext, MbRect1D *tRange=nullptr) const override
 Find the point projection to the contour. More...
 
double DistanceToBorder (const MbCartPoint &pnt, double eps=Math::paramRegion) const
 Parametric distance to the nearest boundary. More...
 
void Trimm (double t1, double t2, bool saveParamLenAndLaw=false)
 Trim a part of the contour.
 
void Trimm (double t1, double t2, const MbDimAccuracy &xyEps, bool saveParamLenAndLaw)
 Trim a part of the contour with the given two-dimensional accuracy.
 
MbResultType Extend (const MbCurveExtensionParameters &parameters, c3d::PlaneCurveSPtr &resCurve) const override
 Extend the curve. More...
 
void PerpendicularPoint (const MbCartPoint &, SArray< double > &tFind) const override
 Find perpendiculars to a curve. More...
 
void TangentPoint (const MbCartPoint &, SArray< double > &tFind) const override
 Find tangents to a curve. More...
 
void IntersectHorizontal (double y, SArray< double > &) const override
 Find intersections of a curve with horizontal line. More...
 
void IntersectVertical (double x, SArray< double > &) const override
 Find intersections of a curve with vertical line. More...
 
void SelfIntersect (SArray< MbCrossPoint > &, double metricEps=Math::LengthEps) const override
 Find self-intersections of curve. More...
 
bool IsSelfIntersect (double metricEps, bool considerPartialCoincidence) const
 Is it a contour with self-intersections? More...
 
bool FilletTwoSegments (ptrdiff_t &index, double rad, bool &del1, bool &del2)
 Fillet of two neighboring elements with information about removal.
 
bool FilletTwoSegments (ptrdiff_t &index, double rad)
 Fillet of two neighboring elements.
 
bool ChamferTwoSegments (ptrdiff_t &index, double len, double angle, bool type, bool firstSeg, bool &del1, bool &del2)
 Insertion of chamfer between two neighboring elements with information about removal.
 
bool ChamferTwoSegments (ptrdiff_t &index, double len, double angle, bool type, bool firstSeg=true)
 Insertion of chamfer between two neighboring elements.
 
bool Fillet (double rad)
 Fillet of contour.
 
bool Chamfer (double len, double angle, bool type)
 Insertion of the chamfer.
 
MbeState RemoveFilletOrChamfer (const MbCartPoint &pnt)
 Remove fillet or contour chamfer Split contour into non-overlapping segments.
 
bool InsertCrossPoints ()
 
void BreakSegment (ptrdiff_t &index, ptrdiff_t firtsIdx, SArray< MbCrossPoint > &cross, bool firstCurve=true)
 Splitting of contour segments at the points of intersection.
 
bool CheckConnection (double eps=Math::LengthEps) const
 Check for contour continuity.
 
bool CheckConnection (double xEps, double yEps) const
 Check for contour continuity.
 
DEPRECATE_DECLARE void FilletTwoSegmentsZero (ptrdiff_t &index, int defaultSense, bool fullInsert)
 Rounding two neighboring elements by arc of zero radius. More...
 
void FilletZero (int defaultSense, bool fullInsert=false)
 Rounding contour by arc of zero radius.
 
DEPRECATE_DECLARE void ChamferTwoSegmentsZero (ptrdiff_t &index, double rad)
 Insertion of chamfer between two neighboring elements for construction of the offset. More...
 
void ChamferZero (double rad)
 Insertion of chamfer for construction of the offset.
 
void DeleteDegenerateSegments (double radius, MbCurve *curve, bool mode)
 Removal of degenerate contour segments.
 
void Equid (double radLeft, double radRight, int side, bool mode, PArray< MbCurve > &equLeft, PArray< MbCurve > &equRight)
 Construction of offset to contour. More...
 
void CreateNewContours (RPArray< MbCurve > &)
 Construction of new contours from equidistance.
 
double CalculateArea (double sag=Math::deviateSag) const
 Calculation of contour area if contour is closed.

 
int GetSense () const
 Determination of traverse direction if contour is closed.
 
void SetSense (int sense)
 Set the traverse direction of the contour.
 
void Inverse (MbRegTransform *=nullptr) override
 Set the opposite direction of curve.
 
bool NormalizeReparametrization ()
 
size_t GetCount () const override
 Define the number of splittings for one passage in operations.
 
bool DistanceToPointIfLess (const MbCartPoint &toP, double &d) const override
 Calculate the distance to a point. More...
 
bool GetSpecificPoint (const MbCartPoint &from, double &dmax, MbCartPoint &pnt) const override
 Return a specific point of a curve. More...
 
bool GetSegmentMiddlePoint (const MbCartPoint &from, MbCartPoint &midPoint) const
 Get a mid-point of the contour segment.
 
bool GetLinearSegment (const MbCartPoint &from, double maxDist, MbCartPoint &p1, MbCartPoint &p2, double &d) const
 Get the linear segment of contour.

 
MbArcGetArcSegment (const MbCartPoint &from, double maxDist, double &d) const
 Get the arc segment of contour.
 
bool GetSegmentLength (const MbCartPoint &from, double &length) const
 Get the contour segment length.
 
bool GetWeightCentre (MbCartPoint &) const override
 Calculate the center of gravity of a curve.
 
bool GetCentre (MbCartPoint &) const override
 Calculate a center of curve.
 
ptrdiff_t FindNearestNode (const MbCartPoint &to) const
 Find the nearest node of contour to point.
 
ptrdiff_t FindNearestSegment (const MbCartPoint &to) const
 Find the nearest segment of contour to point.
 
void OffsetCuspPoint (SArray< double > &tCusps, double dist) const override
 Find the special points of an offset curve. More...
 
double GetRadius (double accuracy=PARAM_REGION) const override
 Get the physical radius of the curve or zero if it impossible. More...
 
bool GetAxisPoint (MbCartPoint &) const override
 Calculate a point to construct an axis. More...
 
void CombineNurbsSegments ()
 Unite NURBS curves into the contour.
 
void GetProperties (MbProperties &) override
 Get properties of the object. More...
 
void SetProperties (const MbProperties &) 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.
 
bool IsContinuousDerivative (bool &contLength, bool &contDirect, c3d::DoubleVector *params=nullptr, double epsilon=EPSILON) const override
 Have the first derivative of the curve the continuous length and direction? More...
 
bool SetContinuousDerivativeLength (VERSION version, double epsilon=EPSILON) override
 Eliminate the discontinuities of the derivatives of the length of the joints of the segments. More...
 
void GetAnalyticalFunctionsBounds (std::vector< double > &params) const override
 Get the boundaries of the curve sections that are described by one analytical function.
 
void BreakPoints (std::vector< double > &vBreaks, double precision=ANGLE_REGION) const override
 \ ru Определение точек излома контура. The determination of contour smoothness break points.
 
bool Init (List< MbCurve > &)
 Initialization by list of curves.
 
void Init (const MbContour &)
 Initialization by a contour.
 
template<class Curves >
bool Init (Curves &curves, bool sameCurves)
 Initialization by array of curves. More...
 
template<class Points >
bool InitByPoints (const Points &)
 Initialization by array of points (closed contour).
 
bool InitAsRectangle (const MbCartPoint *)
 Initialization as rectangle (4 points are given).
 
bool InitByRectangle (const MbRect &)
 Initialization by rectangle of bounding box.
 
bool AddSegment (MbCurve *)
 Add a segment to the contour.
 
bool AddSegmentOrDeleteCurve (MbCurve *)
 Add a curve as segment or remove its.
 
MbCurveAddSegment (const MbCurve *pBasis, double t1, double t2, int sense=1)
 Add a (truncated) segment copy to the end of the contour. More...
 
bool AddAtSegment (MbCurve *newSegment, size_t index)
 Insert a segment before the contour segment with the index "index".
 
bool AddAfterSegment (MbCurve *newSegment, size_t index)
 Insert a segment after the contour segment with the index "index".
 
bool AddCurveWithRuledCheck (MbCurve &newCur, double absEps, bool toEndOnly=false, bool checkSame=true, VERSION version=Math::DefaultMathVersion())
 Add the new element to the beginning or end of contour. More...
 
void DeleteSegments ()
 Remove all segments from contour.
 
void DeleteSegment (size_t ind)
 Remove a segment from contour.
 
void DetachSegments ()
 Detach all segments from the contour without removing.
 
MbCurveDetachSegment (size_t ind)
 Detach a segment from contour return it.
 
template<class CurvesVector >
void DetachSegments (CurvesVector &segms)
 Detach all segments from the contour without removing.
 
void SetSegment (MbCurve &newSegment, size_t ind)
 Replace a segment in the contour.
 
void SegmentsAdd (MbCurve &newSegment, bool calculateParamLength=true)
 Add a segment to the contour without checking.
 
void SegmentsInsert (size_t ind, MbCurve &newSegment)
 Insert a segment into contour before an index without checking.
 
void SegmentsRemove (size_t ind)
 Remove a segment without checking.
 
void SegmentsDetach (size_t ind)
 Detach a segment without checking.
 
void Calculate (bool calcArea=false)
 Calculate parameters: rect, paramLength, metricLength, closed.
 
void SegmentsReserve (size_t additionalSpace)
 Reserve memory for this number of elements.
 
void SegmentsAdjust ()
 Free the unnecessary memory.
 
template<class CurvesVector >
bool GetSegments (CurvesVector &segms) const
 Get contour segments.
 
void SetMetricLength (double len) const
 
bool SetBegEndPoint (double t)
 Set the start (end) point for closed contour.
 
void ReplaceContoursAndPolylines ()
 Replace segments of contour and segments of polyline.
 
void GetPolygon (double sag, SArray< MbCartPoint > &poly, double eps) const
 Get points of polygon.
 
bool IsAnyCurvilinear () const
 Whether the contour has a curved segment.
 
bool IsSameSegments (const MbContour &, double accuracy=PARAM_PRECISION) const
 Whether contours contains identical segments.
 
bool GetBegSegmentPoint (size_t i, MbCartPoint &) const
 Get the start point of i-th segment.
 
bool GetEndSegmentPoint (size_t i, MbCartPoint &) const
 Get the end point of i-th segment.
 
bool CornerNormal (double t, MbVector &norm) const
 Normal by parameter with consideration of segments joints. More...
 
template<class Params >
void GetCornerParams (Params &params) const
 Parameters of segments joints. More...
 
bool GetTwoTangents (double t, MbVector &tan1, MbVector &tan2) const
 Calculation of two tangents (for parameters of joints). More...
 
void GetSegmentsNames (SimpleNameArray &names) const
 Get names of segments. More...
 
void SetSegmentsNames (const SimpleNameArray &names)
 Set names of segments. More...
 
- Public Member Functions inherited from MbCurve
virtual ~MbCurve ()
 Destructor.
 
MbePlaneType Type () const override
 Get the group type of the object.
 
MbePlaneType Family () const override
 Get family of object.
 
void Refresh () override
 Set all temporary (mutable) data of object to undefined (initial) state.
 
size_t size () const
 Number of objects if object is interpreted as vector of objects.
 
const MbCurveoperator[] (size_t) const
 An access operator.
 
virtual void AddYourGabaritMtr (MbRect &rect, const MbMatrix &matr) const
 Add a bounding box to rectangle. More...
 
bool IsVisibleInRect (const MbRect &rect, bool exact=false) const override
 Determine visibility of an object in rectangle. More...
 
virtual bool IsCompleteInRect (const MbRect &rect) const
 Determine whether an object is fully visible in rectangle. More...
 
double DistanceToPoint (const MbCartPoint &toP) const override
 Calculate the distance to a point.
 
bool DistanceToPointIfLess (const MbCartPoint &toP, double &d) const override
 Calculate the distance to a point. More...
 
virtual double GetPeriod () const
 Return period. More...
 
virtual bool IsPeriodic () const
 Define whether the curve is periodic. More...
 
bool IsTouch (double eps=Math::LengthEps) const
 Determine whether a curve is closed regardless of the smoothness of the closure. More...
 
void Tangent (double &t, MbVector &v) const
 Calculate tangent vector (normalized).
 
void Tangent (double &t, MbDirection &d) const
 Calculate tangent vector (normalized).
 
void Normal (double &t, MbVector &v) const
 Calculate main normal vector (normalized).
 
void Normal (double &t, MbDirection &d) const
 Calculate main normal vector (normalized).
 
void _Tangent (double t, MbVector &v) const
 Calculate tangent vector (normalized).
 
void _Tangent (double t, MbDirection &d) const
 Calculate tangent vector (normalized).
 
void _Normal (double t, MbVector &v) const
 Calculate main normal vector (normalized) at curve and its extension.
 
void _Normal (double t, MbDirection &d) const
 Calculate main normal vector (normalized) at curve and its extension.
 
virtual double Curvature (double t) const
 Calculate curvature of curve.
 
double CurvatureDerive (double t) const
 Calculate derivative of curvature by parameter.
 
double CurvatureRadius (double t) const
 Calculate radius of curve with a sign.
 
virtual bool IsBounded () const
 Define whether the curve is bounded.
 
virtual bool IsDegenerate (double eps=Math::LengthEps) const
 Define whether the curve is degenerate..
 
double GetParamLength () const
 Calculate the parametric length of a curve.
 
virtual void ResetTCalc () const
 Reset the current value of parameter.
 
virtual bool BeginApprox (double sag, double &tbeg, double &tend, MbCartPoint &pnt, bool &existNextPoint) const
 Start approximation for the drawing. More...
 
virtual bool GetNextPoint (double sag, double tend, double &tcur, MbCartPoint &pnt) const
 Calculate the next point. More...
 
virtual void CalculatePolygon (double sag, MbPolygon &poligon) const
 Calculate an array of points for drawing. More...
 
MbNurbsNurbsCurve (const MbCurveIntoNurbsInfo *nInfo=nullptr) const
 Construct a NURBS copy of a curve. More...
 
virtual MbCurveNurbsCurve (const MbNurbsParameters &tParameters) const
 Construct a NURBS copy of a curve. More...
 
virtual MbCurveTrimmed (double t1, double t2, int sense, bool saveParamLenAndLaw=false) const
 Construct a trimmed curve. More...
 
MbeNewtonResult PointProjectionNewton (const MbCartPoint &p, double xEpsilon, double yEpsilon, size_t iterLimit, double &t, bool ext) const
 Find the point projection to the curve. More...
 
void PointProjection (const MbCartPoint &pnt, MbCartPoint &on) const
 Calculate the point projection to the curve. More...
 
void BasePointProjection (const MbCartPoint &pnt, MbCartPoint &on) const
 Calculate the point projection to the curve. More...
 
void PointProjectionAndAngle (MbCartPoint &on, double &angle) const
 Calculate the point projection to the curve. More...
 
bool DirectPointProjection (const MbCartPoint &pnt, const MbDirection &dir, MbCartPoint &pp) const
 Calculate the point projection to the curve. More...
 
virtual bool SmallestPerpendicular (const MbCartPoint &pnt, double &tProj) const
 Find the nearest perpendicular to the curve. More...
 
virtual void Isoclinal (const MbVector &angle, SArray< double > &tFind) const
 Construct isoclines. More...
 
void HorzIsoclinal (SArray< double > &tFind) const
 Construct horizontal isoclines. More...
 
void VertIsoclinal (SArray< double > &tFind) const
 Construct vertical isoclines. More...
 
void LowestPoint (MbCartPoint &lowestPoint, double &tLowest) const
 Find the lowest point of a curve and the corresponding parameter.
 
virtual bool GoThroughPoint (MbCartPoint &pnt)
 Create a curve through a point. More...
 
virtual bool GetMiddlePoint (MbCartPoint &) const
 Calculate a middle point of a curve.
 
virtual void GetStartPoint (MbCartPoint &) const
 Calculate a start point of a curve.
 
virtual void GetEndPoint (MbCartPoint &) const
 Calculate an end point of a curve.
 
virtual bool IsSimilarToCurve (const MbCurve &curve, double precision=PARAM_PRECISION) const
 Define whether the curves are similar for the merge.
 
void GetPointsByEvenParamDelta (size_t n, std::vector< MbCartPoint > &pnts) const
 Get n points of a curve with equal intervals by parameter.
 
void GetPointsByEvenParamDelta (size_t n, SArray< MbCartPoint > &pnts) const
 
virtual void GetPointsByEvenLengthDelta (size_t n, std::vector< MbCartPoint > &pnts) const
 Get n points of a curve with equal intervals by arc length.
 
void GetPointsByEvenLengthDelta (size_t n, SArray< MbCartPoint > &pnts) const
 
virtual double LengthBetween2Points (MbCartPoint &p1, MbCartPoint &p2, MbCartPoint *pc=nullptr) const
 Calculate minimal length of a curve between two points on it. More...
 
bool IsPointOn (const MbCartPoint &, double eps=Math::LengthEps) const
 Check whether the point is on a curve with the tolerance eps.
 
bool IsParamOn (double t, double eps=Math::paramEpsilon) const
 Check whether the parameter is inside a range with the tolerance eps.
 
void CorrectCyclicParameter (double &t, double eps=Math::paramRegion) const
 Correct parameter for closed curves. More...
 
void CorrectParameter (double &t) const
 Correct parameter. More...
 
MbCurveInverseDuplicate () const
 Create a copy with changed direction.
 
bool IsInverseSame (const MbCurve &curve, double accuracy=LENGTH_EPSILON) const
 Define whether an inversed curve is the same.
 
virtual bool IsReparamSame (const MbCurve &curve, double &factor) const
 Define whether a reparameterized curve is the same. More...
 
MbCartPoint GetLimitPoint (ptrdiff_t number) const
 Calculate the boundary point. More...
 
void GetLimitPoint (ptrdiff_t number, MbCartPoint &pnt) const
 Calculate the boundary point. More...
 
void GetLimitTangent (ptrdiff_t number, MbVector &v) const
 Calculate a tangent vector to the boundary point. More...
 
void GetLimitPointAndTangent (ptrdiff_t number, MbCartPoint &pnt, MbVector &v) const
 Calculate a tangent vector and point at the end of a curve. More...
 
bool AreLimitPointsEqual () const
 Are boundary points equal? More...
 
virtual const MbCurveGetBasisCurve () const
 Returns the base curve if exists or itself.
 
virtual MbCurveSetBasisCurve ()
 Returns the base curve if exists or itself.
 
virtual double GetParamDelta () const
 Return an indent by parameter of a curve.
 
virtual const MbCurveGetSubstrate () const
 Get a substrate or itself.
 
virtual MbCurveSetSubstrate ()
 Get a substrate or itself.
 
virtual int SubstrateCurveDirection () const
 Return direction of a substrate relative to a curve or vice versa.
 
virtual void SubstrateToCurve (double &) const
 Transform a substrate parameter to the curve parameter.
 
virtual void CurveToSubstrate (double &) const
 Transform a curve parameter to the substrate parameter.
 
virtual double GetParamToUnit () const
 Return increment of parameter, corresponding to the unit length in space.
 
virtual double GetParamToUnit (double t) const
 Return increment of parameter, corresponding to the unit length in space according to parameter.
 
virtual double GetTEpsilon (double epsilon) const
 Return the minimal discernible value of parameter with the given tolerance.
 
virtual double GetTEpsilon (double t, double epsilon) const
 Return the minimal discernible value of parameter with the given tolerance according to parameter.
 
virtual double GetTRegion (double epsilon) const
 Return the minimal discernible value of parameter with the given tolerance.
 
virtual double GetTRegion (double t, double epsilon) const
 Return the minimal discernible value of parameter with the given tolerance according to parameter.
 
virtual double GetTRegion (double t, const MbDimAccuracy &xyEps) const
 Return the minimal discernible value of parameter with the given two-dimensinal accuracy according to parameter. The method takes into account the direction of the curve at a point.
 
double GetTMid () const
 Return the middle of parametric range of a curve.
 
double GetTRange () const
 Return the parametric length of a curve.
 
MbCartPoint PointOn (double &t) const
 Calculate point on the curve.
 
MbVector FirstDer (double &t) const
 Calculate first derivative.
 
MbDirection Tangent (double &t) const
 Calculate tangent vector (normalized).
 
MbDirection Normal (double &t) const
 Calculate the normal vector.
 
double DerLength (double &t) const
 Calculate the length of derivative vector.
 
MbPropertyCreateProperty (MbePrompt name) const override
 Create a custom property.
 
bool IsSpaceNear (const MbCurve &curve, double eps, bool ext, double devSag=5.0 *Math::deviateSag) const
 Check whether the two curves are metrically close. More...
 
bool IsSpaceNear (const MbCurve &curve, double xEps, double yEps, bool ext, double xNear, double yNear, double devSag=5.0 *Math::deviateSag) const
 Check whether the two curves are metrically close. More...
 
SimpleName GetCurveName () const
 A curve name.
 
void SetCurveName (SimpleName newName)
 Set a curve name.
 
- 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...
 
- 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.
 
- Public Member Functions inherited from MbNestSyncItem
void Lock () const
 Switch lock on (locking happens only in parallel region).
 
void Unlock () const
 Switch lock off if locking has been set.
 
CommonRecursiveMutexGetLock () const
 Get a pointer to the mutex object. Return nullptr if no parallelism. For use in ScopedLock.
 

Additional Inherited Members

- Protected Member Functions inherited from MbContour
 MbContour (const MbContour *, MbRegDuplicate *)
 Copy constructor.
 
- Protected Member Functions inherited from MbCurve
 MbCurve ()
 Default constructor.
 
 MbCurve (const MbCurve &other)
 Copy-constructor.
 
- Protected Member Functions inherited from MbPlaneItem
 MbPlaneItem ()
 Constructor.
 
- Protected Member Functions inherited from MbRefItem
 MbRefItem ()
 Constructor without parameters.
 
- Protected Attributes inherited from MbContour
RPArray< MbCurvesegments
 An array of contour segments.
 
bool closed
 An Attribute of curve closedness.
 
double paramLength
 Parametric length of a contour.
 
atomic_double metricLength
 Metric length of a contour.
 
MbRect rect
 Bounding box.
 
c3d::AtomicDoublePair areaSign
 Contour area with a sign.
 
- Protected Attributes inherited from MbCurve
SimpleName name
 A curve name. The object data is temporary and used internally.
 

Detailed Description

Contour with breaks.

Contour with breaks.
For using in the multiline MbMultiline.
Contains breaks MbBreak, visible parts - contours MbContour.
When using in a multiline every time when contour is rebuilding in it are updated list of numbers by the number of contour segments Each number indicates the segment number of base curve of multiline. which corresponds to this segment of contour.
If segment of contour is equidistant of base curve segment, then it corresponds to the number of this segment.
If contour is segment of multiline vertices traverse. then it corresponds to the number corresponding the previous segment of the contour.
Breaks in the contour can not be overlapped each other. If in the result of rebuilding a break overlapped on the other break then they are combined.

Constructor & Destructor Documentation

◆ MbContourWithBreaks()

MbContourWithBreaks::MbContourWithBreaks ( )

Creation of empty contour.

Creation of empty contour without segments.

Member Function Documentation

◆ Transform()

void MbContourWithBreaks::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.

Reimplemented from MbContour.

◆ Move()

void MbContourWithBreaks::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.

Reimplemented from MbContour.

◆ Rotate()

void MbContourWithBreaks::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.

Reimplemented from MbContour.

◆ Duplicate()

MbPlaneItem& MbContourWithBreaks::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.

Reimplemented from MbContour.

◆ GetBreak()

MbBreak* MbContourWithBreaks::GetBreak ( size_t  i) const
inline

A break by the number.

A break by the number.

A number isn't checked for correctness.

Parameters
[in]i- The number of break must be less than the number of breaks.
Returns
Pointer to break.

◆ GetBreaksRange()

MbRect1D MbContourWithBreaks::GetBreaksRange ( size_t  i) const

A break by the number in contour parameters.

A break by the number in contour parameters.

A number Is checked for correctness. If number is more than numbers of segments then result is everted region.

Parameters
[in]i- The break number must be less than the number of all breaks.
Returns
Break interval in contour parameters.

◆ GetVisibleCount()

size_t MbContourWithBreaks::GetVisibleCount ( ) const
inline

The number of visible parts.

The number of visible parts.

If contour does not contain breaks, then returns 0.

Returns
The number of visible parts.

◆ GetVisibleContour()

const MbContour* MbContourWithBreaks::GetVisibleContour ( size_t  i) const
inline

A visible part by the number.

A visible part by the number.

A number isn't checked for correctness.

Parameters
[in]i- The number of visible part must be less than the number of visible parts.
Returns
A pointer to visible part of the contour.

◆ GetInvisibleContour()

MbContour* MbContourWithBreaks::GetInvisibleContour ( size_t  i) const

Invisible part by the number of break.

Invisible part by the number of break.
A number Is checked for correctness. If the number is not less than the number of breaks, the function returns nullptr.
The resulting contour is to be deleted after use.

Parameters
[in]i- The number of break must be less than the number of visible parts.
Returns
A pointer to visible part of the contour.

◆ AddBreak() [1/3]

bool MbContourWithBreaks::AddBreak ( const MbCartPoint point1,
const MbCartPoint point2,
const MbCartPoint point3,
bool  invertBreak = false 
)

Add a break between points.

Add a break between points.

Parameters
[in]point1- The first boundary of break.
[in]point2- The second boundary of break.
[in]point3- A point which indicates a removable part of the closed contour,
in the case of open contour it is ignored.
[in]invertBreak- addition attribute of break on the opposite part of contour.
Returns
true if break has been added.

◆ AddBreak() [2/3]

bool MbContourWithBreaks::AddBreak ( double  t1,
double  t2,
double  t3,
bool  invertBreak = false 
)

Add a break between contour parameters.

Add a break between contour parameters.

Parameters
[in]t1- The first boundary of break.
[in]t2- The second boundary of break.
[in]t3- A parameter which indicates a removable part of the closed contour,
in the case if contour is open it is ignored.
[in]invertBreak- addition attribute of break on the opposite part of contour.
Returns
true if break has been added.

◆ AddBreak() [3/3]

bool MbContourWithBreaks::AddBreak ( const MbRect1D range)

Add a break by interval of contour parameters.

Add a break by interval of contour parameters.

Parameters
[in]range- An interval of contour parameters.
if range.zmin is greater than range.zmax then the function result is correct only in the case of closed contour -
added a break passing through the origin of the contour.
Returns
true if break has been added.

◆ DeleteBreaks()

bool MbContourWithBreaks::DeleteBreaks ( )

Remove breaks.

Remove all breaks.

Returns
true, if at least one break has been removed. Remove breaks.

◆ DeleteBreakAtNumber()

bool MbContourWithBreaks::DeleteBreakAtNumber ( size_t  breakIndex,
bool  rebuild = false 
)

Remove a break by the number.

Remove a break by the number.

Parameters
[in]breakIndex- The number of break.
checked for correctness.
[in]rebuild- Is the contour to be rebuilt after removing break.
If don't rebuild contour then the visible parts of contour do not match breaks.
Rebuild contour you can be separately by call RebuildBreaks.
Returns
true if break has been removed.

◆ DeleteBreakAtParam()

bool MbContourWithBreaks::DeleteBreakAtParam ( double  t)

Remove a break by parameter on the contour.

Remove a break by parameter on the contour.

Returns
true if break has been removed

◆ DeleteBreaksAtBaseNumber()

void MbContourWithBreaks::DeleteBreaksAtBaseNumber ( size_t  baseNumber,
bool  delTracingBreaks,
bool  delEquidBreaks,
bool  delInLineSeg = true 
)

Remove breaks on the segments with the corresponding base number.

Remove breaks on the segments with the corresponding base number.

Break are removed if base numbers of segments are filled in contour. The number are filled when multiline is rebuilt which contrains contour.

If segment of contour corresponds to one of break parts then entire break is removed.

Parameters
[in]baseNumber- A segment number of base curve.
[in]delTracingBreaks- Is it necessary for breaks to be removed from segments which correspond to multiline vertices traverse.
[in]delEquidBreaks- breaks to be removed from segments which correspond to equidistants.
[in]delInLineSeg- Is it necessary to remode breaks from straight segments.

◆ DeleteSmallBreaks()

bool MbContourWithBreaks::DeleteSmallBreaks ( double  length)

Remove breaks of the small metric length.

Remove breaks of the small metric length.
In case of success the visible contours are rebuilt by breaks.

Parameters
[in]length- Minimal length of invisible part.
Returns
true, if at least one break has been removed.

◆ DeleteSmallVisContours()

bool MbContourWithBreaks::DeleteSmallVisContours ( double  length)

Remove visible parts of the small metric length.

Remove visible parts of the small metric length.

Corresponds to union of close discontinuities into one. In case of success the visible contours are rebuilt by breaks.

Parameters
[in]length- Minimal length of visible part.
Returns
true if breaks have been changed.

◆ GetBreakAtPoint()

bool MbContourWithBreaks::GetBreakAtPoint ( const MbCartPoint p,
double  rad,
size_t &  index 
) const

The number of break the edge of which is into point neighbourhood.

The number of break the edge of which is into point neighbourhood.

Parameters
[in]p- Point.
[in]rad- Radius of point neighborhood to search the break.
[out]index- The number of break.
Returns
true if the break is found.

◆ GetBreaksInRect() [1/2]

bool MbContourWithBreaks::GetBreaksInRect ( const MbRect rect,
SArray< size_t > &  breaksNumbers 
) const

Numbers of breaks which at least one edge fall into the region.

Numbers of breaks which at least one edge fall into the region.

Parameters
[in]rect- Region of search.
[out]breaksNumbers- Numbers of breaks.
Returns
true, if at least one break has been found.

◆ GetBreaksInRect() [2/2]

bool MbContourWithBreaks::GetBreaksInRect ( const MbContour contour,
SArray< size_t > &  breaksNumbers 
) const

Numbers of breaks which at least one edge fall into the region.

Numbers of breaks which at least one edge fall into the region given contour.

Parameters
[in]contour- Contour must be closed and have the right direction.
[out]breaksNumbers- Numbers of breaks.
Returns
true, if at least one break has been found.

◆ HitToBreaks()

bool MbContourWithBreaks::HitToBreaks ( const MbCartPoint p) const

Determine whether a point it inside a break.

Determine whether a point it inside a break.

Parameters
[in]p- A point for the check.
Returns
true, if point falls into any break.

◆ IsRectInBreak()

bool MbContourWithBreaks::IsRectInBreak ( const MbRect1D rect)

Whether the interval of parameters is on break.

Whether the interval of parameters is on break.

Parameters
[in]rect- Interval to check.
Returns
true if interval entirely is on the break or coincides with it.

◆ RebuildBreaks() [1/2]

void MbContourWithBreaks::RebuildBreaks ( SArray< size_t > &  oldBaseNumbers)

Update visible and invisible contours.

Update visible and invisible contours by base curve of multiline respectively.
After rebuilding the breaks must correspond to segments of base multiline curve.

Parameters
[in]oldBaseNumbers- Old numbers of base segments,
must be saved before multiline is changed.

◆ RebuildBreaks() [2/2]

void MbContourWithBreaks::RebuildBreaks ( )

Update visible and invisible contours.

Update visible and invisible contours according to breaks.

◆ TransformMultlinesBreaks()

void MbContourWithBreaks::TransformMultlinesBreaks ( const MbMatrix matr)

Transform according to matrix.

Transform according to matrix.
Used to transform multiline. Transforms length and distance from fixed point of straight break, and fixed point.

Parameters
[in]matr- A transformation matrix.

◆ GetLocalBreaksParam()

double MbContourWithBreaks::GetLocalBreaksParam ( const MbBreaksPart brPart,
size_t &  segNumber 
) const

A binding parameter of a break part.

Calculate binding parameter of a break part according to the type of contour segment.

Parameters
[in]brPart- A break part of this contour.
[out]segNumber- A number of the contour segment.
Returns
A parameter of the break center on the contour segment.

◆ SetBreakFixedPoint()

void MbContourWithBreaks::SetBreakFixedPoint ( const MbCartPoint newPoint,
MbBreaksPart part 
)

Fix the point.

Set the fixed point of a break part.

Parameters
[in]newPoint- A new fixed point.
[out]part- A part of contour break to change.

◆ SetBreakFixedVar()

void MbContourWithBreaks::SetBreakFixedVar ( double  newFixedVar,
MbBreaksPart part 
)

Fix the variable.

Set the fixed variable of a break part.

Parameters
[in]newFixedVar- New fixed variable.
[out]part- A part of contour break to change.

◆ GetBaseNumber()

size_t MbContourWithBreaks::GetBaseNumber ( size_t  i) const

Segment number of the base contour.

Segment number of the base contour.

Segment number will be found if the array of numbers is not empty and it was numbered correctly, ie count of numbers is equal to count of contour segments

Parameters
[in]i- Index of number.
Returns
Number of segment from the array of numbers.

◆ AddBaseSegNumber()

void MbContourWithBreaks::AddBaseSegNumber ( size_t  number)

Add number of the base segment.

Add segment number of base contour to the end of array.

Parameters
[in]number- Number to add.

◆ AddBaseSegNumberAtBegin()

void MbContourWithBreaks::AddBaseSegNumberAtBegin ( size_t  number)

Add number of the base segment.

Add segment number of base contour to the beginning of array.

Parameters
[in]number- Number to add.

◆ InsertLastSegNumber()

void MbContourWithBreaks::InsertLastSegNumber ( size_t  lastInd)

Insert number after the lastInd.

Insert number corresponding lastInd after element lastInd.

Parameters
[in]lastInd- Index of number.

◆ DeleteBaseSegNumber()

void MbContourWithBreaks::DeleteBaseSegNumber ( size_t  ind)

Delete element by an index.

Remove number of the base segment by an index.

Parameters
[in]ind- Index of number.

◆ ChangeBreaksSegNumbers()

void MbContourWithBreaks::ChangeBreaksSegNumbers ( size_t  begBaseNumber,
ptrdiff_t  deltaN 
)

Change numbers of segments in the breaks.

Change numbers of segments in the breaks.

A given number of the base segments corresponds to the segment - equidistant on the contour. For all breaks: if at least one part of break is in this segment, the segment number of all of its parts will be changed.

Parameters
[in]begBaseNumber- An index of the base segment.
[in]deltaN- The change value of segment number of breaks parts.

◆ ChangeBreaksAtClosed()

void MbContourWithBreaks::ChangeBreaksAtClosed ( bool  newClosed)

Change breaks of closedness respectively.

Change breaks of closedness respectively.

When changing attribute of contour closedness breaks need to change respectively to the new value of closedness.
If contour has become open - the break located on the first and last segment is divided into 2 parts at the same time.
If contour has become closed - breaks, the first of which is adjacent to the left boundary of the first contour segment and the second of which is adjacent to the right boundary of the last contour segment are united into one.

Parameters
[in]newClosed- The new closedness attribute of contour.

◆ MoveBreaksSegNumbers()

void MbContourWithBreaks::MoveBreaksSegNumbers ( ptrdiff_t  deltaN)

Change segments numbers of breaks parts.

Change segments numbers of breaks parts.

Parameters
[in]deltaN- A change value.

◆ IsTrasingBreaksPart()

bool MbContourWithBreaks::IsTrasingBreaksPart ( const MbBreaksPart part,
size_t &  vertNumber 
) const

Is the break part of this contour located on the segment of vertices traverse.

Is the break part of this contour located on the segment of vertices traverse.

Parameters
[in]part- A break part of this contour.
[out]vertNumber- In the case of success returns the vertex number.
Returns
true, if the break part is located on the segment of vertices traverse.

◆ SwapBreaksAndBaseNumbers()

void MbContourWithBreaks::SwapBreaksAndBaseNumbers ( MbContourWithBreaks other)

Swap breaks.

Swap breaks.

Parameters
[in]other- A contour with breaks to swap.

◆ AddContoursBreaks()

void MbContourWithBreaks::AddContoursBreaks ( const MbContourWithBreaks other)

Add contour breaks.

Add contour breaks.

Parameters
[in]other- A contour with breaks for adding breaks.

◆ ChangeBaseNumbers()

void MbContourWithBreaks::ChangeBaseNumbers ( const MbContourWithBreaks other)

Replace the numbers of base segments.

Replace the numbers of base segments.

Parameters
[in]other- A contour with new numbers.

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