gen_contour_nurbs_xldT_gen_contour_nurbs_xldGenContourNurbsXldGenContourNurbsXldgen_contour_nurbs_xld (Operator)

Name

gen_contour_nurbs_xldT_gen_contour_nurbs_xldGenContourNurbsXldGenContourNurbsXldgen_contour_nurbs_xld — Erzeugen einer XLD Kontur anhand einer NURBS Kurve.

Signatur

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)   (Nur Windows)

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

Beschreibung

Der Operator gen_contour_nurbs_xldgen_contour_nurbs_xldGenContourNurbsXldGenContourNurbsXldGenContourNurbsXldgen_contour_nurbs_xld erzeugt eine XLD Kontur ContourContourContourContourcontourcontour, die eine NURBS-Kurve (nicht uniformer, rationaler B-Spline) approximiert. Eine NURBS-Kurve wird spezifiziert durch ihren Grad DegreeDegreeDegreeDegreedegreedegree, ihr Kontrollpolygon (RowsRowsRowsRowsrowsrows,ColsColsColsColscolscols), ihren Gewichtsvektor WeightsWeightsWeightsWeightsweightsweights und ihren Knotenvektor KnotsKnotsKnotsKnotsknotsknots.

Der Grad DegreeDegreeDegreeDegreedegreedegree der Kurve bestimmt den Grad ihrer Differenzierbarkeit. Die Kurve liegt innerhalb der konvexen Hülle ihres Kontrollpolygons (RowsRowsRowsRowsrowsrows,ColsColsColsColscolscols). Die Gewichte in WeightsWeightsWeightsWeightsweightsweights beschreiben, wie stark die Kurve von den jeweiligen Kontrollpunkten angezogen wird. Wird 'auto'"auto""auto""auto""auto""auto" als Gewichtsvektor WeightsWeightsWeightsWeightsweightsweights ausgewählt, erhalten alle Kontrollpunkte das gleiche Gewicht. Der Knotenvektor KnotsKnotsKnotsKnotsknotsknots beschreibt den Träger der Kurve und kann im Normalfall auf 'auto'"auto""auto""auto""auto""auto" gesetzt werden.

Die Genauigkeit der approximierenden Kontur ContourContourContourContourcontourcontour wird durch die Parameter MaxDistanceMaxDistanceMaxDistanceMaxDistancemaxDistancemax_distance und MaxErrorMaxErrorMaxErrorMaxErrormaxErrormax_error bestimmt. Ersterer ist die maximale Distanz von zwei aufeinanderfolgenden Punkten in der approximierenden Kontur ContourContourContourContourcontourcontour. Der zweite Parameter entspricht dem maximalen Abstand der Approximation ContourContourContourContourcontourcontour von der eigentlichen Kurve. Normalerweise muss die Approximation beide Bedingungen erfüllen, es ist aber möglich, durch Setzen des Wertes auf 'omit'"omit""omit""omit""omit""omit" eine der beiden Bedingungen wegzulassen. Je niedriger diese beiden Parameter gewählt werden, desto besser ist die Approximation der Kurve. Unabhängig von der Wahl der Parameter liegen alle Punkte der Kontur ContourContourContourContourcontourcontour genau auf der Kurve (bis auf numerische Ungenauigkeiten).

Definition

Eine NURBS Kurve von Grad is definiert durch Die Basis Funktionen sind gegeben durch

Eine NURBS-Kurve ist also definiert durch ihren Grad (DegreeDegreeDegreeDegreedegreedegree), ihr Kontrollpolygon (RowsRowsRowsRowsrowsrows und ColsColsColsColscolscols), ihren Gewichtsvektor (WeightsWeightsWeightsWeightsweightsweights) und ihren Knotenvektor (KnotsKnotsKnotsKnotsknotsknots).

Der Grad der Differenzierbarkeit der Kurve wird bestimmt durch . Mindestens Kontrollpunkte werden benötigt, um eine gültige Kurve zu definieren. Der Knotenvektor beschreibt den Träger der Kurve. Die Länge dieses Vektors muss genau betragen und die Einträge müssen monoton steigend sein. Jeder Eintrag entspricht dem Knoten zwischen den beiden Kurvensegmenten und . Jedes Kurvensegment liegt innerhalb der konvexen Hülle der Kontrollpunkte . Für jedes Intervall, dessen Länge null ist, sinkt der Grad der Differenzierbarkeit des Knotens . Die Anzahl der Vorkommen eines Knotens im Knotenvektor wird als Multiplizität bezeichnet. Die maximale Multiplizität eines Knotens ist . Ausnahme sind Start- und Endpunkt, deren Multiplizität betragen kann. Das ist auch die Regel, da in diesem Fall Start- und Endpunkt der Kurve im ersten bzw. letzten Punkt des Kontrollpolygons liegen. Falls Start- oder Endpunkt nicht volle Multiplizität besitzen, ist der Träger der Kurve auf das Intervall beschränkt. Die Gewichte bestimmen den Einfluss der jeweiligen Kontrollpunkte auf die Kurve.

Geschlossene Kurven. Sind Start- und Endpunkt gleich ( ) und der Knotenvektor KnotsKnotsKnotsKnotsknotsknots auf 'auto'"auto""auto""auto""auto""auto" gesetzt, wird die Kurve automatisch geschlossen, so dass die Multiplizität aller Knoten eins ist. Falls ein Gewichtsvektor WeightsWeightsWeightsWeightsweightsweights angegeben wird, muss dessen Länge in diesem Fall betragen.

Ausführungsinformationen

Parameter

ContourContourContourContourcontourcontour (output_object)  xld_cont objectHXLDContHObjectHXLDContHobject *

Die Kontur, die die Kurve approximiert.

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

Zeilenkoordinaten des Kontrollpolygons.

Parameteranzahl: Rows == Cols && Rows >= Degree + 1

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

Spaltenkoordinaten des Kontrollpolygons.

Parameteranzahl: Cols == Rows && Cols >= Degree + 1

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

Der Knotenvektor .

Defaultwert: 'auto' "auto" "auto" "auto" "auto" "auto"

Wertevorschläge: 'auto'"auto""auto""auto""auto""auto"

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

Der Gewichtsvektor .

Parameteranzahl: Weights == Rows

Defaultwert: 'auto' "auto" "auto" "auto" "auto" "auto"

Wertevorschläge: 'auto'"auto""auto""auto""auto""auto"

Restriktion: Weights > 0.0

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

Grad der Kurve.

Defaultwert: 3

Wertevorschläge: 2, 3, 4, 5

Restriktion: Degree >= 2

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

Maximale Distanz zwischen Approximation und Kurve.

Defaultwert: 1.0

Wertevorschläge: 'omit'"omit""omit""omit""omit""omit", 1.0, 2.0, 3.0, 4.0, 5.0

Restriktion: MaxError > 0.0

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

Maximaler Abstand zweier aufeinander folgender Punkte in der approximierten Kontur ContourContourContourContourcontourcontour.

Defaultwert: 5.0

Wertevorschläge: 'omit'"omit""omit""omit""omit""omit", 1.0, 2.0, 3.0, 4.0, 5.0

Restriktion: MaxDistance > 0.0

Beispiel (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)

Vorgänger

gen_nurbs_interpgen_nurbs_interpGenNurbsInterpGenNurbsInterpGenNurbsInterpgen_nurbs_interp

Nachfolger

gen_polygons_xldgen_polygons_xldGenPolygonsXldGenPolygonsXldGenPolygonsXldgen_polygons_xld

Literatur

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

Modul

Foundation