C3D Toolkit
Kernel - 117982, Vision - 2.9.2.2
|
Elliptical arc in three-dimensional space. More...
#include <cur_arc3d.h>
Public Member Functions | |
MbArc3D (const MbCartPoint3D &pc, const MbCartPoint3D &p1, const MbCartPoint3D &p2, int initSense=0) | |
Constructor of an ellipse, a circle or an elliptical or circular arc. More... | |
MbArc3D (const MbCartPoint3D &p0, const MbCartPoint3D &p1, const MbCartPoint3D &p2, int n, bool closed) | |
Constructor of a circle or a circular arc. More... | |
MbArc3D (const MbCartPoint3D &pc, const MbCartPoint3D &p1, const MbCartPoint3D &p2, const MbVector3D &aZ, int initSense) | |
Constructor of a circle or a circular arc. More... | |
MbArc3D (const MbCartPoint3D &p0, const MbVector3D &vZ, const MbVector3D &vX, double aa, double bb, double angle) | |
Constructor of an elliptical arc. More... | |
MbArc3D (const MbCartPoint3D &p1, const MbCartPoint3D &p2, double a_4, MbVector3D &vZ) | |
Constructor of a circular arc. More... | |
MbArc3D (const MbCartPoint3D &p1, const MbCartPoint3D &p2, const MbVector3D &dirInPoint, bool insecond) | |
Constructor of a circle by two points and direction to the center from one of them. More... | |
MbArc3D (const MbPlacement3D &place, double aa, double bb, double angle) | |
Constructor of an elliptical arc. More... | |
MbArc3D (const MbArc3D &init, double t1, double t2, int initSense, const MbDimAccuracy &xyzEps=MbDimAccuracy::threeDimAcc) | |
Constructor of an elliptical arc. More... | |
MbArc3D (const MbArc3D &init, MbCartPoint3D p1, MbCartPoint3D p2, int initSense) | |
Constructor of an elliptical arc. More... | |
MbArc3D (const MbArc &ellipse, const MbPlacement3D &place) | |
Constructor by a local system and two-dimensional elliptical arc. More... | |
bool | Init (const MbCartPoint3D &p0, const MbCartPoint3D &p1, const MbCartPoint3D &p2, int n, bool closed) |
Initialization of a circular arc by three points; (n == 0) - a circle or an arc by the center and two points, (n == 1) - a circle or an arc by three points. Return true if successful. | |
bool | Init (double a_2, const MbCartPoint3D &p1, const MbCartPoint3D &p2, MbVector3D &vZ) |
Initialization of a circular arc by the starting and the end points and 1/2 of the arc opening angle. Return true if successful. | |
void | Init (const MbArc &ellipse, const MbPlacement3D &pos) |
Initialization of an arc by 2D-arc and local coordinate system. | |
bool | Init (const MbCartPoint3D &p1, const MbCartPoint3D &p2, const MbVector3D &dirInPoint, bool insecond) |
Initialization of a circle by two points and direction to the center in one of them. Returns true if successful. | |
void | Inverse (MbRegTransform *iReg=nullptr) override |
Change direction of a curve. | |
double | Step (double t, double sag) const override |
Calculate parameter step. More... | |
double | DeviationStep (double t, double angle) const override |
Calculate parameter step. More... | |
double | MetricStep (double t, double length) const override |
Calculate parameter step. More... | |
bool | NearPointProjection (const MbCartPoint3D &, double &t, bool ext, MbRect1D *tRange=nullptr) const override |
Find the point projection to the curve. More... | |
MbNurbs3D * | NurbsCurve (const MbCurveIntoNurbsInfo &) const override |
Construct a NURBS copy of a curve. More... | |
MbCurve3D * | NurbsCurve (const MbNurbsParameters &) const override |
Construct a NURBS copy of a curve. More... | |
MbCurve3D * | Trimmed (double t1, double t2, int sense, const MbDimAccuracy &xyzEps, bool saveParamLenAndLaw) const override |
Construct a trimmed curve with the given two-dimensional accuracy. More... | |
double | CalculateMetricLength () const override |
Calculate the metric length of a curve. | |
double | GetLengthEvaluation () const override |
Calculate the metric length of a curve. More... | |
double | Curvature (double t) const override |
Calculate curvature of curve. | |
bool | DistanceAlong (double &t, double len, int curveDir, double eps=Math::metricPrecision, VERSION version=Math::DefaultMathVersion()) const override |
Translate parameter along the curve. More... | |
size_t | GetCount () const override |
Define the number of splittings for one passage in operations. | |
void | GetPointsByEvenLengthDelta (size_t n, std::vector< MbCartPoint3D > &pnts) const override |
Get n points of a curve with equal intervals by arc length. | |
MbCurve * | GetMap (const MbMatrix3D &, MbRect1D *pRgn=nullptr, VERSION version=Math::DefaultMathVersion(), bool *coincParams=nullptr) const override |
Construct a planar projection of a piece of a space curve. More... | |
MbCurve * | GetMapPsp (const MbMatrix3D &, double zNear, MbRect1D *pRgn=nullptr) const override |
Construct a planar projection of a piece of a space curve. More... | |
double | GetRadius (double accuracy=METRIC_REGION) const override |
Get the physical radius of the curve or zero if it impossible. More... | |
bool | GetCircleAxis (MbAxis3D &) const override |
Get an axis of a circle which is geometrically coincident to the given curve. More... | |
bool | GetPlaneCurve (MbCurve *&curve2d, MbPlacement3D &place, bool saveParams, PlanarCheckParams params=PlanarCheckParams()) const override |
Get planar curve and placement if the space curve is planar. More... | |
void | AddYourGabaritTo (MbCube &) const override |
Expand sent bounding box (a.k.a. gabarit), so that it included the object. More... | |
void | CalculateGabarit (MbCube &) const override |
Calculate bounding box of a curve. | |
void | CalculateLocalGabarit (const MbMatrix3D &, MbCube &) const override |
To compute bounding box in a local coordinate system. More... | |
bool | IsShift (const MbSpaceItem &, MbVector3D &, bool &isSame, double accuracy=LENGTH_EPSILON) const override |
Whether the object is a shift. | |
bool | IsSimilarToCurve (const MbCurve3D &curve, double precision=METRIC_PRECISION) const override |
Whether the curves to union (joining) are similar. | |
void | SetRadiusA (double aa) |
Set the major semiaxis. | |
void | SetRadiusB (double bb) |
Set the minor semiaxis. | |
void | SetRadius (double r) |
Set circle radius. | |
double | GetRadiusA () const |
Get the major semiaxis. | |
double | GetRadiusB () const |
Get the minor semiaxis. | |
void | SetLimitPoint (ptrdiff_t number, const MbCartPoint3D &) |
Replace a start (1) or end (2) point of the arc. | |
double | GetAngle () const |
Get the end angle of the arc. | |
void | SetAngle (double ang) |
Change the end angle of the arc. | |
bool | IsCircle (double eps=METRIC_REGION) const |
Whether the arc of an ellipse is an arc of a circle. | |
double | CheckParam (double &t) const |
Set the parameter into the region of the legal values. | |
void | ParamToAngle (double &t) const |
Convert parameter of curve to the angle. | |
void | AngleToParam (double &t) const |
Convert an angle of curve to a parameter of curve. | |
double | GetTrim1 () const |
Parameters of start point. | |
double | GetTrim2 () const |
Parameters of end point. | |
bool | MakeTrimmed (double t1, double t2) |
Setting of the parameters of trimming with keeping the curve direction. | |
void | AlignXAxis () |
Rotate the placement of a circular arc so as the ox-axis points to the start point of the arc. | |
bool | IsPlanar (double accuracy=METRIC_EPSILON) const override |
Whether the curve is planar? | |
bool | GetPlacement (MbPlacement3D &place, PlanarCheckParams params=PlanarCheckParams()) const override |
Fill the placement if a curve is planar. | |
void | GetCentre (MbCartPoint3D &) const override |
Give the curve center. | |
void | GetWeightCentre (MbCartPoint3D &) const override |
Give the gravity center of a curve. | |
MbResultType | Extend (const MbCurveExtensionParameters3D ¶meters, c3d::SpaceCurveSPtr &resCurve) const override |
Extend the curve. More... | |
bool | Normalize () |
Orthonormalize the local coordinate system. | |
virtual MbCurve3D * | Trimmed (double t1, double t2, int sense, bool saveParamLenAndLaw=false) const |
Construct a trimmed curve. More... | |
virtual MbCurve3D * | Trimmed (double t1, double t2, int sense, const MbDimAccuracy &xyzEps, bool saveParamLenAndLaw) const |
Construct a trimmed curve with the given two-dimensional accuracy. More... | |
Common functions of a geometric object. | |
MbeSpaceType | IsA () const override |
Get the type of the object. | |
MbSpaceItem & | Duplicate (MbRegDuplicate *=nullptr) const override |
Create a copy of the object. More... | |
void | Transform (const MbMatrix3D &, MbRegTransform *=nullptr) override |
Convert the object according to the matrix. More... | |
void | Move (const MbVector3D &, MbRegTransform *=nullptr) override |
Move an object along a vector. More... | |
void | Rotate (const MbAxis3D &, double angle, MbRegTransform *=nullptr) override |
Rotate an object around an axis at a given angle. More... | |
bool | IsSame (const MbSpaceItem &other, double accuracy=LENGTH_EPSILON) const override |
Determine whether an object is equal. More... | |
bool | SetEqual (const MbSpaceItem &) override |
Make objects equal if they are similar. More... | |
double | DistanceToPoint (const MbCartPoint3D &) const override |
Determine the distance to the point. More... | |
bool | IsSpaceSame (const MbSpaceItem &item, double eps=METRIC_REGION) const override |
Are the objects identical in space? | |
void | GetProperties (MbProperties &) override |
Outstanding properties of the object. More... | |
void | SetProperties (const MbProperties &) override |
Change the properties of an object. More... | |
void | GetBasisPoints (MbControlData3D &) const override |
Get control points of object. | |
void | SetBasisPoints (const MbControlData3D &) override |
Change the object by control points. | |
Functions for curve domain description | |
double | GetTMax () const override |
Get the maximum value of parameter. | |
double | GetTMin () const override |
Get the minimum value of parameter. | |
bool | IsClosed () const override |
Define whether the curve is periodic. More... | |
double | GetPeriod () const override |
Return period. If a curve is not periodic then 0. | |
Functions for working in the domain of a curve. | |
PointOn, FirstDer, SecondDer, ThirdDer,... functions correct parameter when it runs out the domain. | |
void | PointOn (double &t, MbCartPoint3D &) const override |
Calculate a point on the curve. More... | |
void | FirstDer (double &t, MbVector3D &) const override |
Calculate first derivative. | |
void | SecondDer (double &t, MbVector3D &) const override |
Calculate second derivative. | |
void | ThirdDer (double &t, MbVector3D &) const override |
Calculate third derivative. | |
void | Normal (double &t, MbVector3D &) const override |
Calculate main normal vector. | |
Functions for working inside and outside of the curve domain. | |
_PointOn, _FirstDer, _SecondDer, _ThirdDer,... functions don't correct parameter when it runs out the domain. The bounded curve is extended due to the equations of curve. | |
void | _PointOn (double t, MbCartPoint3D &) const override |
Calculate point at curve and its extension. More... | |
void | _FirstDer (double t, MbVector3D &) const override |
Calculate first derivative at curve and its extension. | |
void | _SecondDer (double t, MbVector3D &) const override |
Calculate second derivative at curve and its extension. | |
void | _ThirdDer (double t, MbVector3D &) const override |
Calculate third derivative at curve and its extension. | |
void | _Normal (double t, MbVector3D &) const override |
Calculate main normal vector (normalized) at curve and its extension. | |
Functions for get of the group of data inside and outside the curve's domain of parameter. | |
void | Explore (double &t, bool ext, MbCartPoint3D &pnt, MbVector3D &fir, MbVector3D *sec, MbVector3D *thir) const override |
Calculate point and derivatives of object for given parameter. More... | |
![]() | |
virtual | ~MbCurve3D () |
Destructor. | |
virtual void | Accept (Visitor &visitor) |
Implementation of a function initializing a visit of an object. | |
size_t | size () const |
Size of curve interpreted as vector of curves. | |
const MbCurve3D * | operator[] (size_t) const |
An access operator. | |
MbeSpaceType | Type () const override |
Get the group object type. | |
MbeSpaceType | Family () const override |
Get family of objects. | |
virtual MbCurve3D & | InverseDuplicate () const |
Create a copy with changed direction. | |
double | DistanceToPoint (const MbCartPoint3D &) const override |
Determine the distance to the point. More... | |
void | AddYourGabaritTo (MbCube &) const override |
Expand sent bounding box (a.k.a. gabarit), so that it included the object. More... | |
void | Refresh () override |
Translate all the time (mutable) data objects in an inconsistent (initial) state. | |
virtual void | PrepareIntegralData (const bool forced) const |
Calculate temporary (mutable) data of an object. More... | |
virtual bool | IsPeriodic () const |
Define whether the curve is periodic. More... | |
bool | IsTouch (double eps=Math::metricPrecision) const |
Determine whether a curve is closed regardless of the smoothness of the closure. More... | |
virtual void | Tangent (double &t, MbVector3D &) const |
Calculate tangent vector (normalized). | |
virtual void | BNormal (double &t, MbVector3D &) const |
Calculate binormal vector. | |
virtual void | _Tangent (double t, MbVector3D &) const |
Calculate tangent vector (normalized) at curve and its extension. | |
virtual void | _BNormal (double t, MbVector3D &) const |
Calculate binormal vector (normalized) at curve and its extension. | |
virtual void | FastApproxExplore (double &t, MbCartPoint3D &pnt, MbVector3D &fir, MbVector3D *sec) const |
Calculate point and derivatives on the curve. More... | |
double | CurveStep (const double &t, const MbStepData &stepData) const |
Calculate parameter step. More... | |
virtual void | ResetTCalc () const |
Reset the current value of parameter. | |
virtual const MbCurve3D & | GetBasisCurve () const |
Returns the base curve if exists or itself. | |
virtual MbCurve3D & | SetBasisCurve () |
Returns the base curve if exists or itself. | |
virtual void | ThirdMetricDer (double t, MbVector3D &vect) const |
Calculate second derivative of tangent. | |
MbNurbs3D * | NurbsCurve (const MbCurveIntoNurbsInfo *nInfo=nullptr) const |
Construct a NURBS copy of a curve. More... | |
virtual size_t | NurbsCurveMinPoints (const MbNurbsParameters &tParameters, double epsilon=c3d::METRIC_DELTA) const |
Define the number of knots of a NURBS curve which is required to approximate the curve with the given tolerance. More... | |
virtual MbCurve3D * | Trimmed (double t1, double t2, int sense, bool saveParamLenAndLaw=false) const |
Construct a trimmed curve. More... | |
double | GetParamLength () const |
Return the parametric length of a curve. | |
virtual double | GetMetricLength () const |
Calculate the metric length of a curve. | |
virtual double | CalculateLength (double t1, double t2) const |
Calculate the metric length of a curve. More... | |
void | CalculateLocalGabarit (const MbMatrix3D &into, MbCube &cube) const override |
To compute bounding box in a local coordinate system. More... | |
virtual bool | IsDegenerate (double eps=METRIC_PRECISION) const |
Check whether the curve is degenerated.calculate. | |
virtual bool | IsStraight (bool ignoreParams=false) const |
Whether the line is straight? | |
virtual bool | IsSmoothConnected (double angleEps) const |
Are joints of contour/curve smooth? | |
virtual void | ChangeCarrier (const MbSpaceItem &item, MbSpaceItem &init) |
Change the carrier. For surface curves. | |
virtual bool | ChangeCarrierBorne (const MbSpaceItem &item, MbSpaceItem &init, const MbMatrix &matr) |
Change the carrier. More... | |
MbProperty & | CreateProperty (MbePrompt name) const override |
Create your own property with the name. | |
void | CalculateMesh (const MbStepData &stepData, const MbFormNote ¬e, MbMesh &mesh) const override |
Build polygonal copy mesh. More... | |
virtual void | CalculatePolygon (const MbStepData &stepData, MbPolygon3D &polygon) const |
Calculate an array of points for drawing. More... | |
virtual MbeNewtonResult | PointProjectionNewton (const MbCartPoint3D &p, size_t iterLimit, double &t, bool ext) const |
Find the point projection to the curve. More... | |
virtual MbeNewtonResult | IsoclinalNewton (const MbVector3D &dir, size_t iterLimit, double &t) const |
Find isoclines of a curve. More... | |
virtual void | GetIsoclinal (const MbVector3D &nor, SArray< double > &tIso) const |
Find all isoclines of a curve. More... | |
virtual double | DistanceToCurve (const MbCurve3D &curve2, double &t1, double &t2) const |
Calculate the nearest distance to a curve. | |
virtual double | DistanceToPlace (const MbPlacement3D &place, double &t0, double &angle) const |
The nearest point of a curve by the placement. | |
virtual MbCurve * | GetProjection (const MbPlacement3D &place, VERSION version) const |
Construct a planar projection of a space curve to a plane. More... | |
void | GetPointsByEvenParamDelta (size_t n, std::vector< MbCartPoint3D > &pnts) const |
Get n points of a curve with equal intervals by parameter. | |
void | GetPointsByEvenParamDelta (size_t n, SArray< MbCartPoint3D > &pnts) const |
void | GetPointsByEvenLengthDelta (size_t n, SArray< MbCartPoint3D > &pnts) const |
void | GetBasisPoints (MbControlData3D &) const override |
Get control points of object. | |
void | SetBasisPoints (const MbControlData3D &) override |
Change the object by control points. | |
virtual bool | IsContinuousDerivative (bool &contLength, bool &contDirect, c3d::DoubleVector *params=nullptr, double epsilon=EPSILON) const |
Have the first derivative of the curve the continuous length and direction? More... | |
virtual bool | SetContinuousDerivativeLength (VERSION version, double epsilon=EPSILON) |
Eliminate the discontinuities of the first derivative at length. More... | |
bool | IsSpaceNear (const MbCurve3D &curve, double eps, bool ext, double devSag=5.0 *Math::deviateSag) const |
Check whether the two curves are metrically close. More... | |
bool | IsPointOn (const MbCartPoint3D &, double eps=METRIC_PRECISION) const |
Check whether a point is on a curve or not. | |
double | GetTMid () const |
Return the middle of parametric range of a curve. | |
double | GetTRange () const |
Return the parametric length of a curve. | |
MbCartPoint3D | PointOn (double &t) const |
Calculate point on the curve. | |
MbVector3D | FirstDer (double &t) const |
Calculate first derivative. | |
MbVector3D | SecondDer (double &t) const |
Calculate second derivative. | |
MbVector3D | ThirdDer (double &t) const |
Calculate third derivative. | |
virtual void | GetCurvatureSpecialPoints (std::vector< c3d::DoublePair > &points) const |
Find all the special points of the curvature function of the curve. More... | |
virtual void | GetAnalyticalFunctionsBounds (std::vector< double > ¶ms) const |
Get the boundaries of the curve sections that are described by one analytical function. More... | |
virtual void | BreakPoints (std::vector< double > &vBreaks, double precision=ANGLE_REGION) const |
\ ru Определение точек излома кривой. The determination of curve smoothness break points. | |
MbCartPoint3D | GetLimitPoint (ptrdiff_t number) const |
Calculate the boundary point. More... | |
void | GetLimitPoint (ptrdiff_t number, MbCartPoint3D &pnt) const |
Calculate the boundary point. More... | |
MbVector3D | GetLimitTangent (ptrdiff_t number) const |
Calculate a tangent vector to the boundary point. More... | |
void | GetLimitTangent (ptrdiff_t number, MbVector3D &v) const |
Calculate a tangent vector to the boundary point. More... | |
bool | AreLimitPointsEqual () const |
Are boundary points equal? More... | |
bool | SetInParamRegion (double &t) const |
Move to the parametric region. | |
bool | IsParamOn (double t, double eps) const |
Check whether a parameter is in the range of the curve. | |
bool | IsInverseSame (const MbCurve3D &curve, double accuracy=LENGTH_EPSILON) const |
Whether an inversed curve is the same. | |
virtual bool | IsReparamSame (const MbCurve3D &curve, double &factor) const |
Define whether a reparameterized curve is the same. More... | |
virtual double | GetParamToUnit () const |
Get increment of parameter, corresponding to the unit length in space. | |
virtual double | GetParamToUnit (double t) const |
Get increment of parameter, corresponding to the unit length in space. | |
double | GetTEpsilon () const |
Get the minimum distinguishable value of parameter. | |
double | GetTEpsilon (double t) const |
Get the minimum distinguishable value of parameter. | |
double | GetTRegion () const |
Get the minimum distinguishable value of parameter. | |
double | GetTRegion (double t) const |
Get the minimum distinguishable value of parameter. | |
double | GetTRegion (double t, const MbDimAccuracy &xyzEps) const |
Get the minimum distinguishable value of parameter with the given three-dimensional accuracy according to parameter. | |
virtual const MbCurve3D & | GetSubstrate () const |
Get a substrate or itself. | |
virtual MbCurve3D & | SetSubstrate () |
Get a substrate or itself. | |
virtual int | SubstrateCurveDirection () const |
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. | |
bool | GetPlaneCurve (SPtr< MbCurve > &curve2d, MbPlacement3D &place, bool saveParams, PlanarCheckParams params=PlanarCheckParams()) const |
Get planar curve and placement if the space curve is planar. More... | |
bool | GetPlaneCurve (SPtr< const MbCurve > &curve2d, MbPlacement3D &place, bool saveParams, PlanarCheckParams params=PlanarCheckParams()) const |
Get planar curve and placement if the space curve is planar. More... | |
virtual bool | GetSurfaceCurve (MbCurve *&curve2d, MbSurface *&surface, VERSION version=Math::DefaultMathVersion()) const |
Get surface curve if the space curve is surface (after the using call DeleteItem for arguments) | |
bool | GetSurfaceCurve (SPtr< MbCurve > &curve2d, SPtr< MbSurface > &surface, VERSION version=Math::DefaultMathVersion()) const |
Get surface curve if the space curve is surface (after the using call DeleteItem for arguments) | |
bool | GetSurfaceCurve (SPtr< const MbCurve > &curve2d, SPtr< const MbSurface > &surface, VERSION version=Math::DefaultMathVersion()) const |
Get surface curve if the space curve is surface (after the using call DeleteItem for arguments) | |
void | CalculateGrid (double radius, const MbStepData &stepData, MbMesh &mesh) const |
Approximation of a curve by the flat tube with the given radius. | |
SimpleName | GetCurveName () const |
A curve name. | |
void | SetCurveName (SimpleName newName) |
Set a curve name. | |
![]() | |
virtual | ~MbSpaceItem () |
Destructor. | |
void | PrepareWrite () const |
Register object. More... | |
MbeRefType | RefType () const override |
Get a registration type (for copying, duplication). | |
bool | IsFamilyRegistrable () const override |
Whether the object belongs to a registrable family. | |
virtual bool | IsSimilar (const MbSpaceItem &item) const |
Determine whether an object is similar. More... | |
void | CalculateWire (const MbStepData &stepData, MbMesh &mesh) const |
void | CalculateWire (double sag, MbMesh &mesh) const |
virtual void | GetBasisItems (RPArray< MbSpaceItem > &) |
Outstanding reference objects in a container sent. | |
![]() | |
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. | |
![]() | |
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. | |
![]() | |
void | Lock () const |
Switch lock on (locking happens only in parallel region). | |
void | Unlock () const |
Switch lock off if locking has been set. | |
CommonRecursiveMutex * | GetLock () const |
Get a pointer to the mutex object. Return nullptr if no parallelism. For use in ScopedLock. | |
Static Public Member Functions | |
static MbArc3D * | Create (const MbCartPoint3D &pc, const MbCartPoint3D &p1, const MbCartPoint3D &p2, int initSense=0) |
Create ellipse, a circle or an elliptical or circular arc. More... | |
static MbArc3D * | Create (const MbCartPoint3D &p0, const MbCartPoint3D &p1, const MbCartPoint3D &p2, int n, bool closed) |
Create circle or a circular arc. More... | |
static MbArc3D * | Create (const MbCartPoint3D &pc, const MbCartPoint3D &p1, const MbCartPoint3D &p2, const MbVector3D &aZ, int initSense) |
Create circle or a circular arc. More... | |
static MbArc3D * | Create (const MbCartPoint3D &p0, const MbVector3D &vZ, const MbVector3D &vX, double aa, double bb, double angle) |
Create elliptical arc. More... | |
static MbArc3D * | Create (const MbCartPoint3D &p1, const MbCartPoint3D &p2, double a_4, MbVector3D &vZ) |
Create circular arc. More... | |
static MbArc3D * | Create (const MbCartPoint3D &p1, const MbCartPoint3D &p2, const MbVector3D &dirInPoint, bool insecond) |
Create circle by two points and direction to the center from one of them. More... | |
Protected Member Functions | |
MbArc3D () | |
Constructor of a circle with default parameters. More... | |
![]() | |
MbCurve3D () | |
Default constructor. | |
MbCurve3D (const MbCurve3D &other) | |
Copy-constructor. | |
![]() | |
MbSpaceItem () | |
Default constructor. | |
![]() | |
MbRefItem () | |
Constructor without parameters. | |
Protected Attributes | |
MbPlacement3D | position |
Local coordinate system. | |
double | a |
Radius of semiaxis along X. | |
double | b |
Radius of semiaxis along Y. | |
double | trim1 |
The start point parameters. | |
double | trim2 |
The end point parameters. | |
bool | closed |
Closedness. | |
MbCube | cube |
Bounding box. | |
![]() | |
SimpleName | name |
A curve name. The object data is temporary and used internally. | |
Elliptical arc in three-dimensional space.
The elliptical arc is described by two radii a and b and two parameters trim1 and trim2 given in the local coordinate system 'position'.
Parameters 'trim1' and 'trim2' are measured along the arc in direction from position.axisX axis to position.axisY axis. Parameters 'trim1' and 'trim2' will be called parameters of trimming. Values of parameters of trimming equal to 0 and 2pi correspond to a point on position.axisX axis.
Parameter t of curve possesses the values in the range: 0<=t<=trim2-trim1. The curve can be closed. For closed curve: trim2-trim1=2pi.
Radius-vector of the curve in the method PointOn(double&t,MbCartPoint3D&r) is described by the function
r(t) = position.origin + (a cos(trim1+t) position.axisX) + (b sin(trim1+t) position.axisY).
Radii of the curve must be positive: a>0, b>0.
The following inequalities must be satisfied for the parameters of trimming: trim1<trim2.
Local coordinate system 'position' can be both right and left.
|
protected |
Constructor of a circle with default parameters.
A circle is created with center in the origin and zero radius.
MbArc3D::MbArc3D | ( | const MbCartPoint3D & | pc, |
const MbCartPoint3D & | p1, | ||
const MbCartPoint3D & | p2, | ||
int | initSense = 0 |
||
) |
Constructor of an ellipse, a circle or an elliptical or circular arc.
An arc centered in point 'pc' is created.
The first semiaxis is determines as the distance between points pc and p1. The second semiaxis is determined as the length of projection of the vector from pc to p2 onto the perpendicular to (p1 - pc). The start point of the arc lies on the ray starting from the circle center and passing through point 'p1'. The end point is on the ray from the center passing through the point 'p2'.
Parameter 'initSense' specifies completeness and the arc direction. If initSense == 0, then the complete ellipse or circle is constructed.
If initSense > 0, then the direction of moving is counterclockwise if seeing against the vector product (p1 - pc) and (p2 - pc).
If initSense < 0, , then the direction of moving is counterclockwise if seeing against the vector product (p1 - pc) and(p2 - pc).
[in] | pc | - Center of the ellipse or the circle. |
[in] | p1 | - A point determining the beginning of the curve and the first semiaxis. |
[in] | p2 | - A point determining the end of the curve and the second semiaxis. |
[in] | initSense | - Determines the completeness and the direction. initSense == 0 - closed curve initSense > 0 - moving counterclockwise, initSense < 0 - clockwise. |
MbArc3D::MbArc3D | ( | const MbCartPoint3D & | p0, |
const MbCartPoint3D & | p1, | ||
const MbCartPoint3D & | p2, | ||
int | n, | ||
bool | closed | ||
) |
Constructor of a circle or a circular arc.
Constructor of a circle or a circular arc by one of two methods.
[in] | p0 | - Center (n == 0) or starting point (n != 0). |
[in] | p1 | - Starting point (n == 0) or point the circle passes through (n == 1). |
[in] | p2 | - A point determining the end of the curve and the second semiaxis. |
[in] | n | - The parameter defines the method of arc construction. If n == 0, then a circle or a circular arc have the center in point p0. If n == 1, then a circle or an arc passes through the specified three points. If |n| == 2 & closed == false, then an arc passes through p0 and p2 but not p1. |
[in] | closed | - Specifies a circle (true) or an arc (false). |
MbArc3D::MbArc3D | ( | const MbCartPoint3D & | pc, |
const MbCartPoint3D & | p1, | ||
const MbCartPoint3D & | p2, | ||
const MbVector3D & | aZ, | ||
int | initSense | ||
) |
Constructor of a circle or a circular arc.
A circular arc is created with a center in point 'pc'. Points 'p1' and 'p2' specify the bounds of arc. The start point of the arc lies on point 'p1'. The end point is on the ray passing through the point 'p2'. Parameter 'initSense' specifies the arc direction.
[in] | pc | - Center of circle. |
[in] | p1 | - A point specifying the beginning of the arc. |
[in] | p2 | - A point specifying the end of the arc. |
[in] | aZ | - A direction of axis Z local coordinate system of the arc. |
[in] | initSense | - Arc direction. If initSense > 0, then the orientation is counterclockwise if you look towards the vector aZ. If initSense < 0, then the orientation is clockwise if you look towards the vector aZ. If initSense = 0, then the circle is building. |
MbArc3D::MbArc3D | ( | const MbCartPoint3D & | p0, |
const MbVector3D & | vZ, | ||
const MbVector3D & | vX, | ||
double | aa, | ||
double | bb, | ||
double | angle | ||
) |
Constructor of an elliptical arc.
An elliptical arc is created with the given semiaxes and the local coordinate system. 'angle' determines the arc angle. The angle is measured from the OX axis counterclockwise. The angle is given in radians.
[in] | p0 | - The ellipse local coordinate system center. |
[in] | vZ | - Z-axis of the local coordinate system of the ellipse. |
[in] | vX | - X-axis of the local coordinate system of the ellipse. |
[in] | aa | - Radius of semiaxis along X. |
[in] | bb | - Radius of semiaxis along Y. |
[in] | angle | - An angle specifying the end of the arc. |
MbArc3D::MbArc3D | ( | const MbCartPoint3D & | p1, |
const MbCartPoint3D & | p2, | ||
double | a_4, | ||
MbVector3D & | vZ | ||
) |
Constructor of a circular arc.
An arc is created with ends at the given points. A circle radius is defined by the given tangent of 1/4 of arc opening angle.
[in] | p1 | - Beginning of the arc. |
[in] | p2 | - End of the arc. |
[in] | a4 | - Tangent of 1/4 of the arc opening angle. |
[in] | vZ | - Axis of the arc. |
MbArc3D::MbArc3D | ( | const MbCartPoint3D & | p1, |
const MbCartPoint3D & | p2, | ||
const MbVector3D & | dirInPoint, | ||
bool | insecond | ||
) |
Constructor of a circle by two points and direction to the center from one of them.
A circle is created by two points and direction at one of them.
[in] | p1 | - The starting point. |
[in] | p2 | - The end point. |
[in] | dirInPoint | - Direction at one of points (p1 or p2) to the center of the circle. |
[in] | insecond | - Direction from the first point (insecond == true) to the circle center. |
MbArc3D::MbArc3D | ( | const MbPlacement3D & | place, |
double | aa, | ||
double | bb, | ||
double | angle | ||
) |
Constructor of an elliptical arc.
An elliptical arc is created with the given semiaxes and the local coordinate system. 'angle' determines the arc angle. The angle is measured from the OX axis counterclockwise. The angle is given in radians.
[in] | place | - The local coordinate system of the ellipse. |
[in] | aa | - Radius of semiaxis along X. |
[in] | bb | - Radius of semiaxis along Y. |
[in] | angle | - An angle specifying the end of the arc. |
MbArc3D::MbArc3D | ( | const MbArc3D & | init, |
double | t1, | ||
double | t2, | ||
int | initSense, | ||
const MbDimAccuracy & | xyzEps = MbDimAccuracy::threeDimAcc |
||
) |
Constructor of an elliptical arc.
An elliptical arc is constructed with the local coordinate system and semiaxes of the given ellipse. t1 and t2 specify the start and the end angles of the arc. The angles are measured from the OX axis counterclockwise. The angles are given in radians. Parameter 'initSense' specifies the arc direction. If initSense > 0, then the direction of moving is counterclockwise.
[in] | init | - A pattern ellipse. |
[in] | t1 | - An angle specifying the beginning of the arc. |
[in] | t2 | - An angle specifying the end of the arc. |
[in] | initSense | - Direction. initSense > 0 - moving counterclockwise, clockwise < 0 - clockwise. 'initSense' can't be equal to zero. |
[in] | xyzEps | - Three-dimensional accuracy. |
MbArc3D::MbArc3D | ( | const MbArc3D & | init, |
MbCartPoint3D | p1, | ||
MbCartPoint3D | p2, | ||
int | initSense | ||
) |
Constructor of an elliptical arc.
An elliptical arc is constructed with the local coordinate system and semiaxes of the given ellipse. Projections of p1 and p2 onto 'init' determines the starting and the end angles of the arc. Parameter 'initSense' specifies the arc direction. If initSense > 0, then the direction of moving is counterclockwise.
[in] | init | - A pattern ellipse. |
[in] | p1 | - A point specifying the beginning of the arc. |
[in] | p2 | - A point specifying the end of the arc. |
[in] | initSense | - Direction. initSense > 0 - moving counterclockwise, clockwise < 0 - clockwise. 'initSense' can't be equal to zero. |
MbArc3D::MbArc3D | ( | const MbArc & | ellipse, |
const MbPlacement3D & | place | ||
) |
Constructor by a local system and two-dimensional elliptical arc.
Constructor by a local coordinate system and two-dimensional elliptical arc.
[in] | ellipse | - Two-dimensional elliptical arc. |
[in] | place | - A local coordinate system. |
|
static |
Create ellipse, a circle or an elliptical or circular arc.
An arc centered in point 'pc' is created.
The first semiaxis is determines as the distance between points pc and p1. The second semiaxis is determined as the length of projection of the vector from pc to p2 onto the perpendicular to (p1 - pc). The start point of the arc lies on the ray starting from the circle center and passing through point 'p1'. The end point is on the ray from the center passing through the point 'p2'.
Parameter 'initSense' specifies completeness and the arc direction. If initSense == 0, then the complete ellipse or circle is constructed.
If initSense > 0, then the direction of moving is counterclockwise if seeing against the vector product (p1 - pc) and (p2 - pc).
If initSense < 0, , then the direction of moving is counterclockwise if seeing against the vector product (p1 - pc) and(p2 - pc).
[in] | pc | - Center of the ellipse or the circle. |
[in] | p1 | - A point determining the beginning of the curve and the first semiaxis. |
[in] | p2 | - A point determining the end of the curve and the second semiaxis. |
[in] | initSense | - Determines the completeness and the direction. initSense == 0 - closed curve initSense > 0 - moving counterclockwise, initSense < 0 - clockwise. |
|
static |
Create circle or a circular arc.
Constructor of a circle or a circular arc by one of two methods.
[in] | p0 | - Center (n == 0) or starting point (n != 0). |
[in] | p1 | - Starting point (n == 0) or point the circle passes through (n == 1). |
[in] | p2 | - A point determining the end of the curve and the second semiaxis. |
[in] | n | - The parameter defines the method of arc construction. If n == 0, then a circle or a circular arc have the center in point p0. If n == 1, then a circle or an arc passes through the specified three points. If |n| == 2 & closed == false, then an arc passes through p0 and p2 but not p1. |
[in] | closed | - Specifies a circle (true) or an arc (false). |
|
static |
Create circle or a circular arc.
A circular arc is created with a center in point 'pc'. Points 'p1' and 'p2' specify the bounds of arc. The start point of the arc lies on point 'p1'. The end point is on the ray passing through the point 'p2'. Parameter 'initSense' specifies the arc direction.
[in] | pc | - Center of circle. |
[in] | p1 | - A point specifying the beginning of the arc. |
[in] | p2 | - A point specifying the end of the arc. |
[in] | aZ | - A direction of axis Z local coordinate system of the arc. |
[in] | initSense | - Arc direction. If initSense > 0, then the orientation is counterclockwise if you look towards the vector aZ. If initSense < 0, then the orientation is clockwise if you look towards the vector aZ. If initSense = 0, then the circle is building. |
|
static |
Create elliptical arc.
An elliptical arc is created with the given semiaxes and the local coordinate system. 'angle' determines the arc angle. The angle is measured from the OX axis counterclockwise. The angle is given in radians.
[in] | p0 | - The ellipse local coordinate system center. |
[in] | vZ | - Z-axis of the local coordinate system of the ellipse. |
[in] | vX | - X-axis of the local coordinate system of the ellipse. |
[in] | aa | - Radius of semiaxis along X. |
[in] | bb | - Radius of semiaxis along Y. |
[in] | angle | - An angle specifying the end of the arc. |
|
static |
Create circular arc.
An arc is created with ends at the given points. A circle radius is defined by the given tangent of 1/4 of arc opening angle.
[in] | p1 | - Beginning of the arc. |
[in] | p2 | - End of the arc. |
[in] | a4 | - Tangent of 1/4 of the arc opening angle. |
[in] | vZ | - Axis of the arc. |
|
static |
Create circle by two points and direction to the center from one of them.
A circle is created by two points and direction at one of them.
[in] | p1 | - The starting point. |
[in] | p2 | - The end point. |
[in] | dirInPoint | - Direction at one of points (p1 or p2) to the center of the circle. |
[in] | insecond | - Direction from the first point (insecond == true) to the circle center. |
|
overridevirtual |
Create a copy of the object.
Create a copy of an object using the registrator. Registrator is used to prevent multiple copy of the object. If the object contains references to the other objects, then nested objects are copied as well. It is allowed not to pass registrator into the function. Then new copy of object will be created. While copying of single object or set of not connected objects, it is allowed not to use registrator. Registrator should be used if it is required to copy several connected objects. It is possible, that objects connection is based on the references to common objects. Then, while copying without using of registrator, it is possible to obtain set of copies, that contain references to the different copies of the same nested object, that leads to loss of connection between copies.
[in] | iReg | - Registrator. |
Implements MbSpaceItem.
|
overridevirtual |
Convert the object according to the matrix.
Convert the original object according to the matrix using the registrator. If object contains references to the other geometric objects, then nested objects are transformed according to the matrix. Registrator is needed to prevent multiple object copying. It is allowed to use function without registrator, if it is needed to transform single object. If it is needed to transform a set of connected objects, then one should use registrator to prevent repeating transformation of nested objects, because of the possible situation when several objects contain references to the same common objects, that require to be transformed.
[in] | matr | - Transformation matrix. |
[in] | iReg | - Registrator. |
Implements MbSpaceItem.
|
overridevirtual |
Move an object along a vector.
Move an object along a geometric vector using the registrator. If object contains references to the other geometric objects then the move operation is applied to the nested objects. Registrator is needed to prevent multiple copying of the object. It is allowed to use function without registrator, if it is needed to transform a single object. If it is needed to transform a set of connected objects, then one should use registrator to prevent repeating transformation of nested objects, because of the possible situation when several objects contain references to the same common objects, that require to be moved.
[in] | to | - Shift vector. |
[in] | iReg | - Registrator. |
Implements MbSpaceItem.
|
overridevirtual |
Rotate an object around an axis at a given angle.
Rotate an object around an axis at a given angle with the registrator. If object contains references to the other geometric objects then the rotation operation is applied to the nested objects. Registrator is needed to prevent multiple copying of the object. It is allowed to use function without registrator, if it is needed to transform a single object. If it is needed to transform a set of connected objects, then one should use registrator to prevent repeating transformation of nested objects, because of the possible situation when several objects contain references to the same common objects, that require to be rotated.
[in] | axis | - The axis of rotation. |
[in] | angle | - Rotation. |
[in] | iReg | - Registrator. |
Implements MbSpaceItem.
|
overridevirtual |
Determine whether an object is equal.
Still considered objects of the same type, all data is the same (equal).
[in] | item | - The object to compare. |
[in] | accuracy | - The accuracy to compare. |
Implements MbSpaceItem.
|
overridevirtual |
Make objects equal if they are similar.
You can still make only a similar objects.
[in] | item | - The object to initialize. |
Implements MbSpaceItem.
|
overridevirtual |
Determine the distance to the point.
Determine the distance to the point.
[in] | point | - Point. |
Implements MbSpaceItem.
|
overridevirtual |
Outstanding properties of the object.
Issue internal data (properties) of the object for viewing and modification.
[in] | properties | - Container for the internal data of the object. |
Implements MbSpaceItem.
|
overridevirtual |
Change the properties of an object.
Changing the internal data (properties) of the object you are copying the corresponding values from the sent object.
[in] | properties | - Container for the internal data of the object. |
Implements MbSpaceItem.
|
overridevirtual |
Define whether the curve is periodic.
Define whether the curve is periodic.
A periodic curve is closed. A curve is considered as periodic if:
Implements MbCurve3D.
|
overridevirtual |
Calculate a point on the curve.
Correct parameter when getting out of domain bounds and calculate a point on the curve.
[in] | t | - Curve parameter. |
[out] | p | - A point on the curve. |
Implements MbCurve3D.
|
overridevirtual |
Calculate point at curve and its extension.
Calculate a point on the curve including the outside area determination parameter.
[in] | t | - Curve parameter. |
[out] | p | - A point on the curve. |
Reimplemented from MbCurve3D.
|
overridevirtual |
Calculate point and derivatives of object for given parameter.
Values of point and derivatives are calculated on parameter area and on extended curve.
[in] | t | - Parameter. |
[in] | ext | - On parameters area (false), on extended curve (true). |
[out] | pnt | - Point. |
[out] | fir | - Derivative with respect to t. |
[out] | sec | - Second derivative with respect to t, if not nullptr. |
[out] | thir | - Third derivative with respect to t, if not nullptr. |
Reimplemented from MbCurve3D.
|
overridevirtual |
Calculate parameter step.
Calculate parameter step for the curve's approximation by its sag value. Calculation of the step is performed with consideration of curvature radius. A step of curve's approximation is chosen in such way, that the deviation from its polygon does not exceed the given value of sag.
[in] | t | - A parameter defining the point on a curve, at which a step should be calculated. |
[in] | sag | - Maximum feasible sag value. |
Reimplemented from MbCurve3D.
|
overridevirtual |
Calculate parameter step.
Calculate parameter step for the curve's approximation by the deviation angle of the tangent vector. A step of curve's approximation is chosen in such way, that angular deviation of the tangent curve at the next point does not exceed the given value ang.
[in] | t | - A parameter defining the point on a curve, at which a step should be calculated. |
[in] | ang | - The maximum feasible deviation angle of tangent. |
Reimplemented from MbCurve3D.
|
overridevirtual |
Calculate parameter step.
Calculate the parameter step for approximation of a curve by the given metric length of a step along a curve.
[in] | t | - A parameter defining the point on a curve, at which a step should be calculated. |
[in] | len | - Maximum metric length of a step along a curve. |
Reimplemented from MbCurve3D.
|
overridevirtual |
Find the point projection to the curve.
Find the nearest projection of a point on a curve (in the range of the curve) or on its continuation by the given initial approximation. If the parameter ext = true, then also search for a projection on the continuation of the curve. If the range of change of the 'tRange' parameter is specified, then find the projection in the specified range. A range of parameter may not belong to the domain of a curve. The Newton method is used.
[in] | pnt | - A given point. |
[in,out] | t | - Input - initial approximation, output - parameter of a curve corresponding to the nearest projection. |
[in] | ext | - A flag defining whether to seek projection on the extension of the curve. |
[in] | tRange | - A range of parameter changing in which the solution should be found. |
Reimplemented from MbCurve3D.
|
overridevirtual |
Construct a NURBS copy of a curve.
Constructs a NURBS curve which approximates a given curve inside the range [t1, t2]. with a given direction. If it is possible, constructs the accurate curve, perhaps with multiple knots. The number of knots for NURBS is defined depending on the curve.
[in] | t1 | - Parameter corresponding to start of approximated part of a curve. |
[in] | t2 | - Parameter corresponding to end of approximated part of a curve. |
[in] | sense | - Does the direction of parameter increasing along the NURBS curve coincide with direction of the initial curve. 'sense' > 0 - direction coincide. |
[in] | nInfo | - Parameters of conversion of a curve to NURBS. |
Reimplemented from MbCurve3D.
|
overridevirtual |
Construct a NURBS copy of a curve.
Constructs a NURBS curve which approximates a given curve with the given parameters. In parameters the degree and the number of knots of a spline and the range of curve's parameters changing may be set. If the flag of accurate approximation is not set in parameters then NURBS without multiple knots is constructed.
[in] | tParameters | - Parameters for the construction of a NURBS copy of the curve. |
Reimplemented from MbCurve3D.
|
overridevirtual |
Construct a trimmed curve with the given two-dimensional accuracy.
Constructs a trimmed curve, a start point of which corresponds to a point with parameter t1 and an end point corresponds to a point with parameter t2. Direction of the constructed curve relative to the initial curve may be changed by the parameter 'sense'. If the curve is closed, then there may be obtained a trimmed curve, passing through the start of a curve.
In a case of closed or periodic curve three parameters 'sense', t1 and t2 clearly define the result. In a case of unclosed curve the parameter 'sense' and parameter of trimming should correspond each other:
1) if sense == 1, then t1 < t2,
2) if sense == -1, then t1 > t2,
If there is a discrepancy between 'sense' and parameters of trimming, then 'sense' parameter has higher priority. If parameters t1 and t2 are equal and the curve is closed, then in result a closed curve should be obtained.
[in] | t1 | - Parameter corresponding to start of a trimmed curve. |
[in] | t2 | - Parameter corresponding to end of a trimmed curve. |
[in] | sense | - Direction of a trimmed curve in relation to an initial curve. sense = 1 - direction does not change. sense = -1 - direction changes to the opposite value. |
[in] | xyzEps | - Three-dimensional accuracy. |
[in] | saveParLenAndLaw | - Save parametric length and law. |
Reimplemented from MbCurve3D.
|
overridevirtual |
Calculate the metric length of a curve.
The length of a curve is inaccurately calculated, by approximation of polyline. If the more accurate curve's length is required, then use the function CalculateMetricLength().
Reimplemented from MbCurve3D.
|
overridevirtual |
Translate parameter along the curve.
Translate parameter along the curve by the given distance at the given direction. The new value of parameter is saved in the variable t. If the curve is not closed and the length of its part from the point with parameter t to the end at the given direction is less than the required shift, then calculations are performed on extension of the curve, if it possible to construct such extension.
[in,out] | t | - Input - the initial value of parameter. Output - the new value of parameter. |
[in] | len | - The value of shift along the curve. |
[in] | curveDir | - The offset direction. If curveDir is non-negative, then the shift is directed to the side of increasing of parameter. Otherwise - to the side of decreasing of parameter. |
[in] | eps | - Computational tolerance. |
Reimplemented from MbCurve3D.
|
overridevirtual |
Construct a planar projection of a piece of a space curve.
Construct a planar projection of a piece of a space curve.
[in] | into | - The transformation matrix from the global coordinate system into a plane of view. |
[in] | pRegion | - A mapped piece of a curve (paramRegion.x = t1, paramRegion.y = t2), by default - the whole curve.. |
[in] | version | - Version, last by default. |
[in,out] | coincParams | - A flag of coincidence between parameterization of initial curve and its projection if coincParams != nullptr then the function tries to create a projection with coincident parameterization if *coincParams = true then parameterization of projection coincides with parameterization of initial curve. |
Reimplemented from MbCurve3D.
|
overridevirtual |
Construct a planar projection of a piece of a space curve.
Construct a planar projection of a piece of a space curve for the perspective visualization.
[in] | into | - The transformation matrix from the global coordinate system into a plane of view. |
[in] | zNear | - The parameter of the perspective visualization which is equal to the distance between the observation point and the plane of view (negative). |
[in] | pRegion | - A mapped piece of a curve (paramRegion.x = t1, paramRegion.y = t2), by default - the whole curve.. |
Reimplemented from MbCurve3D.
|
overridevirtual |
Get the physical radius of the curve or zero if it impossible.
Generally returns 0. A non-zero value may be obtained only when the curve is an arc or is equal to an arc with the set precision (METRIC_REGION by default). \params[in] accuracy - The maximum curve deviation from an arc (METRIC_REGION by default).
Reimplemented from MbCurve3D.
|
overridevirtual |
Get an axis of a circle which is geometrically coincident to the given curve.
Get an axis of a circle which is geometrically coincident to the given curve.
[out] | axis | - An axis with the origin at circle's center and direction along the normal of circle's plane. |
Reimplemented from MbCurve3D.
|
overridevirtual |
Get planar curve and placement if the space curve is planar.
Get planar curve and placement if the space curve is planar (after the using call DeleteItem for two-dimensional curves).
[out] | curve2d | - The resulting flat curve. |
[out] | place | - The coordinate system of the resulting 2D curve. |
[in] | saveParams | - The parameter specifying the preservation of the correspondence of the parameterization for the two-dimensional curve. If true - parameterization of curve2d curve must match the parameterization of the original curve this. If false - curve parameterizations may not correspond. The curve2d is more likely to be detected than with the true flag. |
[in] | params | - Validation parameters. |
Reimplemented from MbCurve3D.
Expand sent bounding box (a.k.a. gabarit), so that it included the object.
Expand sent bounding box, so that it included the object.
[in,out] | cube | - The bounding box to expand. |
Implements MbSpaceItem.
|
overridevirtual |
To compute bounding box in a local coordinate system.
To obtain bounding box of object with regar to a local coordinate system, sent box is made to be empty. Then it is computed bounding box of object in a local coordinate system \ and it is stored in box 'cube'
[in] | into | - Transformation matrix from object's current coordinate system to a local coordinate system |
[in,out] | cube | - Information on bounding box |
Implements MbSpaceItem.
|
overridevirtual |
Extend the curve.
Extend the curve according to the given parameters.
[in] | parameters | - Parameters of extension. |
[out] | resCurve | - The extended curve or nullptr if extension is impossible. |
Reimplemented from MbCurve3D.
virtual MbCurve3D* MbCurve3D::Trimmed |
Construct a trimmed curve.
Constructs a trimmed curve, a start point of which corresponds to a point with parameter t1 and an end point corresponds to a point with parameter t2. Direction of the constructed curve relative to the initial curve may be changed by the parameter 'sense'. If the curve is closed, then there may be obtained a trimmed curve, passing through the start of a curve.
In a case of closed or periodic curve three parameters 'sense', t1 and t2 clearly define the result. In a case of unclosed curve the parameter 'sense' and parameter of trimming should correspond each other:
1) if sense == 1, then t1 < t2,
2) if sense == -1, then t1 > t2,
If there is a discrepancy between 'sense' and parameters of trimming, then 'sense' parameter has higher priority. If parameters t1 and t2 are equal and the curve is closed, then in result a closed curve should be obtained.
[in] | t1 | - Parameter corresponding to start of a trimmed curve. |
[in] | t2 | - Parameter corresponding to end of a trimmed curve. |
[in] | sense | - Direction of a trimmed curve in relation to an initial curve. sense = 1 - direction does not change. sense = -1 - direction changes to the opposite value. |
[in] | saveParLenAndLaw | - Save parametric length and law. |
virtual MbCurve3D* MbCurve3D::Trimmed |
Construct a trimmed curve with the given two-dimensional accuracy.
Constructs a trimmed curve, a start point of which corresponds to a point with parameter t1 and an end point corresponds to a point with parameter t2. Direction of the constructed curve relative to the initial curve may be changed by the parameter 'sense'. If the curve is closed, then there may be obtained a trimmed curve, passing through the start of a curve.
In a case of closed or periodic curve three parameters 'sense', t1 and t2 clearly define the result. In a case of unclosed curve the parameter 'sense' and parameter of trimming should correspond each other:
1) if sense == 1, then t1 < t2,
2) if sense == -1, then t1 > t2,
If there is a discrepancy between 'sense' and parameters of trimming, then 'sense' parameter has higher priority. If parameters t1 and t2 are equal and the curve is closed, then in result a closed curve should be obtained.
[in] | t1 | - Parameter corresponding to start of a trimmed curve. |
[in] | t2 | - Parameter corresponding to end of a trimmed curve. |
[in] | sense | - Direction of a trimmed curve in relation to an initial curve. sense = 1 - direction does not change. sense = -1 - direction changes to the opposite value. |
[in] | xyzEps | - Three-dimensional accuracy. |
[in] | saveParLenAndLaw | - Save parametric length and law. |