C3D Toolkit  Kernel - 117982, Vision - 2.9.2.2

Isocline curve or silhouette curve of surface. More...

#include <cur_silhouette_curve.h>

+ Inheritance diagram for MbSilhouetteCurve:
+ Collaboration diagram for MbSilhouetteCurve:

Public Member Functions

 MbSilhouetteCurve (const MbSurface &surf, const MbCurve &crv, MbeCurveBuildType _species, const MbMatrix3D &m, bool p)
 Constructor by surface, two-dimensional curve, type of curve, matrix and flag of perspective.
 
 MbSilhouetteCurve (const MbSurface &surf, const MbCurve &crv, MbeCurveBuildType _species, const MbVector3D &e, bool p, const MbAxis3D *axis=nullptr)
 Constructor by surface, two-dimensional curve, type of curve, vector of view and flag of perspective.
 
MbeSpaceType IsA () const override
 Get the type of the object.
 
MbSpaceItemDuplicate (MbRegDuplicate *=nullptr) const override
 Create a copy of the object. 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...
 
bool IsSimilar (const MbSpaceItem &) const override
 Determine whether an object is similar. 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...
 
void Refresh () override
 Translate all the time (mutable) data objects in an inconsistent (initial) state.
 
void GetProperties (MbProperties &) override
 Outstanding properties of the object. More...
 
void SetProperties (const MbProperties &) override
 Change the properties of an object. More...
 
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 _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 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...
 
void FastApproxExplore (double &t, MbCartPoint3D &pnt, MbVector3D &fir, MbVector3D *sec) const override
 Calculate point and derivatives on the curve. More...
 
double DeviationStep (double t, double angle) const override
 Calculate parameter step. More...
 
void CalculateGabarit (MbCube &) const override
 Calculate bounding box of a curve.
 
bool IsPlanar (double accuracy=METRIC_EPSILON) const override
 Is a curve planar?
 
bool GetPlacement (MbPlacement3D &place, PlanarCheckParams params=PlanarCheckParams()) const override
 Fill the placement if a curve is planar.
 
bool GetPlaneCurve (MbCurve *&curve2d, MbPlacement3D &place3d, bool saveParams, PlanarCheckParams params=PlanarCheckParams()) const override
 Get planar curve and placement if the space curve is planar. More...
 
bool GetSurfaceCurve (MbCurve *&curve2d, MbSurface *&surface, VERSION version=Math::DefaultMathVersion()) const override
 Get surface curve if the space curve is surface (after the using call DeleteItem for arguments)
 
MbCurve3DTrimmed (double t1, double t2, int sense, const MbDimAccuracy &xyzEps, bool saveParamLenAndLaw) const override
 Construct a trimmed curve with the given two-dimensional accuracy. More...
 
MbCurveGetMap (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...
 
double GetMetricLength () const override
 Calculate the metric length of a curve.
 
double GetLengthEvaluation () const override
 Calculate the metric length of a curve. More...
 
double GetParamToUnit () const override
 Get increment of parameter, corresponding to the unit length in space.
 
double GetParamToUnit (double t) const override
 Get increment of parameter, corresponding to the unit length in space.
 
void Inverse (MbRegTransform *iReg=nullptr) override
 Change direction of a curve.
 
MbeCurveBuildType GetBuildType () const override
 Get type of curve.
 
bool InsertPoint (double &t) override
 Insert point by parameter. More...
 
bool IsSimilarToCurve (const MbCurve3D &curve, double precision=METRIC_PRECISION) const override
 Whether the curves to union (joining) are similar.
 
bool IsExactSpaceCurve () const
 Determine whether the exact spatial representation of isocline curve exists.
 
const MbCurve3DGetExactSpaceCurve () const
 Get a pointer to the curve of exact spatial representation of isocline curve. (Can be absent).
 
const MbCurve3DGetApproxCurve () const
 Construct a new spatial copy of isocline curve.
 
void SetBuildType (MbeCurveBuildType spec)
 Set type of isocline curve.
 
void GetPointOn (double &t, MbCartPoint3D &) const
 Calculate a point.
 
void GetFirstDer (double &t, MbVector3D &) const
 Calculate the first derivative.
 
bool GetCurvePoint (double &t, MbCartPoint &cPoint) const override
 Get current point on a curve by a parameter.
 
virtual MbCurve3DTrimmed (double t1, double t2, int sense, bool saveParamLenAndLaw=false) const
 Construct a trimmed curve. More...
 
virtual MbCurve3DTrimmed (double t1, double t2, int sense, const MbDimAccuracy &xyzEps, bool saveParamLenAndLaw) const
 Construct a trimmed curve with the given two-dimensional accuracy. More...
 
- Public Member Functions inherited from MbSurfaceCurve
 MbSurfaceCurve (const MbSurface &, const MbCurve &, bool sameCurve, MbRegDuplicate *iReg=nullptr)
 Constructor of curve on surface.
 
 MbSurfaceCurve (const MbSurface &, const MbCartPoint &p0, const MbCartPoint &p1, MbePlaneType type=pt_Curve)
 Constructor of a line segment on surface.
 
 MbSurfaceCurve (const MbSurface &, ptrdiff_t pnt1, ptrdiff_t pnt2, MbePlaneType type=pt_Curve)
 Constructor of boundary curve of surface.
 
 VISITING_CLASS (MbSurfaceCurve)
 Implementation of a function initializing a visit of an object.
 
bool IsSameCurvePoints (const MbSurfaceCurve *scurve, double accuracy, bool sameSense) const
 Determine whether the 'curve' curve is a duplicate of the current curve.
 
void SurfaceNormal (double &t, MbVector3D &, bool ext=false) const
 Calculate surface normal.
 
void SurfaceNormal (double &t, MbVector3D &n, MbVector3D &fd, MbVector3D &sd, bool ext=false) const
 Calculation of the normal, first, and second derivative of the surface normal.
 
double SurfaceTransversalCurvature (double t, const MbVector3D &tau) const
 The surface curvature in the transverse direction to the vector tau.
 
void SurfaceParams (double &t, double &u, double &v, bool ext=false) const
 Get surface parameters by a parameter on the curve.
 
void CalculateUVLimits (MbRect &uvRect) const
 Calculate parametric bounding box of the curve.
 
void GetUPairs (double v, SArray< double > &u, SArray< double > &t) const
 Calculate U-pairs from V.
 
void GetVPairs (double u, SArray< double > &v, SArray< double > &t) const
 Calculate V-pairs from U.
 
MbCurve3DMakeCurve (double t1, double t2, VERSION version) const
 Construct a piece of a spatial curve copy.
 
MbCurve3DMakeCurve (VERSION version) const
 Construct a spatial curve copy.
 
MbCurve3DCreateCurve () const
 Construct the exact spatial curve copy.
 
MbCurve3DCreateUV () const
 Create a spatial curve by u, v lines.
 
void Transversal (double &t, MbVector3D &f) const
 Calculate the left perpendicular to a curve at level of surface.
 
bool IsCurveEqual (const MbSpaceItem &) const
 Determine whether the objects are similar.
 
bool SetCurveEqual (const MbSpaceItem &)
 Make curve equal.
 
const MbCurveGetCurve () const
 Get curve.
 
const MbSurfaceGetSurface () const
 Get surface.
 
MbCurveSetCurve ()
 Get curve.
 
MbSurfaceSetSurface ()
 Get surface.
 
bool ChangeCurve (const MbCurve &)
 Replace curve.
 
bool ChangeSurface (const MbSurface &)
 Replace surface.
 
bool ChangeSurfaceCurve (const MbSurfaceCurve &)
 Replace curve and surface.
 
bool SetLimitParam (double newTMin, double newTMax)
 Set range of parameter.
 
MbeSpaceType IsA () const override
 Get the type of the object.
 
MbeSpaceType Type () const override
 Get the group object type.
 
MbSpaceItemDuplicate (MbRegDuplicate *=nullptr) const override
 Create a copy of the object. More...
 
MbSurfaceCurveCurvesDuplicate () const
 Copy of curve with the same surface.
 
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...
 
bool IsSimilar (const MbSpaceItem &) const override
 Determine whether an object is similar. 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...
 
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.
 
void PrepareIntegralData (const bool forced) const override
 Calculate temporary (mutable) data of an object. More...
 
void GetProperties (MbProperties &) override
 Outstanding properties of the object. More...
 
void SetProperties (const MbProperties &) override
 Change the properties of an object. More...
 
void GetBasisItems (RPArray< MbSpaceItem > &) override
 Outstanding reference objects in a container sent.
 
void GetBasisPoints (MbControlData3D &) const override
 Get control points of object.
 
void SetBasisPoints (const MbControlData3D &) override
 Change the object by control points.
 
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...
 
double GetPeriod () const override
 Return period. If a curve is not periodic then 0.
 
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 _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 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...
 
MbNurbs3DNurbsCurve (const MbCurveIntoNurbsInfo &) const override
 Construct a NURBS copy of a curve. More...
 
MbCurve3DTrimmed (double t1, double t2, int sense, const MbDimAccuracy &xyzEps, bool saveParamLenAndLaw) const override
 Construct a trimmed curve with the given two-dimensional accuracy. More...
 
bool NearPointProjection (const MbCartPoint3D &, double &t, bool ext, MbRect1D *tRange=nullptr) const override
 Find the point projection to the curve. More...
 
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...
 
void SetTesselation (const MbContourOnSurface &contour, size_t indSegment)
 
double MetricStep (double t, double length) const override
 Calculate parameter step. More...
 
MbCurveGetMap (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...
 
MbCurveGetParticularMap (const MbMatrix3D &into, MbRect1D *pRgn, VERSION version) const
 Calculate planar projection of a curve in special cases.
 
bool IsStraight (bool ignoreParams=false) const override
 Whether the line is straight?
 
void ChangeCarrier (const MbSpaceItem &item, MbSpaceItem &init) override
 Change the carrier. For surface curves.
 
bool ChangeCarrierBorne (const MbSpaceItem &, MbSpaceItem &, const MbMatrix &matr) override
 Change the carrier. More...
 
bool IsPlanar (double accuracy=METRIC_EPSILON) const override
 Is a curve planar?
 
bool IsSmoothConnected (double angleEps) const override
 Are joints of contour/curve smooth?
 
void CalculateGabarit (MbCube &) const override
 Calculate bounding box of a curve.
 
double GetMetricLength () const override
 Calculate the metric length of a curve.
 
double GetLengthEvaluation () const override
 Calculate the metric length of a 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...
 
void GetCentre (MbCartPoint3D &c) const override
 Give the curve center.
 
void GetWeightCentre (MbCartPoint3D &wc) const override
 Give the gravity center of a curve.
 
double DistanceToPlace (const MbPlacement3D &place, double &t0, double &angle) const override
 The nearest point of a curve by the placement.
 
bool GetPlaneCurve (MbCurve *&curve2d, MbPlacement3D &place3d, bool saveParams, PlanarCheckParams params=PlanarCheckParams()) const override
 Get planar curve and placement if the space curve is planar. More...
 
bool GetSurfaceCurve (MbCurve *&curve2d, MbSurface *&surface, VERSION version=Math::DefaultMathVersion()) const override
 Get surface curve if the space curve is surface (after the using call DeleteItem for arguments)
 
bool GetPlacement (MbPlacement3D &place, PlanarCheckParams params=PlanarCheckParams()) const override
 Fill the placement if a curve is planar.
 
bool IsShift (const MbSpaceItem &, MbVector3D &, bool &isSame, double accuracy=LENGTH_EPSILON) const override
 Determine whether the object is a translation.
 
bool IsSimilarToCurve (const MbCurve3D &other, double precision=METRIC_PRECISION) const override
 Determine whether the curves for union (joining) are similar.
 
void GetPointsByEvenLengthDelta (size_t n, std::vector< MbCartPoint3D > &pnts) const override
 Get n points of a curve with equal intervals by arc length.
 
size_t GetCount () const override
 Define the number of splittings for one passage in operations.
 
void GetAnalyticalFunctionsBounds (std::vector< double > &params) const override
 Get the boundaries of the curve sections that are described by one analytical function.
 
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 first derivative at length. More...
 
void BreakPoints (std::vector< double > &vBreaks, double precision=ANGLE_REGION) const override
 \ ru Определение точек излома кривой. The determination of curve smoothness break points.
 
MbResultType Extend (const MbCurveExtensionParameters3D &parameters, c3d::SpaceCurveSPtr &resCurve) const override
 Extend the curve.
 
virtual MbCurve3DTrimmed (double t1, double t2, int sense, bool saveParamLenAndLaw=false) const
 Construct a trimmed curve. More...
 
virtual MbCurve3DTrimmed (double t1, double t2, int sense, const MbDimAccuracy &xyzEps, bool saveParamLenAndLaw) const
 Construct a trimmed curve with the given two-dimensional accuracy. More...
 
- Public Member Functions inherited from MbCurve3D
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 MbCurve3Doperator[] (size_t) const
 An access operator.
 
MbeSpaceType Type () const override
 Get the group object type.
 
MbeSpaceType Family () const override
 Get family of objects.
 
virtual MbCurve3DInverseDuplicate () 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 bool IsSpaceSame (const MbSpaceItem &item, double eps=METRIC_REGION) const
 Are the objects identical in space?
 
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 Normal (double &t, MbVector3D &) const
 Calculate main normal vector.
 
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 _Normal (double t, MbVector3D &) const
 Calculate main normal vector (normalized) at curve and its extension.
 
virtual void _BNormal (double t, MbVector3D &) const
 Calculate binormal vector (normalized) at curve and its extension.
 
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 MbCurve3DGetBasisCurve () const
 Returns the base curve if exists or itself.
 
virtual MbCurve3DSetBasisCurve ()
 Returns the base curve if exists or itself.
 
virtual double Curvature (double t) const
 Calculate curvature of curve.
 
virtual void ThirdMetricDer (double t, MbVector3D &vect) const
 Calculate second derivative of tangent.
 
MbNurbs3DNurbsCurve (const MbCurveIntoNurbsInfo *nInfo=nullptr) const
 Construct a NURBS copy of a curve. More...
 
virtual MbCurve3DNurbsCurve (const MbNurbsParameters &tParameters) 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 MbCurve3DTrimmed (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 CalculateMetricLength () const
 Calculate the metric length of a curve.
 
virtual double CalculateLength (double t1, double t2) const
 Calculate the metric length of a curve. More...
 
virtual bool DistanceAlong (double &t, double len, int curveDir, double eps=Math::metricPrecision, VERSION version=Math::DefaultMathVersion()) const
 Translate parameter along the 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.
 
MbPropertyCreateProperty (MbePrompt name) const override
 Create your own property with the name.
 
void CalculateMesh (const MbStepData &stepData, const MbFormNote &note, 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 MbCurveGetMapPsp (const MbMatrix3D &into, double zNear, MbRect1D *pRegion=nullptr) const
 Construct a planar projection of a piece of a space curve. More...
 
virtual MbCurveGetProjection (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.
 
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...
 
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...
 
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 MbCurve3DGetSubstrate () const
 Get a substrate or itself.
 
virtual MbCurve3DSetSubstrate ()
 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...
 
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.
 
- Public Member Functions inherited from MbSpaceItem
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.
 
void CalculateWire (const MbStepData &stepData, MbMesh &mesh) const
 
void CalculateWire (double sag, MbMesh &mesh) const
 
- 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.
 
- 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.
 

Protected Member Functions

 MbSilhouetteCurve (const MbSilhouetteCurve &, MbRegDuplicate *)
 Copy-constructor.
 
- Protected Member Functions inherited from MbSurfaceCurve
 MbSurfaceCurve (const MbSurfaceCurve &, MbRegDuplicate *)
 Copy-constructor.
 
 MbSurfaceCurve (const MbSurfaceCurve *)
 Copy-constructor of a curve with the same surface for CurvesDuplicate().
 
MbCurve3DTryProjection () const
 Try to create a spatial curve from a projection curve.
 
void Explorer (double &t, bool ext, MbCartPoint &cPnt, MbCartPoint3D &pnt) const
 Calculate a point on two-dimensional curve and on the curve.
 
void CheckClosed ()
 Check and set the curve closedness. More...
 
void CacheReset ()
 Delete caches. More...
 
- Protected Member Functions inherited from MbCurve3D
 MbCurve3D ()
 Default constructor.
 
 MbCurve3D (const MbCurve3D &other)
 Copy-constructor.
 
- Protected Member Functions inherited from MbSpaceItem
 MbSpaceItem ()
 Default constructor.
 
- Protected Member Functions inherited from MbRefItem
 MbRefItem ()
 Constructor without parameters.
 

Protected Attributes

MbeCurveBuildType species
 Curve type (exact completely or in separate points only).
 
bool perspective
 Perspective or parallel projection.
 
MbVector3D eye
 Vector of view (for parallel projection) or radius-vector of point of view (for perspective projection).
 
MbAxis3Dlathe
 The axis for rotate projection.
 
MbCurve3DapproxCurve
 The spatial representation of isocline curve.
 
bool approxExact
 Is exact approxCurven.
 
- Protected Attributes inherited from MbSurfaceCurve
MbCurvecurve
 Planar curve in uv-space (always not nullptr).
 
MbSurfacesurface
 Pointer to the surface (always not nullptr).
 
bool closed
 An attribute of closedness of surface of curve.
 
MbCube cube
 Auxiliary data. More...
 
atomic_double metricLength
 Metric length of the curve.
 
atomic_double lengthEvaluation
 Estimated length of the curve.
 
MbCartPoint3D weightCenter
 Center of mass of the curve.
 
atomic_double curveRadius
 The radius of the curve, if the curve is a spatial arc.
 
c3d::AtomicDoublePair radiusAccuracy
 The precisions for the calculation of curveRadius.
 
atomic_enum_type< ThreeStatesisStraight
 A straightness flag.
 
SPtr< MbCurveTessellationtessellation
 Curve tessellation.
 
- Protected Attributes inherited from MbCurve3D
SimpleName name
 A curve name. The object data is temporary and used internally.
 

Detailed Description

Isocline curve or silhouette curve of surface.

Lines separating the visible part of a surface from its invisible part are called silhouette lines. Silhouette lines can pass both by the surface boundary and inside it. In the last case silhouette lines are called isocline curves. The normal of a surface changes the direction relative to the line of sight while moving through isocline curve.
The line passing through a point of a surface and the observation point is called the line of sight. The normal of surface is orthogonal to the line of sight at points of isocline curve. Generally there can be several isocline curves of surface.
If parameter 'species' is equal to cbt_Ordinary, then the curve is exact.
If parameter 'species' is equal to cbt_Specific, then the curve is constructed by an ordered set of two-dimensional points in parametric space of surface. This set of points is represented as spline on surface. Spline coincides with the silhouette line at values of parameter corresponding to support points, it passes near the silhouette line at other values of parameter. For any parameter of a spline the points of silhouette line are calculated with enough tolerance from solution of system of equations for silhouette line of surface.
Each isocline curve is either closed or terminates at surface boundaries. For the different directions of view there is a set of isocline curves, therefore the isocline curves need to be rebuilt at surface rotation.
Isocline curve is used for construction of surface projection.
The surfaces having curvature along at least one parameter can have the isocline curve.

Member Function Documentation

◆ Duplicate()

MbSpaceItem& MbSilhouetteCurve::Duplicate ( MbRegDuplicate iReg = nullptr) const
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.

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

Implements MbSpaceItem.

◆ IsSame()

bool MbSilhouetteCurve::IsSame ( const MbSpaceItem other,
double  accuracy = LENGTH_EPSILON 
) const
overridevirtual

Determine whether an object is equal.

Still considered objects of the same type, all data is the same (equal).

Parameters
[in]item- The object to compare.
[in]accuracy- The accuracy to compare.
Returns
Whether the objects are equal.

Implements MbSpaceItem.

◆ SetEqual()

bool MbSilhouetteCurve::SetEqual ( const MbSpaceItem item)
overridevirtual

Make objects equal if they are similar.

You can still make only a similar objects.

Parameters
[in]item- The object to initialize.
Returns
Object is changed.

Implements MbSpaceItem.

◆ IsSimilar()

bool MbSilhouetteCurve::IsSimilar ( const MbSpaceItem item) const
overridevirtual

Determine whether an object is similar.

Such are considered the same objects whose data are similar.

Parameters
[in]item- The object to compare.
Returns
Whether the objects are similar.

Reimplemented from MbSpaceItem.

◆ Transform()

void MbSilhouetteCurve::Transform ( const MbMatrix3D matr,
MbRegTransform iReg = nullptr 
)
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.

Parameters
[in]matr- Transformation matrix.
[in]iReg- Registrator.

Implements MbSpaceItem.

◆ Move()

void MbSilhouetteCurve::Move ( const MbVector3D to,
MbRegTransform iReg = nullptr 
)
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.

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

Implements MbSpaceItem.

◆ Rotate()

void MbSilhouetteCurve::Rotate ( const MbAxis3D axis,
double  angle,
MbRegTransform iReg = nullptr 
)
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.

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

Implements MbSpaceItem.

◆ GetProperties()

void MbSilhouetteCurve::GetProperties ( MbProperties properties)
overridevirtual

Outstanding properties of the object.

Issue internal data (properties) of the object for viewing and modification.

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

Implements MbSpaceItem.

◆ SetProperties()

void MbSilhouetteCurve::SetProperties ( const MbProperties properties)
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.

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

Implements MbSpaceItem.

◆ PointOn()

void MbSilhouetteCurve::PointOn ( double &  t,
MbCartPoint3D p 
) const
overridevirtual

Calculate a point on the curve.

Correct parameter when getting out of domain bounds and calculate a point on the curve.

Parameters
[in]t- Curve parameter.
[out]p- A point on the curve.

Implements MbCurve3D.

◆ _PointOn()

void MbSilhouetteCurve::_PointOn ( double  t,
MbCartPoint3D p 
) const
overridevirtual

Calculate point at curve and its extension.

Calculate a point on the curve including the outside area determination parameter.

Parameters
[in]t- Curve parameter.
[out]p- A point on the curve.

Reimplemented from MbCurve3D.

◆ Explore()

void MbSilhouetteCurve::Explore ( double &  t,
bool  ext,
MbCartPoint3D pnt,
MbVector3D fir,
MbVector3D sec,
MbVector3D thir 
) const
overridevirtual

Calculate point and derivatives of object for given parameter.

Values of point and derivatives are calculated on parameter area and on extended curve.

Parameters
[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.

◆ FastApproxExplore()

void MbSilhouetteCurve::FastApproxExplore ( double &  t,
MbCartPoint3D pnt,
MbVector3D fir,
MbVector3D sec 
) const
overridevirtual

Calculate point and derivatives on the curve.

The function is overloaded in MbSurfaceIntersectionCurve and MbSilhouetteCurve for the fast approximated calculation of a point and derivatives. In other surfaces it is equivalent to the function Explore(t,false,pnt,fir,sec,nullptr).

Parameters
[in]t- Parameter.
[out]pnt- A calculated point.
[out]fir- Derivative with respect to t.
[out]sec- Second derivative with respect to t, if not nullptr.

Reimplemented from MbCurve3D.

◆ DeviationStep()

double MbSilhouetteCurve::DeviationStep ( double  t,
double  ang 
) const
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.

Parameters
[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.
Returns
A sag value by parameter at given point.

Reimplemented from MbCurve3D.

◆ GetPlaneCurve()

bool MbSilhouetteCurve::GetPlaneCurve ( MbCurve *&  curve2d,
MbPlacement3D place,
bool  saveParams,
PlanarCheckParams  params = PlanarCheckParams() 
) const
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).

Parameters
[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.
Returns
true if a flat curve was created.

Reimplemented from MbCurve3D.

◆ Trimmed() [1/3]

MbCurve3D* MbSilhouetteCurve::Trimmed ( double  t1,
double  t2,
int  sense,
const MbDimAccuracy xyzEps,
bool  saveParamLenAndLaw 
) const
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.

Parameters
[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.
Returns
A constructed trimmed curve.
Warning
Under development.

Reimplemented from MbCurve3D.

◆ GetMap()

MbCurve* MbSilhouetteCurve::GetMap ( const MbMatrix3D into,
MbRect1D pRegion = nullptr,
VERSION  version = Math::DefaultMathVersion(),
bool *  coincParams = nullptr 
) const
overridevirtual

Construct a planar projection of a piece of a space curve.

Construct a planar projection of a piece of a space curve.

Parameters
[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.
Returns
Two-dimensional projection of a curve

Reimplemented from MbCurve3D.

◆ GetLengthEvaluation()

double MbSilhouetteCurve::GetLengthEvaluation ( ) const
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.

◆ InsertPoint()

bool MbSilhouetteCurve::InsertPoint ( double &  t)
overridevirtual

Insert point by parameter.

Insert point by desirable parameter and get the actual parameter.

Parameters
[in]t- Parameter on the curve where it is necessary to insert a point.
Returns
Returns true if a point was inserted.

Reimplemented from MbSurfaceCurve.

◆ Trimmed() [2/3]

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.

Parameters
[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.
Returns
A constructed trimmed curve.

◆ Trimmed() [3/3]

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.

Parameters
[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.
Returns
A constructed trimmed curve.
Warning
Under development.

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