gen_contour_nurbs_xldT_gen_contour_nurbs_xldGenContourNurbsXldGenContourNurbsXld (Operator)

Name

gen_contour_nurbs_xldT_gen_contour_nurbs_xldGenContourNurbsXldGenContourNurbsXld — 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)

Beschreibung

Der Operator gen_contour_nurbs_xldgen_contour_nurbs_xldGenContourNurbsXldGenContourNurbsXldGenContourNurbsXld erzeugt eine XLD Kontur ContourContourContourContourcontour, die eine NURBS-Kurve (nicht uniformer, rationaler B-Spline) approximiert. Eine NURBS-Kurve wird spezifiziert durch ihren Grad DegreeDegreeDegreeDegreedegree, ihr Kontrollpolygon (RowsRowsRowsRowsrows,ColsColsColsColscols), ihren Gewichtsvektor WeightsWeightsWeightsWeightsweights und ihren Knotenvektor KnotsKnotsKnotsKnotsknots.

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

Die Genauigkeit der approximierenden Kontur ContourContourContourContourcontour wird durch die Parameter MaxDistanceMaxDistanceMaxDistanceMaxDistancemaxDistance und MaxErrorMaxErrorMaxErrorMaxErrormaxError bestimmt. Ersterer ist die maximale Distanz von zwei aufeinanderfolgenden Punkten in der approximierenden Kontur ContourContourContourContourcontour. Der zweite Parameter entspricht dem maximalen Abstand der Approximation ContourContourContourContourcontour 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" 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 ContourContourContourContourcontour genau auf der Kurve (bis auf numerische Ungenauigkeiten).

Definition

Eine NURBS Kurve C von Grad p is definiert durch Die Basis Funktionen N_{i,p} sind gegeben durch

Eine NURBS-Kurve ist also definiert durch ihren Grad p (DegreeDegreeDegreeDegreedegree), ihr Kontrollpolygon P_{0},...,P_{n-1} (RowsRowsRowsRowsrows und ColsColsColsColscols), ihren Gewichtsvektor w = (w_{0}, ..., w_{n-1}) (WeightsWeightsWeightsWeightsweights) und ihren Knotenvektor u = (u_{0}, ..., u_{n+p}) (KnotsKnotsKnotsKnotsknots).

Der Grad der Differenzierbarkeit der Kurve wird bestimmt durch p. Mindestens p+1 Kontrollpunkte werden benötigt, um eine gültige Kurve zu definieren. Der Knotenvektur u beschreibt den Träger der Kurve. Die Länge dieses Vektors muss genau n+p+1 betragen und die Einträge müssen monoton steigend sein. Jeder Eintrag u_{i} entspricht dem Knoten zwischen den beiden Kurvensegmenten [u_{i-1},u_{i}) und [u_{i},u_{i+1}). Jedes Kurvensegment [u_{i},u_{i+1}) liegt innerhalb der konvexen Hülle der Kontrollpunkte P_{i-p}, ..., P_{i}. Für jedes Intervall, dessen Länge null ist, sinkt der Grad der Differenzierbarkeit des Knotens k. Die Anzahl der Vorkommen eines Knotens im Knotenvektor wird als Multiplizität bezeichnet. Die maximale Multiplizität eines Knotens ist p. Ausnahme sind Start- und Endpunkt, deren Multiplizität p+1 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 [u_{p},u_{n}] beschränkt. Die Gewichte w_{i} bestimmen den Einfluss der jeweiligen Kontrollpunkte P_{i} auf die Kurve.

Geschlossene Kurven. Sind Start- und Endpunkt gleich (P_{0} = P_{n-1}) und der Knotenvektor KnotsKnotsKnotsKnotsknots auf 'auto' gesetzt, wird die Kurve automatisch geschlossen, so dass die Multiplizität aller Knoten eins ist. Falls ein Gewichtsvektor WeightsWeightsWeightsWeightsweights angegeben wird, muss dessen Länge in diesem Fall n-1 betragen.

Ausführungsinformationen

Parameter

ContourContourContourContourcontour (output_object)  xld_cont objectHXLDContHXLDContHobject *

Die Kontur, die die Kurve approximiert.

RowsRowsRowsRowsrows (input_control)  coordinates.y-array HTupleHTupleHtuple (real) (double) (double) (double)

Zeilenkoordinaten des Kontrollpolygons.

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

ColsColsColsColscols (input_control)  coordinates.x-array HTupleHTupleHtuple (real) (double) (double) (double)

Spaltenkoordinaten des Kontrollpolygons.

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

KnotsKnotsKnotsKnotsknots (input_control)  string(-array) HTupleHTupleHtuple (string / real) (string / double) (HString / double) (char* / double)

Der Knotenvektor u.

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

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

WeightsWeightsWeightsWeightsweights (input_control)  string(-array) HTupleHTupleHtuple (string / real) (string / double) (HString / double) (char* / double)

Der Gewichtsvektor w.

Parameteranzahl: Weights == Rows

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

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

Restriktion: Weights > 0.0

DegreeDegreeDegreeDegreedegree (input_control)  integer HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Grad p der Kurve.

Defaultwert: 3

Wertevorschläge: 2, 3, 4, 5

Restriktion: Degree >= 2

MaxErrorMaxErrorMaxErrorMaxErrormaxError (input_control)  real HTupleHTupleHtuple (real / string) (double / string) (double / HString) (double / char*)

Maximale Distanz zwischen Approximation und Kurve.

Defaultwert: 1.0

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

Restriktion: MaxError > 0.0

MaxDistanceMaxDistanceMaxDistanceMaxDistancemaxDistance (input_control)  real HTupleHTupleHtuple (real / string) (double / string) (double / HString) (double / char*)

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

Defaultwert: 5.0

Wertevorschläge: '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_interpGenNurbsInterpGenNurbsInterpGenNurbsInterp

Nachfolger

gen_polygons_xldgen_polygons_xldGenPolygonsXldGenPolygonsXldGenPolygonsXld

Literatur

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

Modul

Foundation