C3D Kernel  104598
Functions
Construction of Curves
Geometric Construction Methods
Collaboration diagram for Construction of Curves:

Functions

MbResultType Line (const MbCartPoint3D &point1, const MbCartPoint3D &point2, MbCurve3D *&result)
 Create a line.
MbResultType Segment (const MbCartPoint3D &point1, const MbCartPoint3D &point2, MbCurve3D *&result)
 Create a line segment.
MbResultType Arc (const MbCartPoint3D &centre, const SArray< MbCartPoint3D > &points, bool curveClosed, double angle, double &a, double &b, MbCurve3D *&result)
 Create an ellipse (circle) or an elliptical (circular) arc.
MbResultType SplineCurve (const SArray< MbCartPoint3D > &pointList, bool curveClosed, MbeSpaceType curveType, MbCurve3D *&result)
 Create a curve passing through a set of points.
MbResultType NurbsCurve (const SArray< MbCartPoint3D > &pointList, const SArray< double > &weightList, size_t degree, const SArray< double > &knotList, bool curveClosed, MbCurve3D *&result)
 Create a NURBS-curve.
MbResultType NurbsCopy (const MbCurve3D &curve, MbCurve3D *&result)
 Create a copy of a curve as a NURBS-curve.
MbResultType RegularPolygon (const MbCartPoint3D &centre, const MbCartPoint3D &point, const MbVector3D &axisZ, size_t vertexCount, bool describe, MbCurve3D *&result)
 Create a regular polygon inscribed in a circle.
MbResultType SpiralCurve (const MbPlacement3D &place, double radius, double step, MbCurve &lawCurve, bool spiralAxis, MbCurve3D *&result)
 Create a spiral.
MbResultType SpiralCurve (const MbCartPoint3D &point0, const MbCartPoint3D &point1, const MbCartPoint3D &point2, double radius, double step, double angle, MbCurve *lawCurve, bool spiralAxis, MbCurve3D *&result)
 Create a spiral.
MbResultType CreateContour (MbCurve3D &curve, MbContour3D *&result)
 Create a composite curve (contour).
MbCurve3DDuplicateCurve (const MbCurve3D &curve, VERSION version=Math::DefaultMathVersion())
 Create a copy of a curve.
MbResultType AddCurveToContour (MbCurve3D &curve, MbCurve3D &contour, bool toEnd)
 Add a curve to a composite curve (a contour).
MbResultType PlaneCurve (const MbPlacement3D &place, const MbCurve &curve, MbCurve3D *&result)
 Create a space curve from a two-dimensional curve.
MbResultType SurfaceCurve (const MbSurface &surface, const MbCurve &curve, MbCurve3D *&result)
 Create a curve on a surface given a two-dimensional curve.
MbResultType CurveOnSurface (const MbCurve3D &curve, const MbSurface &surf, bool sameSurf, bool extSurf, MbCurve3D *&result, bool strictOnSurface=false)
 Create a curve on a surface from a space curve lying on the surface.
bool IsCurveOnSurface (const MbCurve3D &curve, const MbSurface &surf, bool ext, bool strictOnSurface=false)
 Determine whether the curve lies on the surface.
MbResultType CreateContours (RPArray< MbCurve3D > &curves, double metricEps, RPArray< MbContour3D > &result, bool onlySmoothConnected=false, VERSION version=Math::DefaultMathVersion())
 Create an array of contours given an array of curves.
MbResultType CreateContours (RPArray< MbCurve3D > &curves, double metricAcc, bool onlySmoothConnected=false, VERSION version=Math::DefaultMathVersion())
 Create contours given a set of curves with elimination of degenerate ones.
MbResultType WireFrame (const MbCurve3D &curve, const MbName &curveName, SimpleName mainName, MbWireFrame *&result)
 Create a named three-dimensional wireframe.
MbResultType WireFrame (const RPArray< MbCurve3D > &curves, const RPArray< MbName > &curveNames, SimpleName mainName, MbWireFrame *&result)
 Create a named three-dimensional wireframe.
MbResultType CreatePolyArcCurve3D (const MbCurve3D &curve, MbCurve3D *&result, double &eps, double minRad=Math::minRadius, double maxRad=Math::maxRadius)
 Approximate a contour with arcs and line segments.
bool GetSpaceCurve (const MbItem &item, bool keepPlacement, SPtr< MbCurve3D > &curve0, std::vector< SPtr< MbCurve3D > > *curves=NULL)
 Get or create a space curve.
MbCurve3DUnwrapCurve (const MbCurve3D &curve, const MbPlacement3D &placement, const MbCartPoint3D &point, double deviationAngle=DEVIATION_SAG)
 Construct a unwrapping curve/contour.
MbResultType EvolutionSection (const MbSweptData &generCurves, const MbCurve3D &guideCurve, double guideParam, const EvolutionValues &params, MbSweptData &result, VERSION version=Math::DefaultMathVersion(), double angleEpsilon=ANGLE_EPSILON)
 Create a section of evolution solid for defined parameter on the guide curve.
bool IsLikeStraightLine (const MbCurve &curve, double eps)
 Whether the curve is like straight-line regardless of its parameterisation.
bool CheckJoinedParams (const MbCurve3D &curve, SArray< double > &params, bool isAscending)
 Check the curve parameters for creation of a joint solid.
MbCurve3DCreateJoinedCurve (const RPArray< MbCurveEdge > &edges, const SArray< bool > &orients, const MbMatrix3D &matr, MbResultType &res)
 Create a curve from a set of edges.
MbCurve3DTrimClosedSpine (const MbCurve3D &curve, double t)
 Create a trimmed closed curve on a curve copy.
MbResultType CalculatePipePoints (const MbCartPoint3D &origin1, const MbVector3D &direction1, double length1, double radius1, const MbCartPoint3D &origin2, const MbVector3D &direction2, double length2, double radius2, MbCartPoint3D &result1, MbCartPoint3D &result2)
 Compute the vertices of a polyline.
MbResultType OffsetPlaneCurve (const MbCurve3D &curve, double d, MbCurve3D *&result)
 Create an offset curve.
MbResultType OffsetCurve (const MbCurve3D &initCurve, const MbVector3D &offsetVect, const bool useFillet, const bool keepRadius, const bool bluntAngle, const bool fromBeg, const MbSNameMaker &snMaker, MbWireFrame *&result)
 Create an offset curve.
MbResultType OffsetCurve (const MbCurve3D &curve, const MbFace &face, const MbAxis3D &dirAxis, double dist, const MbSNameMaker &snMaker, MbWireFrame *&result)
 Create an offset curve.
MbResultType CurveProjection (const MbSurface &surface, const MbCurve3D &curve, MbVector3D *direction, bool createExact, bool truncateByBounds, RPArray< MbCurve3D > &result, VERSION version=Math::DefaultMathVersion())
 Create a curve projection onto the surface.
MbResultType CurveByTwoProjections (const MbPlacement3D &place1, const MbCurve &curve1, const MbPlacement3D &place2, const MbCurve &curve2, RPArray< MbCurve3D > &result, VERSION version=Math::DefaultMathVersion())
 Create a space curve from two planar projections.
MbResultType ProjectionCurve (const MbCurve3D &curve, const RPArray< MbFace > &faces, const MbVector3D *dir, const bool createExact, const bool truncateByBounds, const MbSNameMaker &snMaker, RPArray< MbCurve3D > &result, SArray< uintptr_t > *resultIndices)
 Create a projection curve from a normal or from a direction.
MbResultType ProjectionCurve (const MbWireFrame &wireFrame, const bool sameWireFrame, const MbSolid &solid, const bool same, const SArray< size_t > &faceIndices, const MbVector3D *dir, const bool createExact, const bool truncateByBounds, const MbSNameMaker &snMaker, MbWireFrame *&resFrame)
 Create a projection wireframe from a normal or from a direction.
bool EliminateProjectionCurveOverlay (RPArray< MbCurve3D > &curves, SArray< uintptr_t > *indices)
 Eliminate the projection curve segments overlay.
MbResultType IntersectionCurve (const MbSurface &surface1, const MbSurface &surface2, const MbSNameMaker &snMaker, MbWireFrame *&result)
 Create the intersection curves of two surfaces.
MbResultType IntersectionCurve (MbFace &face1, MbFace &face2, const MbSNameMaker &snMaker, MbWireFrame *&result)
 Create intersection curves of two faces.
MbResultType IntersectionCurve (const MbSolid &solid1, const SArray< size_t > &faceIndices1, const MbSolid &solid2, const SArray< size_t > &faceIndices2, const MbSNameMaker &snMaker, MbWireFrame *&result)
 Create intersection curves of two shells faces.
MbResultType IntersectionCurve (const MbSolid &solid1, const SArray< size_t > &faceIndices1, const bool same1, const MbSolid &solid2, const SArray< size_t > &faceIndices2, const bool same2, const MbSNameMaker &snMaker, MbWireFrame *&result)
 Create intersection curves of two shells faces.
MbResultType IntersectionCurve (const MbSurface &surface1, bool ext1, const MbCartPoint &uv1beg, const MbCartPoint &uv1end, const MbSurface &surface2, bool ext2, const MbCartPoint &uv2beg, const MbCartPoint &uv2end, const MbVector3D &dir, MbCurve *&result1, MbCurve *&result2, MbeCurveBuildType &label)
 Create an intersection curve of surfaces.
MbResultType SpaceSplineThrough (const SArray< MbCartPoint3D > &points, MbeSplineParamType paramType, size_t degree, bool closed, RPArray< MbPntMatingData< MbVector3D > > &transitions, const MbSNameMaker &snMaker, MbWireFrame *&result)
 Create a spatial spline through points and with the given derivatives.
MbResultType SpaceSplineBy (const SArray< MbCartPoint3D > &points, size_t degree, bool closed, const SArray< double > *weights, const SArray< double > *knots, MbPntMatingData< MbVector3D > *begData, MbPntMatingData< MbVector3D > *endData, const MbSNameMaker &snMaker, MbWireFrame *&result)
 Create a spatial spline from points and derivatives.
MbResultType SurfaceSpline (const MbSurface &surface, bool throughPoints, SArray< MbCartPoint > &paramPnts, SArray< double > &paramWts, bool paramClosed, RPArray< MbPntMatingData< MbVector3D > > &spaceTransitions, const MbSNameMaker &snMaker, MbWireFrame *&result)
 Create a curve on a surface.
MbResultType IsoparametricCurve (const MbSurface &surface, double x, bool isU, const MbRect1D *yRange, MbCurve3D *&result)
 Create an isoparametric curve.
MbResultType BridgeCurve (const MbCurve3D &curve1, double t1, bool sense1, const MbCurve3D &curve2, double t2, bool sense2, const MbSNameMaker &names, MbWireFrame *&result)
 Create a transition curve connecting curves 'curve1' and 'curve2'.
MbResultType ConnectingCurve (const MbCurve3D &curve1, bool isBegin1, double radius1, const MbCurve3D &curve2, bool isBegin2, double radius2, const MbSNameMaker &names, MbWireFrame *&result)
 Create a composite curve smoothly connecting two curves ends.
MbResultType ConnectingSpline (const MbCurve3D &curve1, double t1, MbeMatingType mating1, const MbCurve3D &curve2, double t2, MbeMatingType mating2, double tension1, double tension2, const MbSNameMaker &names, MbWireFrame *&result)
 Create a connecting NURBS curve for curves 'curve1' and 'curve2'.
MbResultType FilletCurve (const MbCurve3D &curve1, double &t1, double &w1, const MbCurve3D &curve2, double &t2, double &w2, double &radius, bool sense, bool &unchanged, const MbeConnectingType type, const MbSNameMaker &names, MbElementarySurface *&surface, MbWireFrame *&result)
 Create a fillet curve for curves.
MbResultType CreateContourFillets (const MbContour3D &contour, SArray< double > &radiuses, MbCurve3D *&result, const MbeConnectingType type)
 Create a curve for fillet of all the curves of a contour.
MbCurve3DNurbsConic_1 (const MbCartPoint3D &mbPoint0, const MbCartPoint3D &mbPoint1, const MbCartPoint3D &mbPoint2, double fDiscr)
 Construct a conic section by two points, an angle vertex and a discriminant.
MbCurve3DNurbsConic_2 (std::vector< MbCartPoint3D > &vmbConicPoints, const MbCartPoint3D &mbVertex)
 Construct a conic section by three points, and an angle vertex.
MbCurve3DNurbsConic_3 (const std::vector< MbCartPoint3D > &vmbConicPoints, MbVector3D &mbTangent1, MbVector3D &mbTangent2)
 Construct a conic section by three points and two inclinations.
MbCurve3DNurbsConic_4 (const MbCartPoint3D &mbPoint1, const MbCartPoint3D &mbPoint2, const MbVector3D &mbTangent1, const MbVector3D &mbTangent2, double fDiscr)
 Construct a conic section by two points, two inclinations and a discriminant.
MbCurve3DNurbsConic_5 (const std::vector< MbCartPoint3D > &vmbConicPoints, MbVector3D &mbTangent1, size_t tanPntNb=1)
 Construct a conic section by four points, and an inclination.
MbCurve3DNurbsConic_6 (const std::vector< MbCartPoint3D > &vmbConicPoints)
 Construct a conic section by five points.
bool InitContour3D (MbContour3D &contour, bool closed, SArray< Polyline3DPoint > &initList, SArray< ptrdiff_t > &errorIndexes, double lengthEpsilon=Math::lengthEpsilon)
 Construct a contour from segments by given points.
MbCreatorCreateFilletEdge (const MbCurve3D &curve1, double &t1, const MbCurve3D &curve2, double &t2, double &radius, bool sense, MbeConnectingType type, const MbSNameMaker &names, MbResultType &res, bool &unchanged, MbElementarySurface *&surface, MbEdge *&edge)
 Create two curves fillet constructor.
MbCreatorCreateSplineEdge (const MbCurve3D &curve1, double t1, MbeMatingType mating1, const MbCurve3D &curve2, double t2, MbeMatingType mating2, double tension1, double tension2, const MbSNameMaker &names, MbResultType &res, MbEdge *&edge)
 Create constructor of two curves connection by a spline.
MbCreatorCreateConnectingEdge (const MbCurve3D &curve1, bool isBegin1, double radius1, const MbCurve3D &curve2, bool isBegin2, double radius2, const MbSNameMaker &names, MbResultType &res, MbEdge *&edge)
 Create a constructor of conjugation of two curves end points by a composite curve of smooth connection.
MbCreatorCreateBridgeEdge (const MbCurve3D &curve1, double t1, bool sense1, const MbCurve3D &curve2, double t2, bool sense2, const MbSNameMaker &names, MbResultType &res, MbEdge *&edge)
 Create a constructor of two curves conjugation by a cubic Hermite spline (transition curve).
MbCreatorCreateFillet (MbFaceShell *solid, MbeCopyMode sameShell, SArray< MbEdgeFunction > &initCurves, RPArray< MbFace > &initBounds, const SmoothValues &parameters, const MbSNameMaker &names, MbResultType &res, MbFaceShell *&shell)
 Create a shell with edges fillet.
MbCreatorCreateSplineThrough (const SArray< MbCartPoint3D > &points, MbeSplineParamType paramType, size_t degree, bool closed, RPArray< MbPntMatingData< MbVector3D > > &transitions, const MbSNameMaker &snMaker, MbResultType &resType, MbCurve3D *&resCurve)
 Create a spatial spline through points and with the given tangents.
MbCreatorCreateSplineBy (const SArray< MbCartPoint3D > &points, size_t degree, bool closed, const SArray< double > *weights, const SArray< double > *knots, MbPntMatingData< MbVector3D > *begData, MbPntMatingData< MbVector3D > *endData, const MbSNameMaker &snMaker, MbResultType &resType, MbCurve3D *&resCurve)
 Create a spatial spline from points and tangents.
MbCreatorCreateOffsetCurve (const MbCurve3D &initCurve, const MbVector3D &offsetVect, const bool useFillet, const bool keepRadius, const bool bluntAngle, const bool fromBeg, const MbSNameMaker &snMaker, MbResultType &resType, MbCurve3D *&resCurve)
 Create an offset curve from three-dimensional curve and direction.
MbCreatorCreateOffsetCurve (const MbCurve3D &curve, const MbFace &face, const MbAxis3D &dirAxis, double dist, const MbSNameMaker &snMaker, MbResultType &resType, RPArray< MbCurve3D > &resCurves)
 Create an offset curve from a spatial curve and offset value.
MbCreatorCreateSurfaceSpline (const MbSurface &surface, bool throughPoints, SArray< MbCartPoint > &paramPnts, SArray< double > &paramWts, bool paramClosed, RPArray< MbPntMatingData< MbVector3D > > &spaceTransitions, const MbSNameMaker &snMaker, MbResultType &resType, RPArray< MbCurve3D > &resCurves)
 Create a curve on a surface.
MbCurve3DMakeCurve3D (const MbCurve &curve, const MbPlacement3D &)
 Create a spatial curve.
void ExtractCurvesDeleteFrame (MbWireFrame *&wireFrame, RPArray< MbCurve3D > &curves)
 Take curves and delete a frame if it is not used.
void ExtractCurveDeleteFrame (MbWireFrame *&wireFrame, MbCurve3D *&curve)
 Take the first curve and delete a frame if it is empty and not used.
bool CreateWireFrame (MbWireFrame *&result, const RPArray< MbCurve3D > &curves, const MbSNameMaker &snMaker, MbCreator *creator=NULL)
 Create a frame by a set of curves.
bool CreateWireFrame (MbWireFrame *&result, const MbCurve3D &curve, const MbSNameMaker &snMaker, MbCreator *creator=NULL)
 Create a frame by a curve.

Function Documentation

MbResultType Line ( const MbCartPoint3D point1,
const MbCartPoint3D point2,
MbCurve3D *&  result 
)

Create a line given two points.

Parameters:
[in]point1- The first point.
[in]point2- The second point.
[out]result- The line.
Returns:
Returns operation result code.
MbResultType Segment ( const MbCartPoint3D point1,
const MbCartPoint3D point2,
MbCurve3D *&  result 
)

Create a line segment given two points.

Parameters:
[in]point1- The first point.
[in]point2- The second point.
[out]result- The segment.
Returns:
Returns operation result code.
MbResultType Arc ( const MbCartPoint3D centre,
const SArray< MbCartPoint3D > &  points,
bool  curveClosed,
double  angle,
double &  a,
double &  b,
MbCurve3D *&  result 
)

Create an ellipse (circle) or an elliptical (circular) arc.
The container 'points' should contain 0 or 2 elements.

Parameters:
[in]centre- The center of an ellipse (circle).
[in]points- Points on the arc.
[in]curveClosed- The closedness of the arc.
[in]angle- The inclination angle.
[in,out]a- The major axis length.
[in,out]b- The minor axis length.
[out]result- The ellipse (circle) or the elliptical (circular) arc.
Returns:
Returns operation result code.
MbResultType SplineCurve ( const SArray< MbCartPoint3D > &  pointList,
bool  curveClosed,
MbeSpaceType  curveType,
MbCurve3D *&  result 
)

Create a curve passing through a set of points that has the following type:
curveType == st_LineSegment3D - a line segment,
curveType == st_Arc3D - a circle or an arc,
curveType == st_Polyline3D - a polyline,
curveType == st_Bezier3D - a Bezier curve,
curveType == st_CubicSpline3D - a cubic spline,
curveType == st_Hermit3D - a cubic Hermite spline,
curveType == st_Nurbs3D - a nonuniform rational B-spline of fourth order (cubic).

Parameters:
[in]pointList- A point set.
[in]curveClosed- A curve closedness.
[in]curveType- A curve type.
[out]result- The curve.
Returns:
Returns operation result code.
MbResultType NurbsCurve ( const SArray< MbCartPoint3D > &  pointList,
const SArray< double > &  weightList,
size_t  degree,
const SArray< double > &  knotList,
bool  curveClosed,
MbCurve3D *&  result 
)

Create a NURBS-curve given a sequence of control points.
Container 'weightList' can be empty.
Container 'knotList' can be empty.

Parameters:
[in]pointList- An array of points.
[in]weightList- An array of weights.
[in]degree- A spline degree.
[in]knotList- An array of parametric knots (A knot vector).
[in]curveClosed- A curve closedness.
[out]result- The spline curve.
Returns:
Returns operation result code.
MbResultType NurbsCopy ( const MbCurve3D curve,
MbCurve3D *&  result 
)

Create a copy of a curve as a NURBS-curve.

Parameters:
[in]curve- The initial curve.
[out]result- The spline copy of the curve.
Returns:
Returns operation result code.
MbResultType RegularPolygon ( const MbCartPoint3D centre,
const MbCartPoint3D point,
const MbVector3D axisZ,
size_t  vertexCount,
bool  describe,
MbCurve3D *&  result 
)

Create a regular polygon inscribed in a circle
(if 'describe' == true circumscribed around a circle) with the specified centre and passing through the given point:

  • if vertexCount <= 1, a circle with center 'center' passing through 'point' is created,
  • if vertexCount == 2, a rectangle aligned with the global axes with the opposite vertices at points 'centre' and 'point' is created.
    Parameters:
    [in]centre- The center.
    [in]point- A point.
    [in]axisZ- Z-axis for curve LCS creation.
    [in]vertexCount- Number of vertices.
    [in]describe- Circumscribing around the circle.
    [out]result- The regular polygon.
    Returns:
    Returns operation result code.
MbResultType SpiralCurve ( const MbPlacement3D place,
double  radius,
double  step,
MbCurve lawCurve,
bool  spiralAxis,
MbCurve3D *&  result 
)

Create a spiral.
If 'spiralAxis' == true, 'lawCurve' determines the axis of a spiral.
If spiralAxis == false, then 'lawCurve' - determines a radius law.

Parameters:
[in]place- A local coordinate system.
[in]radius- A spiral radius.
[in]step- A pitch.
[in]lawCurve- A guide curve.
[in]spiralAxis- A spiral construction mode.
[out]result- The spiral curve.
Returns:
Returns operation result code.
MbResultType SpiralCurve ( const MbCartPoint3D point0,
const MbCartPoint3D point1,
const MbCartPoint3D point2,
double  radius,
double  step,
double  angle,
MbCurve lawCurve,
bool  spiralAxis,
MbCurve3D *&  result 
)

Create a spiral.
If 'spiralAxis' == true, 'lawCurve' determines the axis of a spiral.
If spiralAxis == false, then 'lawCurve' - determines a radius law.
If lawCurve == NULL, a conical spiral is created with the specified taper angle.

Parameters:
[in]point0- The origin of local coordinate system (LCS).
[in]point1- A point on Z-axis of LCS.
[in]point2- A point on the X-axis of LCS.
[in]radius- A spiral radius.
[in]step- A pitch.
[in]angle- A taper angle.
[in]lawCurve- A guide curve.
[in]spiralAxis- A spiral construction mode.
[out]result- The spiral curve.
Returns:
Returns operation result code.
MbResultType CreateContour ( MbCurve3D curve,
MbContour3D *&  result 
)

Create a composite curve (contour) on the basis of the given curve.

Parameters:
[in]curve- The initial curve.
[out]result- The contour created on the basis of the curve.
Returns:
Returns operation result code.
MbCurve3D* DuplicateCurve ( const MbCurve3D curve,
VERSION  version = Math::DefaultMathVersion() 
)

Create a copy of a curve with splitting of a polyline and replacement of some curves.

Parameters:
[in]curve- The initial curve.
[in]version- The version.
Returns:
Returns a modified copy of the curve if it has been successfully created.
MbResultType AddCurveToContour ( MbCurve3D curve,
MbCurve3D contour,
bool  toEnd 
)

Add a curve to a composite curve (a contour) 'contour'.
If toEnd == true, the curve is to be added to the end.
If toEnd == true, the curve is to be added to the beginning.

Parameters:
[in]curve- A curve to be added.
[in,out]contour- A contour to be modified.
[in]toEnd- The flag determines the place of the curve in the contour.
Returns:
Returns operation result code.
MbResultType PlaneCurve ( const MbPlacement3D place,
const MbCurve curve,
MbCurve3D *&  result 
)

Create a space curve from a two-dimensional curve 'curve' lying on plane 'place'.
The construction is performed on the source curve.

Parameters:
[in]place- The plane coordinate system.
[in]curve- A two-dimensional curve
[out]result- The planar curve.
Returns:
Returns operation result code.
MbResultType SurfaceCurve ( const MbSurface surface,
const MbCurve curve,
MbCurve3D *&  result 
)

Create a curve on a surface 'surface' given a two-dimensional curve 'curve'.
The construction is performed on the original curve and surface.

Parameters:
[in]surface- A surface.
[in]curve- A two-dimensional curve
[out]result- The curve on the specified surface.
Returns:
Returns operation result code.
MbResultType CurveOnSurface ( const MbCurve3D curve,
const MbSurface surf,
bool  sameSurf,
bool  extSurf,
MbCurve3D *&  result,
bool  strictOnSurface = false 
)

Create a curve on a surface from a space curve lying on the surface.
The special cases of curves exactly lying on the specified surfaces are treated. In the general case a space curve is considered to lie on the surface if a group of points obtained by sampling the curve with the given turning angle belongs to the surface. In this case a two-dimensional curve is created as the projection of the curve on the surface.

Parameters:
[in]curve- A space curve.
[in]surf- A surface.
[in]sameSurf- Whether to use the source surface.
[in]extSurf- Whether to use the extended surface.
[in]strictOnSurface- All the points of the curve belong to the surface (true) or a part of the points belong to the surface (false).
[out]result- The curve on the specified surface.
Returns:
Returns operation result code.
bool IsCurveOnSurface ( const MbCurve3D curve,
const MbSurface surf,
bool  ext,
bool  strictOnSurface = false 
)

Determine whether the curve entirely lies on the surface.

Parameters:
[in]curve- A space curve.
[in]surf- A surface.
[in]ext- Whether to use the extended surface.
[in]strictOnSurface- All the points of the curve belong to the surface (true) or a part of the points belong to the surface (false).
Returns:
Returns true if the curve lies on the surface.
MbResultType CreateContours ( RPArray< MbCurve3D > &  curves,
double  metricEps,
RPArray< MbContour3D > &  result,
bool  onlySmoothConnected = false,
VERSION  version = Math::DefaultMathVersion() 
)

Create an array of contours given an array of curves (using the original curves).

Parameters:
[in]curves- An array of curves.
[in]metricEps- The radius for curves joining.
[out]result- The array of contours.
[in]onlySmoothConnected- Whether to add only smoothly connected segments.
[in]version- Version.
Returns:
Returns operation result code.
MbResultType CreateContours ( RPArray< MbCurve3D > &  curves,
double  metricAcc,
bool  onlySmoothConnected = false,
VERSION  version = Math::DefaultMathVersion() 
)

Create contours given a set of curves with elimination of degenerate ones (the original curves are used).

Parameters:
[in,out]curves- An array of curves.
[in]metricAcc- The radius for curves joining.
[in]onlySmoothConnected- Whether to add only smoothly connected segments.
[in]version- Version.
Returns:
Returns operation result code.
MbResultType WireFrame ( const MbCurve3D curve,
const MbName curveName,
SimpleName  mainName,
MbWireFrame *&  result 
)

Create a named three-dimensional wireframe from a curve.

Parameters:
[in]curve- The curve.
[in]curveName- The curve name.
[in]mainName- The operation main name.
[out]result- The wireframe.
Returns:
Returns operation result code.
MbResultType WireFrame ( const RPArray< MbCurve3D > &  curves,
const RPArray< MbName > &  curveNames,
SimpleName  mainName,
MbWireFrame *&  result 
)

Create a named three-dimensional wireframe from a given array of curves.

Parameters:
[in]curves- An array of curves.
[in]curveNames- An array of the curves names.
[in]mainName- The operation main name.
[out]result- The wireframe.
Returns:
Returns operation result code.
MbResultType CreatePolyArcCurve3D ( const MbCurve3D curve,
MbCurve3D *&  result,
double &  eps,
double  minRad = Math::minRadius,
double  maxRad = Math::maxRadius 
)

Approximate a contour with arcs and line segments.
The approximation is performed for each segment of the contour.

Parameters:
[in]curve- A curve or a contour to approximate.
[out]result- The approximation result.
[in]eps- The approximation precision.
[in]minRad- The minimal acceptable radius of the circles used for the approximation.
[in]maxRad- The maximal acceptable radius of the circles used for the approximation.
Returns:
- Returns operation result code.
bool GetSpaceCurve ( const MbItem item,
bool  keepPlacement,
SPtr< MbCurve3D > &  curve0,
std::vector< SPtr< MbCurve3D > > *  curves = NULL 
)

Get or create a space curve from a model object data. with optional keeping of supporting plane in the case of a planar object.
A two-dimensional contour is to be converted not to a contour on a plane but to a three-dimensional contour.

Parameters:
[in]item- A model object.
[in]keepPlacement- Whether to keep the supporting plane.
[out]curve0- A space curve.
[out]curves- Additional space curve (It's possible if a object "MbItem" is the object "MbPlaneInstance").
Returns:
- Returns whether the result is successful.
MbCurve3D* UnwrapCurve ( const MbCurve3D curve,
const MbPlacement3D placement,
const MbCartPoint3D point,
double  deviationAngle = DEVIATION_SAG 
)

Construction unwrapping of the curve/contour on a plane. Each segment of the contour is unwrapped by the function UnwrapCurve. Unwrapping starting with a segment which lies in the plane or crosses the plane and which is closest to the given point. Unwrapping of the first segment is constructed in the manner, that cross point or closest projection of the segment on the plane were stationary.

Parameters:
[in]curve- Original curve/contour.
[in]placement- The placement of the plane.
[in]point- The point for determine first segment.
[in]deviationAngle- The parameter of accuracy.
Returns:
The pointer to the constructed curve with zero counter of references
return NULL, if unwrap curve can't be construvted for this parameters
MbResultType EvolutionSection ( const MbSweptData generCurves,
const MbCurve3D guideCurve,
double  guideParam,
const EvolutionValues params,
MbSweptData result,
VERSION  version = Math::DefaultMathVersion(),
double  angleEpsilon = ANGLE_EPSILON 
)

Create a section of evolution solid (sweep solid with guide curve) for defined parameter on guide curve. If the guide curve is a contour, then this contour have to be smooth.

Parameters:
[in]generCurves- An array of forming curves.
[in]guideCurve- An guide curve (or contour).
[in]guideParam- A parameter on the guide curve.
[in]angleEpsilon- The desired angular precision parallel to the tangent at the point of junction path segments.
[out]result- Curves of evolution solid section.
Returns:
Returns operation result code.
bool IsLikeStraightLine ( const MbCurve curve,
double  eps 
)

Whether the curve is like straight-line regardless of its parameterisation.

Parameters:
[in]curve- Curve.
[in]eps- Accuracy.
bool CheckJoinedParams ( const MbCurve3D curve,
SArray< double > &  params,
bool  isAscending 
)

Check the curve parameters and normalize a closed curve parameters.

Parameters:
[in]curve- The curve.
[in,out]params- An array of the curve parameters.
[in]isAscending- Whether the parameters are specified in the ascending order.
Returns:
Returns true if the parameter array has been successfully normalized.
Warning:
An auxillary function of operation JoinShell.
MbCurve3D* CreateJoinedCurve ( const RPArray< MbCurveEdge > &  edges,
const SArray< bool > &  orients,
const MbMatrix3D matr,
MbResultType res 
)

Create a curve for a surface of the joint from a list of edges.

Parameters:
[in]edges- A set of edges.
[in]orients- Edges senses.
[in]matr- Edges transformation matrix.
[out]res- The operation result.
Returns:
Returns a pointer to the curve if it has been successfully created, otherwise it returns null.
Warning:
An auxillary function of operation JoinShell.
MbCurve3D* TrimClosedSpine ( const MbCurve3D curve,
double  t 
)

Create a copy of a closed curve starting at a point with parameter t.

Parameters:
[in]curve- The spine curve.
[in]t- A curve parameter.
Returns:
Returns a constructed curve copy starting at the specified point if it has been successfully created, otherwise it returns null.
Warning:
An auxiliary function of operations EvolutionSolid and EvolutionResult.
MbResultType CalculatePipePoints ( const MbCartPoint3D origin1,
const MbVector3D direction1,
double  length1,
double  radius1,
const MbCartPoint3D origin2,
const MbVector3D direction2,
double  length2,
double  radius2,
MbCartPoint3D result1,
MbCartPoint3D result2 
)

Compute the vertices 'point1' and 'point2' of a polyline connecting points 'origin1' and 'origin2' translated in the directions 'direction1' and 'direction2' by distances 'length1' and 'length2' which can be rounded with radius 'radius1' and 'radius2'.

Parameters:
[in]origin1- The first point.
[in]direction1- The direction of the first point translation.
[in]length1- The distance of the first point translation.
[in]radius1- The rounding radius for the first point.
[in]origin2- The second point.
[in]direction2- The direction of the second point translation.
[in]length2- The distance of the second point translation.
[in]radius2- The rounding radius for the second point.
[out]result1- The first point of the polyline.
[out]result2- The second point of the polyline.
Returns:
Returns operation result code.
MbResultType OffsetPlaneCurve ( const MbCurve3D curve,
double  d,
MbCurve3D *&  result 
)

Create an offset curve from a planar curve.

Parameters:
[in]curve- The initial curve.
[in]d- The offset distance.
[out]result- The offset curve.
Returns:
Returns operation result code.
MbResultType OffsetCurve ( const MbCurve3D initCurve,
const MbVector3D offsetVect,
const bool  useFillet,
const bool  keepRadius,
const bool  bluntAngle,
const bool  fromBeg,
const MbSNameMaker snMaker,
MbWireFrame *&  result 
)

Create an offset curve from a three-dimensional curve and a direction vector.

Parameters:
[in]initCurve- A space curve for which to construct the offset curve.
[in]offsetVect- The displacement vector at a point of the curve.
[in]useFillet- If 'true', the gaps are to be filled with fillet, otherwise with the extended curves.
[in]keepRadius- If 'true', the existent fillet radii are to be kept.
[in]bluntAngle- If 'true', sharp corners are to be blunt.
[in]fromBeg- The translation vector is associated with the beginning.
[in]snMaker- An object defining the frame curves names.
[out]result- The frame with the constructed curves.
Returns:
Returns operation result code.
MbResultType OffsetCurve ( const MbCurve3D curve,
const MbFace face,
const MbAxis3D dirAxis,
double  dist,
const MbSNameMaker snMaker,
MbWireFrame *&  result 
)

Create an offset curve from a curve on a surface and a shift value.

Parameters:
[in]curve- A curve on face 'face' surface.
[in]face- The edge on which to build the offset curve.
[in]dirAxis- The offset direction with a point of application.
[in]dist- The offset distance.
[in]snMaker- An object defining the frame curves names.
[out]result- The frame with the constructed curves.
Returns:
Returns operation result code.
MbResultType CurveProjection ( const MbSurface surface,
const MbCurve3D curve,
MbVector3D direction,
bool  createExact,
bool  truncateByBounds,
RPArray< MbCurve3D > &  result,
VERSION  version = Math::DefaultMathVersion() 
)

Create the projection of a curve onto surface 'surface' (the projection direction 'direction' can be NULL).

Parameters:
[in]surface- The surface to project onto.
[in]curve- The curve to project.
[in]direction- The projection direction (if not specified, the projection along the normal).
[in]createExact- Create a projection curve if necessary.
[in]truncateByBounds- Truncate by the surface bounds.
[in]version- The version.
[out]result- An array of curves on the surface.
Returns:
Returns operation result code.
MbResultType CurveByTwoProjections ( const MbPlacement3D place1,
const MbCurve curve1,
const MbPlacement3D place2,
const MbCurve curve2,
RPArray< MbCurve3D > &  result,
VERSION  version = Math::DefaultMathVersion() 
)

Create a space curve from two planar projections.

Parameters:
[in]place1- A local coordinate system 1.
[in]curve1- A two-dimensional curve 1.
[in]place2- A local coordinate system 2.
[in]curve2- A two-dimensional curve 2.
[out]result- The array of three-dimensional curves.
Returns:
Returns operation result code.
MbResultType ProjectionCurve ( const MbCurve3D curve,
const RPArray< MbFace > &  faces,
const MbVector3D dir,
const bool  createExact,
const bool  truncateByBounds,
const MbSNameMaker snMaker,
RPArray< MbCurve3D > &  result,
SArray< uintptr_t > *  resultIndices 
)

Create a projection curve from a normal or from a direction.
If the projection is onto the constructive plane (a plane without bounds), create a face on the basis of this projection.

Parameters:
[in]curve- The curve to project.
[in]faces- A connected set of faces.
[in]dir- The direction vector (if it is absent, the normal projection).
[in]createExact- Create a projection curve if necessary.
[in]truncateByBounds- Truncate by bounds.
[in]snMaker- An object defining the names with the version.
[out]result- The projection curves.
[out]resultIndices- The indices of faces in the initial array.
Returns:
Returns operation result code.
MbResultType ProjectionCurve ( const MbWireFrame wireFrame,
const bool  sameWireFrame,
const MbSolid solid,
const bool  same,
const SArray< size_t > &  faceIndices,
const MbVector3D dir,
const bool  createExact,
const bool  truncateByBounds,
const MbSNameMaker snMaker,
MbWireFrame *&  resFrame 
)

Create a projection curve from a normal or from a direction.
If the projection is onto the constructive plane (a plane without bounds), create a face on the basis of this projection.

Parameters:
[in]wireFrame- The wireframe to project.
[in]sameWireFrame- Flag whether to use the same wireframe or make a copy of it.
[in]solid- Solid.
[in]same- Flag whether to use the same creators of the body or make a copy.
[in]faceIndices- The numbers of faces in the first shell.
[in]dir- The direction vector (if it is absent, the normal projection).
[in]createExact- Create a projection curve if necessary.
[in]truncateByBounds- Truncate by bounds.
[in]snMaker- An object defining the names with the version.
[out]resFrame- The resulting wireframe, the attributes of the edges contain the names of corresponding faces.
Returns:
Returns operation result code.
bool EliminateProjectionCurveOverlay ( RPArray< MbCurve3D > &  curves,
SArray< uintptr_t > *  indices 
)

Eliminate the projection curve segments overlay (an auxiliary function for function ProjectionCurve).

Parameters:
[in,out]curves- An array of curves.
[in,out]indices- An array of indices synchronized with the array of curves.
Returns:
Returns true if something has modified in the curve set.
MbResultType IntersectionCurve ( const MbSurface surface1,
const MbSurface surface2,
const MbSNameMaker snMaker,
MbWireFrame *&  result 
)

Create the intersection curves of two surfaces. The result is an array of intersection curves of surfaces.

Parameters:
[in]surface1- The first surface.
[in]surface2- The second surface.
[in]snMaker- An object defining the frame curves names.
[out]result- The frame with the constructed curves.
Returns:
Returns operation result code.
Warning:
It is better to use IntersectionCurve on faces since the surfaces bounds can be inexact,
and it will result in inexact position of intersection curves ends.
But the surface bounds in faces are exact since they are stored in the form of intersection curves, not in the form of two-dimensional curves.
MbResultType IntersectionCurve ( MbFace face1,
MbFace face2,
const MbSNameMaker snMaker,
MbWireFrame *&  result 
)

Create intersection curves of two faces. The result is an array of intersection curves of surfaces.

Parameters:
[in]face1- The first face of the shell.
[in]face2- The second face of the shell.
[in]snMaker- An object defining the frame curves names.
[out]result- The frame with the constructed curves.
Returns:
Returns operation result code.
MbResultType IntersectionCurve ( const MbSolid solid1,
const SArray< size_t > &  faceIndices1,
const MbSolid solid2,
const SArray< size_t > &  faceIndices2,
const MbSNameMaker snMaker,
MbWireFrame *&  result 
)

Create intersection curves of two shells faces. The result is an array of intersection curves of surfaces.

Parameters:
[in]solid1- The first shell.
[in]faceIndices1- The numbers of faces in the first shell.
[in]solid2- The second shell.
[in]faceIndices2- The numbers of faces in the second shell.
[in]snMaker- An object defining the frame curves names.
[out]result- The frame with the constructed curves.
Returns:
Returns operation result code.
MbResultType IntersectionCurve ( const MbSolid solid1,
const SArray< size_t > &  faceIndices1,
const bool  same1,
const MbSolid solid2,
const SArray< size_t > &  faceIndices2,
const bool  same2,
const MbSNameMaker snMaker,
MbWireFrame *&  result 
)

Create intersection curves of two shells faces. The result is an array of intersection curves of surfaces.

Parameters:
[in]solid1- The first shell.
[in]faceIndices1- The numbers of faces in the first shell.
[in]same1- Flag whether to use the same creators of the first body or make a copy.
[in]solid2- The second shell.
[in]faceIndices2- The numbers of faces in the second shell.
[in]same2- Flag whether to use the same creators of the second body or make a copy.
[in]snMaker- An object defining the frame curves names.
[out]result- The frame with the constructed curves.
Returns:
Returns operation result code.
MbResultType IntersectionCurve ( const MbSurface surface1,
bool  ext1,
const MbCartPoint uv1beg,
const MbCartPoint uv1end,
const MbSurface surface2,
bool  ext2,
const MbCartPoint uv2beg,
const MbCartPoint uv2end,
const MbVector3D dir,
MbCurve *&  result1,
MbCurve *&  result2,
MbeCurveBuildType label 
)

Create an intersection curve of surfaces 'surf1' and 'surf2' from the specified start point and end point of the intersection curve.

Parameters:
[in]surface1- The first surface.
[in]ext1- Whether to create on the extended surface.
[in]uv1beg- The start point on the first surface.
[in]uv1end- The end point on the first surface.
[in]surface2- The second surface.
[in]ext2- Whether to create on the extended second surface.
[in]uv2beg- The start point on the second surface.
[in]uv2end- The end point on the second surface.
[in]dir- The start direction for intersection curve creation.
[out]result1- The two-dimensional curve on the first surface.
[out]result2- The two-dimensional curve on the second surface.
[out]label- The resultant intersection curve type.
Returns:
Returns operation result code.
MbResultType SpaceSplineThrough ( const SArray< MbCartPoint3D > &  points,
MbeSplineParamType  paramType,
size_t  degree,
bool  closed,
RPArray< MbPntMatingData< MbVector3D > > &  transitions,
const MbSNameMaker snMaker,
MbWireFrame *&  result 
)

Create a spatial spline through points and with the given derivatives.
Notes:
If derivatives are specified, the number of derivatives should be equal to the number of points.
Missing derivatives should be represented by null pointers in the array

Parameters:
[in]points- Points.
[in]paramType- The parametrization type.
[in]degree- A spline degree.
[in]closed- The spline closedness.
[in]transitions- The specified derivatives.
[in]snMaker- An object defining the frame curves names.
[out]result- The frame with the constructed curves.
Returns:
Returns operation result code.
MbResultType SpaceSplineBy ( const SArray< MbCartPoint3D > &  points,
size_t  degree,
bool  closed,
const SArray< double > *  weights,
const SArray< double > *  knots,
MbPntMatingData< MbVector3D > *  begData,
MbPntMatingData< MbVector3D > *  endData,
const MbSNameMaker snMaker,
MbWireFrame *&  result 
)

Create a spatial spline from points and derivatives.

Parameters:
[in]points- An array of points.
[in]degree- A spline degree.
[in]closed- Create a closed spline.
[in]weights- An array of points weights.
[in]knots- A knot vector of the spline.
[in]begData- The start derivative.
[in]endData- The end derivative.
[in]snMaker- An object defining the frame curves names.
[out]result- The frame with the constructed curves.
Returns:
Returns operation result code.
MbResultType SurfaceSpline ( const MbSurface surface,
bool  throughPoints,
SArray< MbCartPoint > &  paramPnts,
SArray< double > &  paramWts,
bool  paramClosed,
RPArray< MbPntMatingData< MbVector3D > > &  spaceTransitions,
const MbSNameMaker snMaker,
MbWireFrame *&  result 
)

Create a curve on a surface.
Notes:
1. If derivatives are specified, the number of derivatives should be equal to the number of points.
Missing derivatives should be represented by null pointers in the array
2. If the spline is created from points, arbitrary derivatives can be defined.
2. If the spline is created from poles and it is open, only the end derivatives can be specified.
3. If the spline is constructed from poles and it is closed, the derivatives cannot be specified.
4. An array of weights should be empty or synchronized with the point array by size (with option throughPoints weights are ignored).

Parameters:
[in]surface- The surface.
[in]throughPoints- Create a spline through points.
[in]paramPnts- An array of parametric points.
[in]paramWts- An array of parametric point weights.
[in]paramClosed- Create a closed parametric spline.
[in]spaceTransitions- Derivatives in the points.
[in]snMaker- An object defining the frame curves names.
[out]result- The frame with the constructed curves.
Returns:
Returns operation result code.
MbResultType IsoparametricCurve ( const MbSurface surface,
double  x,
bool  isU,
const MbRect1D yRange,
MbCurve3D *&  result 
)

Create an isoparametric curve on surface 'surface'.

Parameters:
[in]surface- The surface.
[in]x- A value of the first parameter.
[in]isU- Whether the first parameter is U.
[in]yRange- A range of the second parameter (if not defined, the parametric bounds of the surface are used).
[out]result- The isoparametric curve.
Returns:
Returns operation result code.
MbResultType BridgeCurve ( const MbCurve3D curve1,
double  t1,
bool  sense1,
const MbCurve3D curve2,
double  t2,
bool  sense2,
const MbSNameMaker names,
MbWireFrame *&  result 
)

Create a transition curve connecting curves 'curve1' and 'curve2' by a cubic Hermite spline.

Parameters:
[in]curve1- A curve 1 to be connected.
[in]t1- A point parameter on the curve 1.
[in]sense1- The beginning of the transition curve is equal to the direction of 'curve1' (true).
[in]curve2- A curve 2 to be connected.
[in]t2- A point parameter on the curve 2.
[in]sense2- The end of the transition curve is equal to the direction of 'curve2' (true).
[in]names- An object defining the frame curves names.
[out]result- The frame with the constructed curves.
Returns:
Returns operation result code.
MbResultType ConnectingCurve ( const MbCurve3D curve1,
bool  isBegin1,
double  radius1,
const MbCurve3D curve2,
bool  isBegin2,
double  radius2,
const MbSNameMaker names,
MbWireFrame *&  result 
)

Create a composite curve smoothly connecting two curves ends.
The constructed curve consists of a three-dimensional arc of radius 'radius1', a segment (in specific cases a segment is absent), a three-dimensional arc of radius 'radius2'.

Parameters:
[in]curve1- A curve 1 to be connected.
[in]isBegin1- The beginning of the curve 1 (true).
[in]radius1- The conjugation raidus of curve 1.
[in]curve2- A curve 2 to be connected.
[in]isBegin2- The beginning of the curve 2 (true).
[in]radius2- The conjugation raidus of curve 2.
[in]names- An object defining the frame curves names.
[out]result- The frame with the constructed curves.
Returns:
Returns operation result code.
MbResultType ConnectingSpline ( const MbCurve3D curve1,
double  t1,
MbeMatingType  mating1,
const MbCurve3D curve2,
double  t2,
MbeMatingType  mating2,
double  tension1,
double  tension2,
const MbSNameMaker names,
MbWireFrame *&  result 
)

Create a connecting NURBS curve for curves 'curve1' and 'curve2'.
t1 and t2 are parameters of curves 'curve1' and 'curve2' which correspond to the start point and the end point of the connecting curve.

Parameters:
[in]curve1- A curve 1 to be connected.
[in]t1- A point parameter on curve 1.
[in]mating1- The connection type for curve 1.
[in]curve2- A curve 2 to be connected.
[in]t2- A point parameter on curve 2.
[in]mating2- The connection type for curve 2.
[in]tension1- The "tension" parameter of the connecting curve at the intersection with the curve 1 (0 <= tension1 <=1).
[in]tension2- The "tension" parameter of the connecting curve at the intersection with the curve 2 (0 <= tension2 <=1).
[in]names- An object defining the frame curves names.
[out]result- The frame with the constructed curves.
Returns:
Returns operation result code.
MbResultType FilletCurve ( const MbCurve3D curve1,
double &  t1,
double &  w1,
const MbCurve3D curve2,
double &  t2,
double &  w2,
double &  radius,
bool  sense,
bool &  unchanged,
const MbeConnectingType  type,
const MbSNameMaker names,
MbElementarySurface *&  surface,
MbWireFrame *&  result 
)

Create a fillet curve for curves.
Curve 'filletCurve' is created for smooth connection of curves 'curve1' and 'curve2'.
On input t1 and t2 are the initial estimations which determine a sector for fillet construction, w1 and w2 are not used.
On input 'type' is a fillet type (ordinary or on a surface).
On output t1 and t2 are the parameters of touching of curves 'curve1' and 'curve2' with curve 'filletCurve'.
On output t1 and w1 determines parameters of a part to be kept while trimming curve1.
On output t2 and w2 determines parameters of a part to be kept while trimming curve2.
Parameter 'radius' is a radius of an arc or a cylinder.
If radius 'radius' is not defined (equal to zero), it is computed from the condition that the fillet curve start is at the point with parameter t1, t1 and t2 are parameters of curves 'curve1' and 'curve2' which correspond to the start point and the end point of the fillet.
Parameter 'sense' determines forward or backward orientation of the fillet curve.
Curve filletCurve is a fillet curve, an arc (when 'surface' == NULL) or a curve on a cylindric surface 'surface'.
Surface 'surface' is a cylindric surface on which the fillet curve is constructed in general case. Surface 'surface' must not be deleted since the fillet curve 'filletCurve' is created on this surface; 'surface' will be deleted while deleting 'filletCurve' if surface->AddRef() was not additionally used.

Parameters:
[in]curve1- A curve 1 to be connected.
in/out]t1 - A point parameter on curve 1 of connection with fillet curve.
[out]w1- The parameter of curve 1 end point.
[in]curve2- A curve 2 to be connected.
in/out]t2 - A point parameter on curve 2 of connection with fillet curve.
[out]w2- The parameter of curve 2 end point.
in/out]radius - The radius of an arc or a cylinder.
[in]sense- The forward (true) or the backward (false) direction of the fillet curve.
[out]unchanged- The fillet radius has not changed (true) or has changed (false).
[in]type- The fillet type.
[in]names- An object defining the frame curves names.
[out]surface- A surface on which the fillet curve is based on (can be NULL).
[out]result- The frame with the constructed curves.
Returns:
Returns operation result code.
MbResultType CreateContourFillets ( const MbContour3D contour,
SArray< double > &  radiuses,
MbCurve3D *&  result,
const MbeConnectingType  type 
)

Create a curve for fillet of all the curves of a contour 'contour'.
'type' is a fillet type (ordinary or on a surface).
'radiuses' are the fillet radii, the i-th radius corresponds to the joint of the i-th and the i+1-th segments.
If two curves in contours are smoothly connected, the fillet is not created at this joint, the radius is ignored.

Parameters:
[in]contour- The initial contour.
[in]radiuses- An array of fillet radii.
[out]result- The contour with the fillets. The name of the fillet segment - Hash32SN() of initial segments names.
[in]type- The type of fillets.
Returns:
Returns operation result code.
MbCurve3D* NurbsConic_1 ( const MbCartPoint3D mbPoint0,
const MbCartPoint3D mbPoint1,
const MbCartPoint3D mbPoint2,
double  fDiscr 
)

Construction of a conic section as a NURBS curve of the third degree by two points setting ends of a curve, a vertex of enginer triangle and a discriminant which is used for the definition of the third point.

Parameters:
[in]mbPoint0- Coordinates of the conic start point.
[in]mbPoint1- Coordinates of the vertex of angle which should be inscribed into the conic.
[in]mbPoint2- Coordinates of the conic end point.
[in]fDiscr- The discriminant is less than 1. Otherwise it will be set to 0.99999999 automatically.
Returns:
The pointer to the constructed curve
is NULL if a try to construct a conic for a given parameters has failed.
MbCurve3D* NurbsConic_2 ( std::vector< MbCartPoint3D > &  vmbConicPoints,
const MbCartPoint3D mbVertex 
)

Construction of a conic section as a NURBS curve of the third degree by three points: ends of a curve, its average point and by a vertex of an angle, a conic should be inscribed in.

Parameters:
[in]vmbConicPoints- The container for points of a conic: start point, average point and end point; there should be exactly 3 points.
[in]mbVertex- Coordinates of the vertex of angle which should be inscribed into the conic.
Returns:
The pointer to the constructed curve
is NULL if a try to construct a conic for given parameters has failed.
MbCurve3D* NurbsConic_3 ( const std::vector< MbCartPoint3D > &  vmbConicPoints,
MbVector3D mbTangent1,
MbVector3D mbTangent2 
)

Construction of a conic section as a NURBS curve of the third degree by 3 points setting begin, end and an average point of a curve and two inclinations outgoing from the start point and from the end point

Parameters:
[in]vmbConicPoints- The container for points of a conic: start point, average point and end point; there should be exactly 3 points.
[in]mbTangent1- Inclination at start of a curve.
[in]mbTangent2- Inclination at end of a curve.
Returns:
The pointer to the constructed curve
is NULL if a try to construct a conic for given parameters has failed.
MbCurve3D* NurbsConic_4 ( const MbCartPoint3D mbPoint1,
const MbCartPoint3D mbPoint2,
const MbVector3D mbTangent1,
const MbVector3D mbTangent2,
double  fDiscr 
)

Construction of a conic section as a NURBS curve of the third degree by 2 points setting start and end of a curve, two incllinations outgoing from these points and a discriminant.

Parameters:
[in]mbPoint1- Coordinates of the conic start point.
[in]mbPoint2- Coordinates of the conic end point.
[in]mbTangent1- Inclination at start of conic.
[in]mbTangent2- Inclination at end of conic.
[in]fDiscr- The discriminant is less than 1. Otherwise it will be set to 0.99999999 automatically.
Returns:
The pointer to the constructed curve
is NULL if a try to construct a conic for given parameters has failed.
MbCurve3D* NurbsConic_5 ( const std::vector< MbCartPoint3D > &  vmbConicPoints,
MbVector3D mbTangent1,
size_t  tanPntNb = 1 
)

Construction of a conic section as a NURBS curve of the third degree by 4 points and inclination in the first of them.
By substituting of start points in the common equation of the conic Ax^2 + Bxy + Cy^2 + Dx + Ey + F = 0 and its tangent at the start point (x1, y1): (2Ax1 + By1 + D)(x - x1) + (2Cy1 + Bx1 + E)(y - y1) = 0 we get the SLAE. Having SLAE solved relative to parameters A,B,C,D,E we find the required conic.

Parameters:
[in]vmbConicPoints- The container for points of a conic: the first point is start point, the last point is end point. there should be exactly 4 points.
[in]mbTangent1- Inclination at point of conic.
[in]tanPntNb- Point number at which the inclination is specified.
Returns:
The pointer to the constructed curve
is NULL if a try to construct a conic for given parameters has failed.
MbCurve3D* NurbsConic_6 ( const std::vector< MbCartPoint3D > &  vmbConicPoints)

Construction of a conic section as a NURBS curve of the third degree by 5 points.
By substituting of start points in the common equation of the conic Ax^2 + Bxy + Cy^2 + Dx + Ey + F = 0 we get the SLAE. Having SLAE solved relative to parameters A,B,C,D,E we find the required conic.

Parameters:
[in]vmbConicPoints- The container for points of a conic: the first point is start point, the last point is end point. there should be exactly 5 points.
Returns:
The pointer to the constructed curve
is NULL if a try to construct a conic for given parameters has failed.
bool InitContour3D ( MbContour3D contour,
bool  closed,
SArray< Polyline3DPoint > &  initList,
SArray< ptrdiff_t > &  errorIndexes,
double  lengthEpsilon = Math::lengthEpsilon 
)

Vertices of joint are rounded. Some fillet radius corresponds to every vertex.
If two vertices are coincident then one of them and the corresponding radius are deleted.

Parameters:
[out]contour- The countour.
[in]closed- Whether the contour is closed.
[in]initList- The array of points of a polyline.
[out]errorIndexes- The array of segments indices, each of which has been jointed with the next one with errors.
[in]lengthEpsilon- The tolerance of polyline elements construction.
Returns:
true if the number of segments is greater than zero.
MbCreator* CreateFilletEdge ( const MbCurve3D curve1,
double &  t1,
const MbCurve3D curve2,
double &  t2,
double &  radius,
bool  sense,
MbeConnectingType  type,
const MbSNameMaker names,
MbResultType res,
bool &  unchanged,
MbElementarySurface *&  surface,
MbEdge *&  edge 
)

Create two curves fillet constructor.

Parameters:
[in]curve1- Curve 1.
[in]curve2- Curve 2.
Returns:
Returns the constructor.
MbCreator* CreateSplineEdge ( const MbCurve3D curve1,
double  t1,
MbeMatingType  mating1,
const MbCurve3D curve2,
double  t2,
MbeMatingType  mating2,
double  tension1,
double  tension2,
const MbSNameMaker names,
MbResultType res,
MbEdge *&  edge 
)

Create constructor of two curves connection by a spline.

Parameters:
[in]curve1- Curve 1.
[in]curve2- Curve 2.
Returns:
Returns the constructor.
MbCreator* CreateConnectingEdge ( const MbCurve3D curve1,
bool  isBegin1,
double  radius1,
const MbCurve3D curve2,
bool  isBegin2,
double  radius2,
const MbSNameMaker names,
MbResultType res,
MbEdge *&  edge 
)

Create a constructor of conjugation of two curves end points by a composite curve of smooth connection.

Parameters:
[in]curve1- Curve 1.
[in]curve2- Curve 2.
Returns:
Returns the constructor.
MbCreator* CreateBridgeEdge ( const MbCurve3D curve1,
double  t1,
bool  sense1,
const MbCurve3D curve2,
double  t2,
bool  sense2,
const MbSNameMaker names,
MbResultType res,
MbEdge *&  edge 
)

Create a constructor of two curves conjugation by a cubic Hermite spline (transition curve).

Parameters:
[in]curve1- Curve 1.
[in]curve2- Curve 2.
Returns:
Returns the constructor.
MbCreator* CreateFillet ( MbFaceShell solid,
MbeCopyMode  sameShell,
SArray< MbEdgeFunction > &  initCurves,
RPArray< MbFace > &  initBounds,
const SmoothValues parameters,
const MbSNameMaker names,
MbResultType res,
MbFaceShell *&  shell 
)

For a given shell create a shell with edges fillet with a variable radius.
The function simultaneously creates the shell and its constructor.

Parameters:
[in]solid- The source shell.
[in]sameShell- Method of copying the source shell faces.
[in]initCurves- The source shell edges to process and values of variable radius.
[in]initBounds- The source shell faces to trim the fillet or chamfer.
[in]parameters- Parameters of edges processing.
[in]names- An object defining a name of the operation.
[out]res- Operation result code.
[out]shell- Constructed set of faces.
Returns:
Returns the constructor if the operation has been successfully performed.
MbCreator* CreateSplineThrough ( const SArray< MbCartPoint3D > &  points,
MbeSplineParamType  paramType,
size_t  degree,
bool  closed,
RPArray< MbPntMatingData< MbVector3D > > &  transitions,
const MbSNameMaker snMaker,
MbResultType resType,
MbCurve3D *&  resCurve 
)

Create a spatial spline through points with tangents If the tangents are specified, then the number of tangents should be equal to the number of points. The missing tangents should be represented as the null pointers in the array.

Returns:
Returns the constructor.
MbCreator* CreateSplineBy ( const SArray< MbCartPoint3D > &  points,
size_t  degree,
bool  closed,
const SArray< double > *  weights,
const SArray< double > *  knots,
MbPntMatingData< MbVector3D > *  begData,
MbPntMatingData< MbVector3D > *  endData,
const MbSNameMaker snMaker,
MbResultType resType,
MbCurve3D *&  resCurve 
)

Create a spatial spline from points and tangents.

Returns:
Returns the constructor.
MbCreator* CreateOffsetCurve ( const MbCurve3D initCurve,
const MbVector3D offsetVect,
const bool  useFillet,
const bool  keepRadius,
const bool  bluntAngle,
const bool  fromBeg,
const MbSNameMaker snMaker,
MbResultType resType,
MbCurve3D *&  resCurve 
)

Create an offset curve from three-dimensional curve and direction.

Parameters:
[in]initCurve- A space curve for which to construct the offset curve.
[in]offsetVect- The displacement vector at a point of the curve.
[in]useFillet- If 'true', the gaps are to be filled with fillet, otherwise with the extended curves.
[in]keepRadius- If 'true', the existent fillet radii are to be kept.
[in]fromBeg- The translation vector is associated with the beginning.
[in]snMaker- An object defining the frame curves names.
[out]resType- Operation result code
[out]resCurve- The offset curve.
Returns:
Returns the constructor.
MbCreator* CreateOffsetCurve ( const MbCurve3D curve,
const MbFace face,
const MbAxis3D dirAxis,
double  dist,
const MbSNameMaker snMaker,
MbResultType resType,
RPArray< MbCurve3D > &  resCurves 
)

Create an offset curve from a spatial curve and offset value.

Parameters:
[in]curve- A curve on face 'face' surface.
[in]face- The edge on which to build the offset curve.
[in]dirAxis- The offset direction with a point of application.
[in]dist- The offset distance.
[in]snMaker- An object defining the frame curves names.
[out]resType- Operation result code
[out]resCurves- Offset curve array.
Returns:
Returns the constructor.
MbCreator* CreateSurfaceSpline ( const MbSurface surface,
bool  throughPoints,
SArray< MbCartPoint > &  paramPnts,
SArray< double > &  paramWts,
bool  paramClosed,
RPArray< MbPntMatingData< MbVector3D > > &  spaceTransitions,
const MbSNameMaker snMaker,
MbResultType resType,
RPArray< MbCurve3D > &  resCurves 
)

Create a curve on a surface.
Notes:
1. If the tangents are specified, then the number of tangents should be equal to the number of points.
Missing tangents should be represented by null pointers in the array
2. If the spline is created from points, arbitrary tangents can be defined.
2. If the spline is created from poles and it is open, only the end tangents can be specified.
3. If the spline is constructed from poles and it is closed, the tangents cannot be specified.
4. The weight array should be empty or synchronized with the point array by size (with option throughPoints the weights are ignored).

Parameters:
[in]surface- The surface.
[in]throughPoints- Create a spline through points.
[in]paramPnts- Parametric point array.
[in]paramWts- An array of parametric point weights.
[in]paramClosed- Create a closed parametric spline.
[in]spaceTransitions- Tangents at the points.
[in]snMaker- An object defining the frame curves names.
[out]resType- Operation result code
[out]resCurves- Offset curve array.
Returns:
Returns the constructor.
MbCurve3D* MakeCurve3D ( const MbCurve curve,
const MbPlacement3D  
)

Create a spatial curve as an accurate representation of the two-dimensional uv-curve on the plane.

void ExtractCurvesDeleteFrame ( MbWireFrame *&  wireFrame,
RPArray< MbCurve3D > &  curves 
) [inline]

Take curves and delete a frame if it is not used.

Parameters:
[in]wireFrame- A frame to delete.
[out]curves- Curves obtained from the frame.
void ExtractCurveDeleteFrame ( MbWireFrame *&  wireFrame,
MbCurve3D *&  curve 
) [inline]

Take the first curve and delete a frame if it is empty and not used.

Parameters:
[in]wireFrame- A frame to delete.
[out]curve- A curve obtained from the frame.
bool CreateWireFrame ( MbWireFrame *&  result,
const RPArray< MbCurve3D > &  curves,
const MbSNameMaker snMaker,
MbCreator creator = NULL 
)

Create or update a frame by a set of curves.

Parameters:
[out]result- A frame to replace or construct.
[in]curves- Curves for the frame construction.
[in]snMaker- An object defining the frame curves names.
[in]creator- A creator of a frame.
Returns:
Returns true if the sent frame has been updated or if the new frame has been created without a frame in the input.
bool CreateWireFrame ( MbWireFrame *&  result,
const MbCurve3D curve,
const MbSNameMaker snMaker,
MbCreator creator = NULL 
)

Create or update a frame by a curve.

Parameters:
[out]result- A frame to replace or construct.
[in]curve- A curve for the frame construction.
[in]snMaker- An object defining the frame curves names.
[in]creator- A creator of a frame.
Returns:
Returns true if the sent frame has been updated or if the new frame has been created without a frame in the input.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines