KlassenKlassenKlassenKlassen | | | | Operatoren

draw_nurbs_interpT_draw_nurbs_interpDrawNurbsInterpdraw_nurbs_interpDrawNurbsInterpDrawNurbsInterp (Operator)

Name

draw_nurbs_interpT_draw_nurbs_interpDrawNurbsInterpdraw_nurbs_interpDrawNurbsInterpDrawNurbsInterp — Interaktives Erstellen einer NURBS-Kurve durch Interpolation.

Signatur

draw_nurbs_interp( : ContOut : WindowHandle, Rotate, Move, Scale, KeepRatio, Degree : ControlRows, ControlCols, Knots, Rows, Cols, Tangents)

Herror T_draw_nurbs_interp(Hobject* ContOut, const Htuple WindowHandle, const Htuple Rotate, const Htuple Move, const Htuple Scale, const Htuple KeepRatio, const Htuple Degree, Htuple* ControlRows, Htuple* ControlCols, Htuple* Knots, Htuple* Rows, Htuple* Cols, Htuple* Tangents)

Herror draw_nurbs_interp(Hobject* ContOut, const HTuple& WindowHandle, const HTuple& Rotate, const HTuple& Move, const HTuple& Scale, const HTuple& KeepRatio, const HTuple& Degree, HTuple* ControlRows, HTuple* ControlCols, HTuple* Knots, HTuple* Rows, HTuple* Cols, HTuple* Tangents)

HXLDCont HXLDCont::DrawNurbsInterp(const HTuple& WindowHandle, const HTuple& Rotate, const HTuple& Move, const HTuple& Scale, const HTuple& KeepRatio, const HTuple& Degree, HTuple* ControlRows, HTuple* ControlCols, HTuple* Knots, HTuple* Rows, HTuple* Cols, HTuple* Tangents)

void DrawNurbsInterp(HObject* ContOut, const HTuple& WindowHandle, const HTuple& Rotate, const HTuple& Move, const HTuple& Scale, const HTuple& KeepRatio, const HTuple& Degree, HTuple* ControlRows, HTuple* ControlCols, HTuple* Knots, HTuple* Rows, HTuple* Cols, HTuple* Tangents)

void HXLDCont::DrawNurbsInterp(const HWindow& WindowHandle, const HString& Rotate, const HString& Move, const HString& Scale, const HString& KeepRatio, Hlong Degree, HTuple* ControlRows, HTuple* ControlCols, HTuple* Knots, HTuple* Rows, HTuple* Cols, HTuple* Tangents)

void HXLDCont::DrawNurbsInterp(const HWindow& WindowHandle, const char* Rotate, const char* Move, const char* Scale, const char* KeepRatio, Hlong Degree, HTuple* ControlRows, HTuple* ControlCols, HTuple* Knots, HTuple* Rows, HTuple* Cols, HTuple* Tangents)

HXLDCont HWindow::DrawNurbsInterp(const HString& Rotate, const HString& Move, const HString& Scale, const HString& KeepRatio, Hlong Degree, HTuple* ControlRows, HTuple* ControlCols, HTuple* Knots, HTuple* Rows, HTuple* Cols, HTuple* Tangents) const

HXLDCont HWindow::DrawNurbsInterp(const char* Rotate, const char* Move, const char* Scale, const char* KeepRatio, Hlong Degree, HTuple* ControlRows, HTuple* ControlCols, HTuple* Knots, HTuple* Rows, HTuple* Cols, HTuple* Tangents) const

void HOperatorSetX.DrawNurbsInterp(
[out] IHUntypedObjectX*ContOut, [in] VARIANT WindowHandle, [in] VARIANT Rotate, [in] VARIANT Move, [in] VARIANT Scale, [in] VARIANT KeepRatio, [in] VARIANT Degree, [out] VARIANT* ControlRows, [out] VARIANT* ControlCols, [out] VARIANT* Knots, [out] VARIANT* Rows, [out] VARIANT* Cols, [out] VARIANT* Tangents)

VARIANT HXLDContX.DrawNurbsInterp(
[in] IHWindowX* WindowHandle, [in] BSTR Rotate, [in] BSTR Move, [in] BSTR Scale, [in] BSTR KeepRatio, [in] Hlong Degree, [out] VARIANT* ControlCols, [out] VARIANT* Knots, [out] VARIANT* Rows, [out] VARIANT* Cols, [out] VARIANT* Tangents)

IHXLDContX* HWindowX.DrawNurbsInterp(
[in] BSTR Rotate, [in] BSTR Move, [in] BSTR Scale, [in] BSTR KeepRatio, [in] Hlong Degree, [out] VARIANT* ControlRows, [out] VARIANT* ControlCols, [out] VARIANT* Knots, [out] VARIANT* Rows, [out] VARIANT* Cols, [out] VARIANT* Tangents)

static void HOperatorSet.DrawNurbsInterp(out HObject contOut, HTuple windowHandle, HTuple rotate, HTuple move, HTuple scale, HTuple keepRatio, HTuple degree, out HTuple controlRows, out HTuple controlCols, out HTuple knots, out HTuple rows, out HTuple cols, out HTuple tangents)

void HXLDCont.DrawNurbsInterp(HWindow windowHandle, string rotate, string move, string scale, string keepRatio, int degree, out HTuple controlRows, out HTuple controlCols, out HTuple knots, out HTuple rows, out HTuple cols, out HTuple tangents)

HXLDCont HWindow.DrawNurbsInterp(string rotate, string move, string scale, string keepRatio, int degree, out HTuple controlRows, out HTuple controlCols, out HTuple knots, out HTuple rows, out HTuple cols, out HTuple tangents)

Beschreibung

draw_nurbs_interpdraw_nurbs_interpDrawNurbsInterpdraw_nurbs_interpDrawNurbsInterpDrawNurbsInterp liefert die Kontur ContOutContOutContOutContOutContOutcontOut einer NURBS-Kurve, die interaktiv durch den Benutzer im Fenster WindowHandleWindowHandleWindowHandleWindowHandleWindowHandlewindowHandle durch Interpolation erzeugt worden ist. Mit dem Operator draw_nurbsdraw_nurbsDrawNurbsdraw_nurbsDrawNurbsDrawNurbs ist es möglich eine NURBS-Kurve durch Zeichnen des Kontrollpolyongs zu erzeugen.

Zusätzlich zu ContOutContOutContOutContOutContOutcontOut werden die Kontrollinformation der Kurve (ControlRowsControlRowsControlRowsControlRowsControlRowscontrolRows,ControlColsControlColsControlColsControlColsControlColscontrolCols und KnotsKnotsKnotsKnotsKnotsknots), die vom Benutzer bestimmten Interpolationspunkte (RowsRowsRowsRowsRowsrows und ColsColsColsColsColscols) und die Tangenten im ersten und letzten Punkt der Kurve (TangentsTangentsTangentsTangentsTangentstangents) zurückgegeben. Tangents besteht aus den Y- (Zeilen) und X- (Spalten) Werten der Tangente im Startpunkt, gefolgt von den beiden Werten der Tangente im Endpunkt der Kurve.

Ein Gewichtsvektor wird nicht zurückgegeben, da dieser aus gleichen Einträgen besteht. Das heißt, dass 'auto'"auto""auto""auto""auto""auto" als Gewichtsvektor verwendet werden kann, wenn die Kontrollinformationen im Operator gen_contour_nurbs_xldgen_contour_nurbs_xldGenContourNurbsXldgen_contour_nurbs_xldGenContourNurbsXldGenContourNurbsXld verwendet werden. Mehr Informationen über NURBS-Kurven befinden sich in der Dokumentation des Operators gen_contour_nurbs_xldgen_contour_nurbs_xldGenContourNurbsXldgen_contour_nurbs_xldGenContourNurbsXldGenContourNurbsXld.

Direkt nach dem Aufruf von draw_nurbs_interpdraw_nurbs_interpDrawNurbsInterpdraw_nurbs_interpDrawNurbsInterpDrawNurbsInterp kann man durch Drücken der linken Maustaste an den gewünschten Positionen Interpolationspunkte hinzufügen. Sind genug Punkte vorhanden (mindestens DegreeDegreeDegreeDegreeDegreedegree-1), wird eine NURBS-Kurve, die durch alle Punkte geht berechnet und angezeigt.

Der zuletzt angehängte Punkt kann durch Drücken der Steuerungstaste (Strg, Ctrl) gelöscht werden. Sobald 3 Punkte vorhanden sind, werden der erste und der letzte Punkt durch ein zusätzliches Quadrat markiert. Durch Klicken darauf wird die Kontur geschlossen bzw. wieder geöffnet.

Außerdem werden die Tangenten (d.h. die erste Ableitung der Kurve) im ersten und im letzten Punkt der Kurve angezeigt. Diese Tangenten können durch Veschieben ihrer Endpunkte mit der Maus verändert werden.

Vorhandene Punkte können durch Ziehen mit der Maus bewegt werden. Außerdem können neue Punkte auf der Kurve eingefügt werden, indem man auf die gewünschte Position auf der Kurve mit der linken Maustaste klickt.

Durch Drücken der Umschalttaste kann in den Modus zum Transformieren der Kurve gewechselt werden. In diesem Modus kann die Kurve rotiert, verschoben und skaliert werden, jedoch nur wenn der entsprechende Parameter (RotateRotateRotateRotateRotaterotate, MoveMoveMoveMoveMovemove, ScaleScaleScaleScaleScalescale) auf 'true'"true""true""true""true""true" gesetzt wurde. Die Kurve wird zusammen mit einem Kreuz in der Mitte und einem Pfeil nach rechts, falls RotateRotateRotateRotateRotaterotate auf 'true'"true""true""true""true""true" gesetzt wurde, und einem Doppelpfeil, falls ScaleScaleScaleScaleScalescale auf 'true'"true""true""true""true""true" gesetzt wurde, dargestellt.

Die Kurve kann

Durch ein weiteres Drücken der Umschalttaste wechselt man zurück in den Editiermodus. Ein Klick mit der rechten Maustaste beendet die Prozedur. Unter OS X kann draw_nurbs_moddraw_nurbs_modDrawNurbsModdraw_nurbs_modDrawNurbsModDrawNurbsMod auch durch Drücken der Escape-Taste beendet werden.

Das Aussehen der Kurve beim Zeichnen wird durch die Linienbreite, den Linienstil und die Farbe bestimmt, die mit den Operatoren set_colorset_colorSetColorset_colorSetColorSetColor, set_coloredset_coloredSetColoredset_coloredSetColoredSetColored, set_line_widthset_line_widthSetLineWidthset_line_widthSetLineWidthSetLineWidth und set_line_styleset_line_styleSetLineStyleset_line_styleSetLineStyleSetLineStyle gesetzt werden können. Die Tangenten und alle Anfasser werden in der zweiten Farbe gezeichnet, die via set_colorset_colorSetColorset_colorSetColorSetColor oder set_coloredset_coloredSetColoredset_coloredSetColoredSetColored gesetzt wurde. Ihre Linienbreite ist fest auf 1 gesetzt, außerdem werden ihre Linien durchgezogen gezeichnet.

Achtung

Im Gegensatz zu draw_nurbsdraw_nurbsDrawNurbsdraw_nurbsDrawNurbsDrawNurbs hat jeder Punkt, der vom Nutzer vorgegeben wird, Einfluss auf die ganze Kurve. Wird ein Punkt bewegt, kann und wird sich die ganze Kurve ändern. Um diesen Effekt zu minimieren, empfehlen wir die Verwendung eines niedrigen Grades (3-5). Im Allgemeinen sind die Ergebnisse bei ungeradem Grad etwas besser als bei geradem. Außerdem ist es vorteilhaft, die Abstände aufeinanderfolgender Punkte ungefähr gleich zu wählen.

Parallelisierung

Parameter

ContOutContOutContOutContOutContOutcontOut (output_object)  xld_cont objectHXLDContHXLDContHXLDContHXLDContXHobject *

Kontur der Kurve.

WindowHandleWindowHandleWindowHandleWindowHandleWindowHandlewindowHandle (input_control)  window HWindow, HTupleHTupleHTupleHWindowX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Fenster-Handle.

RotateRotateRotateRotateRotaterotate (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Rotation ermöglichen?

Defaultwert: 'true' "true" "true" "true" "true" "true"

Werteliste: 'false'"false""false""false""false""false", 'true'"true""true""true""true""true"

MoveMoveMoveMoveMovemove (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Verschieben ermöglichen?

Defaultwert: 'true' "true" "true" "true" "true" "true"

Werteliste: 'false'"false""false""false""false""false", 'true'"true""true""true""true""true"

ScaleScaleScaleScaleScalescale (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Skalieren ermöglichen?

Defaultwert: 'true' "true" "true" "true" "true" "true"

Werteliste: 'false'"false""false""false""false""false", 'true'"true""true""true""true""true"

KeepRatioKeepRatioKeepRatioKeepRatioKeepRatiokeepRatio (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Seitenverhältnis beim Skalieren beibehalten?

Defaultwert: 'true' "true" "true" "true" "true" "true"

Werteliste: 'false'"false""false""false""false""false", 'true'"true""true""true""true""true"

DegreeDegreeDegreeDegreeDegreedegree (input_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Grad p der Kurve. Vernünftige Werte liegen zwischen 3 und 5.

Defaultwert: 3

Wertevorschläge: 2, 3, 4, 5

Restriktion: Degree >= 2 && Degree <= 9

ControlRowsControlRowsControlRowsControlRowsControlRowscontrolRows (output_control)  coordinates.y-array HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Zeilenkoordinaten des Kontrollpolygons.

ControlColsControlColsControlColsControlColsControlColscontrolCols (output_control)  coordinates.x-array HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Spaltenkoordinaten des Kontrollpolygons

KnotsKnotsKnotsKnotsKnotsknots (output_control)  real-array HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Knotenvektor.

RowsRowsRowsRowsRowsrows (output_control)  coordinates.y-array HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Zeilenkoordinaten der vom Benutzer bestimmten Punkte.

ColsColsColsColsColscols (output_control)  coordinates.x-array HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Spaltenkoordinaten der vom Benutzer bestimmten Punkte.

TangentsTangentsTangentsTangentsTangentstangents (output_control)  real-array HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Vom Benutzer bestimmte Tangenten.

Ergebnis

draw_nurbs_interpdraw_nurbs_interpDrawNurbsInterpdraw_nurbs_interpDrawNurbsInterpDrawNurbsInterp liefert den Wert 2 (H_MSG_TRUE), falls das Fenster gültig ist. Ansonsten wird eine Fehlerbehandlung durchgeführt.

Vorgänger

open_windowopen_windowOpenWindowopen_windowOpenWindowOpenWindow

Nachfolger

set_coloredset_coloredSetColoredset_coloredSetColoredSetColored, set_line_widthset_line_widthSetLineWidthset_line_widthSetLineWidthSetLineWidth, set_drawset_drawSetDrawset_drawSetDrawSetDraw, set_insertset_insertSetInsertset_insertSetInsertSetInsert

Alternativen

draw_xlddraw_xldDrawXlddraw_xldDrawXldDrawXld, draw_nurbsdraw_nurbsDrawNurbsdraw_nurbsDrawNurbsDrawNurbs

Siehe auch

draw_nurbs_interp_moddraw_nurbs_interp_modDrawNurbsInterpModdraw_nurbs_interp_modDrawNurbsInterpModDrawNurbsInterpMod, draw_nurbsdraw_nurbsDrawNurbsdraw_nurbsDrawNurbsDrawNurbs, gen_contour_nurbs_xldgen_contour_nurbs_xldGenContourNurbsXldgen_contour_nurbs_xldGenContourNurbsXldGenContourNurbsXld

Modul

Foundation


KlassenKlassenKlassenKlassen | | | | Operatoren