gen_contour_nurbs_xldT_gen_contour_nurbs_xldGenContourNurbsXldGenContourNurbsXldgen_contour_nurbs_xld (Operator)

Name

gen_contour_nurbs_xldT_gen_contour_nurbs_xldGenContourNurbsXldGenContourNurbsXldgen_contour_nurbs_xld — Transform a NURBS curve into an XLD contour.

Signature

gen_contour_nurbs_xld( : Contour : Rows, Cols, Knots, Weights, Degree, MaxError, MaxDistance : )

Herror T_gen_contour_nurbs_xld(Hobject* Contour, const Htuple Rows, const Htuple Cols, const Htuple Knots, const Htuple Weights, const Htuple Degree, const Htuple MaxError, const Htuple MaxDistance)

void GenContourNurbsXld(HObject* Contour, const HTuple& Rows, const HTuple& Cols, const HTuple& Knots, const HTuple& Weights, const HTuple& Degree, const HTuple& MaxError, const HTuple& MaxDistance)

void HXLDCont::GenContourNurbsXld(const HTuple& Rows, const HTuple& Cols, const HTuple& Knots, const HTuple& Weights, Hlong Degree, const HTuple& MaxError, const HTuple& MaxDistance)

void HXLDCont::GenContourNurbsXld(const HTuple& Rows, const HTuple& Cols, const HString& Knots, const HString& Weights, Hlong Degree, double MaxError, double MaxDistance)

void HXLDCont::GenContourNurbsXld(const HTuple& Rows, const HTuple& Cols, const char* Knots, const char* Weights, Hlong Degree, double MaxError, double MaxDistance)

void HXLDCont::GenContourNurbsXld(const HTuple& Rows, const HTuple& Cols, const wchar_t* Knots, const wchar_t* Weights, Hlong Degree, double MaxError, double MaxDistance)   ( Windows only)

static void HOperatorSet.GenContourNurbsXld(out HObject contour, HTuple rows, HTuple cols, HTuple knots, HTuple weights, HTuple degree, HTuple maxError, HTuple maxDistance)

void HXLDCont.GenContourNurbsXld(HTuple rows, HTuple cols, HTuple knots, HTuple weights, int degree, HTuple maxError, HTuple maxDistance)

void HXLDCont.GenContourNurbsXld(HTuple rows, HTuple cols, string knots, string weights, int degree, double maxError, double maxDistance)

def gen_contour_nurbs_xld(rows: Sequence[float], cols: Sequence[float], knots: MaybeSequence[Union[str, float]], weights: MaybeSequence[Union[str, float]], degree: int, max_error: Union[float, str], max_distance: Union[float, str]) -> HObject

Description

gen_contour_nurbs_xldgen_contour_nurbs_xldGenContourNurbsXldGenContourNurbsXldgen_contour_nurbs_xld generates an XLD ContourContourContourcontourcontour that approximates a NURBS curve (non-uniform rational B-Spline curve). The NURBS curve is specified by its DegreeDegreeDegreedegreedegree, a control polygon (via RowsRowsRowsrowsrows and ColsColsColscolscols), a WeightsWeightsWeightsweightsweights vector and a KnotsKnotsKnotsknotsknots vector.

The DegreeDegreeDegreedegreedegree of the curve determines the grade of differentiability of the curve. The curve lies within the convex hull of its control polygon (RowsRowsRowsrowsrows,ColsColsColscolscols). The weights in WeightsWeightsWeightsweightsweights determine how much the curve is attracted by the individual control points (RowsRowsRowsrowsrows,ColsColsColscolscols). A WeightsWeightsWeightsweightsweights vector with equal weights for all control points is generated if 'auto'"auto""auto""auto""auto" is chosen. The KnotsKnotsKnotsknotsknots vector describes the domain of the curve. Typically, this parameter can be set to 'auto'"auto""auto""auto""auto".

The accuracy of the generated ContourContourContourcontourcontour depends on the two parameters MaxDistanceMaxDistanceMaxDistancemaxDistancemax_distance and MaxErrorMaxErrorMaxErrormaxErrormax_error. MaxDistanceMaxDistanceMaxDistancemaxDistancemax_distance limits the maximum distance of two subsequent ContourContourContourcontourcontour points. The maximum distance between the generated ContourContourContourcontourcontour and the actual NURBS curve is limited to MaxErrorMaxErrorMaxErrormaxErrormax_error. By default the approximation must fulfill both constraints, but it is possible to set one of these parameters to 'omit'"omit""omit""omit""omit". The lower MaxErrorMaxErrorMaxErrormaxErrormax_error and MaxDistanceMaxDistanceMaxDistancemaxDistancemax_distance are chosen the better is the approximation of the curve. Note that all ContourContourContourcontourcontour points lie exactly on the curve (except for numerical inaccuracies).

Definition

A NURBS curve of degree is given by The basis functions are defined by Thus, each NURBS curve is determined by its DegreeDegreeDegreedegreedegree , its control Polygon (RowsRowsRowsrowsrows and ColsColsColscolscols), its weight vector (WeightsWeightsWeightsweightsweights), and its knot vector (KnotsKnotsKnotsknotsknots).

The grade of differentiability of the curve is set via the degree . At least control points are required to form a valid curve. The knot vector describes the domain of the curve. Its length must be and its entries must be monotonically increasing. Every entry stands for a knot between the curve segments and . Each curve segment lies within the convex hull of the control points . For every curve segment of length zero, the differentiability at knot decreases. The number of occurrences of each knot in the knot vector is called multiplicity. The maximum multiplicity of one knot is . Only the start and the end point's multiplicity can be (which in fact is the case for most curves, because in this case start and end point of the curve correspond to the first respectively last point of the control polygon). If start and/or end point do not have full multiplicity, the domain of the curve is restricted to . The weights determine the influence of the individual control points on the curve.

Closed Curves: If start and end point are equal ( ) and KnotsKnotsKnotsknotsknots is set to 'auto'"auto""auto""auto""auto", the curve is closed automatically such that all knots feature multiplicity one. Note that in this case the length of WeightsWeightsWeightsweightsweights is required to be .

Execution Information

Parameters

ContourContourContourcontourcontour (output_object)  xld_cont objectHXLDContHObjectHObjectHobject *

The contour that approximates the NURBS curve.

RowsRowsRowsrowsrows (input_control)  coordinates.y-array HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Row coordinates of the control polygon.

Number of elements: Rows == Cols && Rows >= Degree + 1

ColsColsColscolscols (input_control)  coordinates.x-array HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Column coordinates of the control polygon.

Number of elements: Cols == Rows && Cols >= Degree + 1

KnotsKnotsKnotsknotsknots (input_control)  string(-array) HTupleMaybeSequence[Union[str, float]]HTupleHtuple (string / real) (string / double) (HString / double) (char* / double)

The knot vector .

Default: 'auto' "auto" "auto" "auto" "auto"

Suggested values: 'auto'"auto""auto""auto""auto"

WeightsWeightsWeightsweightsweights (input_control)  string(-array) HTupleMaybeSequence[Union[str, float]]HTupleHtuple (string / real) (string / double) (HString / double) (char* / double)

The weight vector .

Number of elements: Weights == Rows

Default: 'auto' "auto" "auto" "auto" "auto"

Suggested values: 'auto'"auto""auto""auto""auto"

Restriction: Weights > 0.0

DegreeDegreeDegreedegreedegree (input_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

The degree of the NURBS curve.

Default: 3

Suggested values: 2, 3, 4, 5

Restriction: Degree >= 2

MaxErrorMaxErrorMaxErrormaxErrormax_error (input_control)  real HTupleUnion[float, str]HTupleHtuple (real / string) (double / string) (double / HString) (double / char*)

Maximum distance between the NURBS curve and its approximation.

Default: 1.0

Suggested values: 'omit'"omit""omit""omit""omit", 1.0, 2.0, 3.0, 4.0, 5.0

Restriction: MaxError > 0.0

MaxDistanceMaxDistanceMaxDistancemaxDistancemax_distance (input_control)  real HTupleUnion[float, str]HTupleHtuple (real / string) (double / string) (double / HString) (double / char*)

Maximum distance between two subsequent ContourContourContourcontourcontour points.

Default: 5.0

Suggested values: 'omit'"omit""omit""omit""omit", 1.0, 2.0, 3.0, 4.0, 5.0

Restriction: MaxDistance > 0.0

Example (HDevelop)

* use a polygon XLD contour as control polygon and approximate
* the NURBS curve as contour

get_contour_xld(Polygon, Row, Col)
gen_contour_nurbs_xld(NURBSContour, Row, Col, 'auto', 'auto', 3, 1.0, 10.0)

Possible Predecessors

gen_nurbs_interpgen_nurbs_interpGenNurbsInterpGenNurbsInterpgen_nurbs_interp

Possible Successors

gen_polygons_xldgen_polygons_xldGenPolygonsXldGenPolygonsXldgen_polygons_xld

References

L. Piegl, W. Tiller: ”The NURBS Book”, 2nd Edition, Springer, 1997.

Module

Foundation