C3D Toolkit  Kernel - 117982, Vision - 2.9.2.2
action_curve.h File Reference

Functions for two-dimensional curves construction. More...

#include <templ_s_array.h>
#include <mb_cart_point.h>
#include <plane_item.h>
#include <mb_operation_result.h>
#include <vector>

Enumerations

enum  MbeArcCreateWay {
  acw_CircleByCenterAndRadius , acw_ArcByCenterAnd2Points , acw_ArcByCenterAnd2Angles , acw_ArcBy3Points ,
  acw_EllipseByCenterAndSemiaxis , acw_EllipseByCenterAnd3Points , acw_EArcByCenterAnd2Points
}
 Enumeration of ways to create an ellipse (circle) or their arcs in two-dimensional space. More...
 

Functions

MbResultType Line (const MbCartPoint &point1, const MbCartPoint &point2, MbCurve *&result)
 Create a line. More...
 
MbResultType Segment (const MbCartPoint &point1, const MbCartPoint &point2, MbCurve *&result)
 Create a line segment. More...
 
MbResultType Arc (MbeArcCreateWay createWay, const MbCartPoint &center, const c3d::ParamPointsVector &points, double &a, double &b, double &c, bool option, MbCurve *&result)
 Create an ellipse (circle) or an elliptical (circular) arc in the specified way. More...
 
MbResultType SplineCurve (const SArray< MbCartPoint > &pointList, bool curveClosed, MbePlaneType curveType, MbCurve *&result)
 Create a curve passing through a set of points. More...
 
MbResultType NurbsCurve (const SArray< MbCartPoint > &pointList, const SArray< double > &weightList, size_t degree, const SArray< double > &knotList, bool curveClosed, MbCurve *&result)
 Create a NURBS-curve. More...
 
double FittingCurve (const std::vector< MbCartPoint > &pointList, bool curveClosed, size_t degree, size_t mode, double &accuracy, MbCurve *&result)
 Create a Nurbs curve with sorting points by distance passing through a set of points. More...
 
MbResultType NurbsCopy (const MbCurve &curve, MbCurve *&result)
 Create a copy of a curve as a NURBS-curve. More...
 
MbResultType RegularPolygon (const MbCartPoint &centre, const MbCartPoint &point, size_t vertexCount, bool describe, MbCurve *&result)
 Create a regular polygon inscribed in a circle or circumscribed around a circle. More...
 
MbResultType Cosinusoid (const MbCartPoint &point0, const MbCartPoint &point1, const MbCartPoint &point2, double phase, double waveLength, MbCurve *&result)
 Create a cosine curve. More...
 
MbResultType Cosinusoid (const MbCartPoint &origin, double amplitude, double waveLength, double wavesCount, double phase, MbCurve *&result)
 Create a cosine curve. More...
 
MbResultType CreateContour (MbCurve &curve, MbContour *&result)
 Create a composite curve (contour). More...
 
MbCurveDuplicateCurve (const MbCurve &curve, VERSION version=Math::DefaultMathVersion())
 Create a copy of a curve. More...
 
MbContourDuplicateContour (const MbContour &cntr, bool modifySegments, VERSION version, MbSNameMaker *names=nullptr)
 Create a copy of a contour. More...
 
MbCurveOffsetCurve (const MbCurve &curve, double offset1, double offset2, MbeOffsetType type)
 Create an offset curve. More...
 
MbContourOffsetContour (const MbContour &cntr, double rad, double xEpsilon, double yEpsilon, bool modifySegments, VERSION version=Math::DefaultMathVersion())
 Create an offset contour. More...
 
MbContourAxisOffsetOpenContour (const MbContour &cntr, const MbCartPoint &q1, const MbCartPoint &q2, double rad, double xEpsilon, double yEpsilon, VERSION version)
 Create an offset contour with start and end points on the rotation axis. More...
 
bool CurveTrim (MbCurve &curve, double t1, double t2, double eps=METRIC_PRECISION)
 Initialize a curve with new parameters. More...
 
MbResultType AddCurveToContour (MbCurve &curve, MbContour &contour, bool toEnd, double epsilon=METRIC_REGION)
 Add a curve to a composite curve (a contour). More...
 
MbContourMakeContour (std::vector< MbCurve * > &curves, double accuracy, VERSION version=Math::DefaultMathVersion())
 Create a contour by curves. More...
 
void CurveSection (const MbCurve3D &curve, const MbPlacement3D &place, SArray< MbCartPoint > &result, RPArray< MbCurve > &resultCurve, VERSION version=Math::DefaultMathVersion())
 Calculate the intersections of a curve and a surface. More...
 
void SurfaceSection (const MbSurface &surface, const MbPlacement3D &place, RPArray< MbCurve > &result, VERSION version=Math::DefaultMathVersion())
 Calculate the intersections of a surface and a plane. More...
 
MbResultType FaceBoundSegment (const MbFace &face, size_t loopInd, size_t edgeInd, const MbSurface &surface, VERSION version, MbCurve *&result)
 Create a two-dimensional segment on a surface by projection of an oriented edge. More...
 
MbResultType SurfaceBoundContour (const MbSurface &surface, const MbCurve3D &spaceCurve, VERSION version, MbContour *&result)
 Create a two-dimension boundary of a surface by projection of a space curve. More...
 
bool ChangeFirstPoint (MbCurve *segment, const MbCartPoint &p)
 Correct the start point. More...
 
bool ChangeLastPoint (MbCurve *segment, const MbCartPoint &p)
 Correct the last point. More...
 
bool IsLikeStraightLine (const MbCurve &curve, double eps)
 Whether the curve is like straight-line regardless of its parameterization. More...
 
MbContourDeleteDegenerateSegments (const MbContour &cntr, bool modifySegments, VERSION verison, MbSNameMaker *names=nullptr)
 Delete degenerate segments from contour. More...
 
MbCurveSetProportionalParametrization (MbCurve *curve, double tMin, double tMax)
 Set curve parametrization proportional to the curve length. More...
 
MbResultType FitCurve (const MbCurveFitParameters &params, MbCurveFitResults &results)
 Fit the curve into point set. More...
 

Detailed Description

Functions for two-dimensional curves construction.

Two-dimensional curves can be constructed using analytical functions, for a point set or on the basis of other two-dimensional curves.