ClassesClassesClassesClasses | | | | Operators

draw_nurbs_interpT_draw_nurbs_interpDrawNurbsInterpdraw_nurbs_interpDrawNurbsInterpDrawNurbsInterp (Operator)

Name

draw_nurbs_interpT_draw_nurbs_interpDrawNurbsInterpdraw_nurbs_interpDrawNurbsInterpDrawNurbsInterp — Interactive drawing of a NURBS curve using interpolation.

Signature

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)

Description

draw_nurbs_interpdraw_nurbs_interpDrawNurbsInterpdraw_nurbs_interpDrawNurbsInterpDrawNurbsInterp returns the contour ContOutContOutContOutContOutContOutcontOut of a NURBS curve of degree DegreeDegreeDegreeDegreeDegreedegree, which has been created interactively by the user in the window WindowHandleWindowHandleWindowHandleWindowHandleWindowHandlewindowHandle using interpolation. That means, that the user specifies a set of points and the operator computes the parameters of a NURBS curve that includes this points. By contrast, using the Operator draw_nurbsdraw_nurbsDrawNurbsdraw_nurbsDrawNurbsDrawNurbs it is possible to create a NURBS curve by drawing its control polygon.

In addition to ContOutContOutContOutContOutContOutcontOut, the control information of the curve (ControlRowsControlRowsControlRowsControlRowsControlRowscontrolRows, ControlColsControlColsControlColsControlColsControlColscontrolCols, and KnotsKnotsKnotsKnotsKnotsknots), the interpolation points (RowsRowsRowsRowsRowsrows, ColsColsColsColsColscols) specified by the user and the tangents at the first and the last point (TangentsTangentsTangentsTangentsTangentstangents) are returned. TangentsTangentsTangentsTangentsTangentstangents consists of four values. The first two values correspond to the y (row) and the x (column) value of the tangent at the start of the curve and the second two values to the tangent at the end of the curve, respectively.

The weight vector is not returned because it consists of equal entries. As a consequence, one can use 'auto'"auto""auto""auto""auto""auto" as weight vector if the control information is used in a subsequent call to the operator gen_contour_nurbs_xldgen_contour_nurbs_xldGenContourNurbsXldgen_contour_nurbs_xldGenContourNurbsXldGenContourNurbsXld. For more information on NURBS see the documentation of gen_contour_nurbs_xldgen_contour_nurbs_xldGenContourNurbsXldgen_contour_nurbs_xldGenContourNurbsXldGenContourNurbsXld.

Directly after calling draw_nurbs_interpdraw_nurbs_interpDrawNurbsInterpdraw_nurbs_interpDrawNurbsInterpDrawNurbsInterp, you can add interpolation points by clicking with the left mouse button in the window at the desired positions. If enough points are specified (at least DegreeDegreeDegreeDegreeDegreedegree-1), a NURBS curve that goes through all specified points (in the order of their generation) is computed and displayed.

When there are three points or more, the first and the last point will be marked with an additional square. By clicking on them you can close the curve or open it again. You delete the point appended last by pressing the Ctrl key.

The tangents (i.e. the first derivative of the curve) of the first and the last point are displayed as lines. They can be modified by dragging their ends using the mouse.

Existing points can be moved by dragging them with the mouse. Further new points on the curve can be inserted by a left click on the desired position on the curve.

By pressing the Shift key, you can switch into the transformation mode. In this mode you can rotate, move, and scale the curve as a whole, but only if you set the parameters RotateRotateRotateRotateRotaterotate, MoveMoveMoveMoveMovemove, and ScaleScaleScaleScaleScalescale, respectively, to 'true'"true""true""true""true""true". Instead of the pick points and the two tangents, 3 symbols are displayed with the curve: a cross in the middle and an arrow to the right if RotateRotateRotateRotateRotaterotate is set to 'true'"true""true""true""true""true", and a double-headed arrow to the upper right if ScaleScaleScaleScaleScalescale is set to 'true'"true""true""true""true""true".

You can

By pressing the Shift key again you can switch back to the edit mode. Pressing the right mouse button terminates the procedure. On Mac OS X draw_nurbs_interpdraw_nurbs_interpDrawNurbsInterpdraw_nurbs_interpDrawNurbsInterpDrawNurbsInterp can also be terminated by pressing the escape key.

The appearance of the curve while drawing is determined by the line width, size, and color set via the operators set_colorset_colorSetColorset_colorSetColorSetColor, set_coloredset_coloredSetColoredset_coloredSetColoredSetColored, set_line_widthset_line_widthSetLineWidthset_line_widthSetLineWidthSetLineWidth, and set_line_styleset_line_styleSetLineStyleset_line_styleSetLineStyleSetLineStyle. The tangents and all handles are displayed in the second color set by set_colorset_colorSetColorset_colorSetColorSetColor or set_coloredset_coloredSetColoredset_coloredSetColoredSetColored. Their line width is fixed to 1 and their line style is fixed to a drawn-through line.

Attention

In contrast to draw_nurbsdraw_nurbsDrawNurbsdraw_nurbsDrawNurbsDrawNurbs, each point specified by the user influences the whole curve. Thus, if one point is moved, the whole curve can and will change. To minimize this effects, it is recommended to use a small degree (3-5) and to place the points such that they are approximately equally spaced. In general, uneven degrees will perform slightly better than even degrees.

Parallelization

Parameters

ContOutContOutContOutContOutContOutcontOut (output_object)  xld_cont objectHXLDContHXLDContHXLDContHXLDContXHobject *

Contour of the curve.

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

Window identifier.

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

Enable rotation?

Default value: 'true' "true" "true" "true" "true" "true"

List of values: 'false'"false""false""false""false""false", 'true'"true""true""true""true""true"

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

Enable moving?

Default value: 'true' "true" "true" "true" "true" "true"

List of values: 'false'"false""false""false""false""false", 'true'"true""true""true""true""true"

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

Enable scaling?

Default value: 'true' "true" "true" "true" "true" "true"

List of values: 'false'"false""false""false""false""false", 'true'"true""true""true""true""true"

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

Keep ratio while scaling?

Default value: 'true' "true" "true" "true" "true" "true"

List of values: 'false'"false""false""false""false""false", 'true'"true""true""true""true""true"

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

The degree p of the NURBS curve. Reasonable values are 3 to 5.

Default value: 3

Suggested values: 2, 3, 4, 5

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

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

Row coordinates of the control polygon.

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

Column coordinates of the control polygon.

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

Knot vector.

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

Row coordinates of the points specified by the user.

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

Column coordinates of the points specified by the user.

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

Tangents specified by the user.

Result

draw_nurbs_interpdraw_nurbs_interpDrawNurbsInterpdraw_nurbs_interpDrawNurbsInterpDrawNurbsInterp returns 2 (H_MSG_TRUE), if the window is valid. If necessary, an exception is raised.

Possible Predecessors

open_windowopen_windowOpenWindowopen_windowOpenWindowOpenWindow

Possible Successors

set_coloredset_coloredSetColoredset_coloredSetColoredSetColored, set_line_widthset_line_widthSetLineWidthset_line_widthSetLineWidthSetLineWidth, set_drawset_drawSetDrawset_drawSetDrawSetDraw, set_insertset_insertSetInsertset_insertSetInsertSetInsert

Alternatives

draw_xlddraw_xldDrawXlddraw_xldDrawXldDrawXld, draw_nurbsdraw_nurbsDrawNurbsdraw_nurbsDrawNurbsDrawNurbs

See also

draw_nurbs_interp_moddraw_nurbs_interp_modDrawNurbsInterpModdraw_nurbs_interp_modDrawNurbsInterpModDrawNurbsInterpMod, draw_nurbsdraw_nurbsDrawNurbsdraw_nurbsDrawNurbsDrawNurbs, gen_contour_nurbs_xldgen_contour_nurbs_xldGenContourNurbsXldgen_contour_nurbs_xldGenContourNurbsXldGenContourNurbsXld

Module

Foundation


ClassesClassesClassesClasses | | | | Operators