draw_nurbs_modT_draw_nurbs_modDrawNurbsModDrawNurbsModdraw_nurbs_mod (Operator)

Name

draw_nurbs_modT_draw_nurbs_modDrawNurbsModDrawNurbsModdraw_nurbs_mod — Interactive modification of a NURBS curve.

Warning

This operator does not work in an HDevelop graphics window opened with dev_open_window.

Signature

draw_nurbs_mod( : ContOut : WindowHandle, Rotate, Move, Scale, KeepRatio, Edit, Degree, RowsIn, ColsIn, WeightsIn : Rows, Cols, Weights)

Herror T_draw_nurbs_mod(Hobject* ContOut, const Htuple WindowHandle, const Htuple Rotate, const Htuple Move, const Htuple Scale, const Htuple KeepRatio, const Htuple Edit, const Htuple Degree, const Htuple RowsIn, const Htuple ColsIn, const Htuple WeightsIn, Htuple* Rows, Htuple* Cols, Htuple* Weights)

void DrawNurbsMod(HObject* ContOut, const HTuple& WindowHandle, const HTuple& Rotate, const HTuple& Move, const HTuple& Scale, const HTuple& KeepRatio, const HTuple& Edit, const HTuple& Degree, const HTuple& RowsIn, const HTuple& ColsIn, const HTuple& WeightsIn, HTuple* Rows, HTuple* Cols, HTuple* Weights)

void HXLDCont::DrawNurbsMod(const HWindow& WindowHandle, const HString& Rotate, const HString& Move, const HString& Scale, const HString& KeepRatio, const HString& Edit, Hlong Degree, const HTuple& RowsIn, const HTuple& ColsIn, const HTuple& WeightsIn, HTuple* Rows, HTuple* Cols, HTuple* Weights)

void HXLDCont::DrawNurbsMod(const HWindow& WindowHandle, const char* Rotate, const char* Move, const char* Scale, const char* KeepRatio, const char* Edit, Hlong Degree, const HTuple& RowsIn, const HTuple& ColsIn, const HTuple& WeightsIn, HTuple* Rows, HTuple* Cols, HTuple* Weights)

void HXLDCont::DrawNurbsMod(const HWindow& WindowHandle, const wchar_t* Rotate, const wchar_t* Move, const wchar_t* Scale, const wchar_t* KeepRatio, const wchar_t* Edit, Hlong Degree, const HTuple& RowsIn, const HTuple& ColsIn, const HTuple& WeightsIn, HTuple* Rows, HTuple* Cols, HTuple* Weights)   (Windows only)

HXLDCont HWindow::DrawNurbsMod(const HString& Rotate, const HString& Move, const HString& Scale, const HString& KeepRatio, const HString& Edit, Hlong Degree, const HTuple& RowsIn, const HTuple& ColsIn, const HTuple& WeightsIn, HTuple* Rows, HTuple* Cols, HTuple* Weights) const

HXLDCont HWindow::DrawNurbsMod(const char* Rotate, const char* Move, const char* Scale, const char* KeepRatio, const char* Edit, Hlong Degree, const HTuple& RowsIn, const HTuple& ColsIn, const HTuple& WeightsIn, HTuple* Rows, HTuple* Cols, HTuple* Weights) const

HXLDCont HWindow::DrawNurbsMod(const wchar_t* Rotate, const wchar_t* Move, const wchar_t* Scale, const wchar_t* KeepRatio, const wchar_t* Edit, Hlong Degree, const HTuple& RowsIn, const HTuple& ColsIn, const HTuple& WeightsIn, HTuple* Rows, HTuple* Cols, HTuple* Weights) const   (Windows only)

static void HOperatorSet.DrawNurbsMod(out HObject contOut, HTuple windowHandle, HTuple rotate, HTuple move, HTuple scale, HTuple keepRatio, HTuple edit, HTuple degree, HTuple rowsIn, HTuple colsIn, HTuple weightsIn, out HTuple rows, out HTuple cols, out HTuple weights)

void HXLDCont.DrawNurbsMod(HWindow windowHandle, string rotate, string move, string scale, string keepRatio, string edit, int degree, HTuple rowsIn, HTuple colsIn, HTuple weightsIn, out HTuple rows, out HTuple cols, out HTuple weights)

HXLDCont HWindow.DrawNurbsMod(string rotate, string move, string scale, string keepRatio, string edit, int degree, HTuple rowsIn, HTuple colsIn, HTuple weightsIn, out HTuple rows, out HTuple cols, out HTuple weights)

def draw_nurbs_mod(window_handle: HHandle, rotate: str, move: str, scale: str, keep_ratio: str, edit: str, degree: int, rows_in: Sequence[float], cols_in: Sequence[float], weights_in: Sequence[float]) -> Tuple[HObject, Sequence[float], Sequence[float], Sequence[float]]

Description

draw_nurbs_moddraw_nurbs_modDrawNurbsModDrawNurbsModDrawNurbsModdraw_nurbs_mod returns the contour ContOutContOutContOutContOutcontOutcont_out and control information (RowsRowsRowsRowsrowsrows, ColsColsColsColscolscols, and WeightsWeightsWeightsWeightsweightsweights) of a NURBS curve of degree DegreeDegreeDegreeDegreedegreedegree, which has been interactively modified by the user in the window WindowHandleWindowHandleWindowHandleWindowHandlewindowHandlewindow_handle. For additional information concerning NURBS curves, see the documentation of gen_contour_nurbs_xldgen_contour_nurbs_xldGenContourNurbsXldGenContourNurbsXldGenContourNurbsXldgen_contour_nurbs_xld. To use the control information RowsRowsRowsRowsrowsrows, ColsColsColsColscolscols, and WeightsWeightsWeightsWeightsweightsweights in a subsequent call to the operator gen_contour_nurbs_xldgen_contour_nurbs_xldGenContourNurbsXldGenContourNurbsXldGenContourNurbsXldgen_contour_nurbs_xld, the knot vector KnotsKnotsKnotsKnotsknotsknots should be set to 'auto'"auto""auto""auto""auto""auto".

The input NURBS curve is specified by its control polygon (RowsInRowsInRowsInRowsInrowsInrows_in, ColsInColsInColsInColsIncolsIncols_in), its weight vector WeightsInWeightsInWeightsInWeightsInweightsInweights_in and its degree DegreeDegreeDegreeDegreedegreedegree. The knot vector is assumed to be uniform (i.e. 'auto'"auto""auto""auto""auto""auto" in gen_contour_nurbs_xldgen_contour_nurbs_xldGenContourNurbsXldGenContourNurbsXldGenContourNurbsXldgen_contour_nurbs_xld).

You can modify the curve in two ways: by editing the control polygon, e.g., by inserting or moving control points, or by transforming the contour as a whole, e.g., by rotating moving or scaling it. Note that you can only edit the control polygon if EditEditEditEditeditedit is set to 'true'"true""true""true""true""true". Similarly, you can only rotate, move or scale it if RotateRotateRotateRotaterotaterotate, MoveMoveMoveMovemovemove, and ScaleScaleScaleScalescalescale, respectively, are set to 'true'"true""true""true""true""true".

draw_nurbs_moddraw_nurbs_modDrawNurbsModDrawNurbsModDrawNurbsModdraw_nurbs_mod starts in the transformation mode. In this mode, the curve is displayed together with 3 symbols: 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". To switch into the edit mode, press the Shift key; by pressing it again, you can switch back into the transformation mode.

Transformation Mode

Edit Mode

In this mode, the curve is displayed together with its control polygon. Start and end point are marked by an additional square and the point which was handled last is surrounded by a circle representing its weight. You can perform the following modifications:

Pressing the right mouse button terminates the procedure. On macOS draw_nurbs_moddraw_nurbs_modDrawNurbsModDrawNurbsModDrawNurbsModdraw_nurbs_mod 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_colorSetColorSetColorSetColorset_color, set_coloredset_coloredSetColoredSetColoredSetColoredset_colored, set_line_widthset_line_widthSetLineWidthSetLineWidthSetLineWidthset_line_width, and set_line_styleset_line_styleSetLineStyleSetLineStyleSetLineStyleset_line_style. The control polygon and all handles are displayed in the second color set by set_colorset_colorSetColorSetColorSetColorset_color or set_coloredset_coloredSetColoredSetColoredSetColoredset_colored. Their line width is fixed to 1 and their line style is fixed to a drawn-through line.

Execution Information

Parameters

ContOutContOutContOutContOutcontOutcont_out (output_object)  xld_cont objectHXLDContHObjectHXLDContHobject *

Contour of the modified curve.

WindowHandleWindowHandleWindowHandleWindowHandlewindowHandlewindow_handle (input_control)  window HWindow, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Window handle.

RotateRotateRotateRotaterotaterotate (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (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 HTuplestrHTupleHtuple (string) (string) (HString) (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 HTuplestrHTupleHtuple (string) (string) (HString) (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"

KeepRatioKeepRatioKeepRatioKeepRatiokeepRatiokeep_ratio (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (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"

EditEditEditEditeditedit (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Enable editing?

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 HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

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

Default value: 3

Suggested values: 2, 3, 4, 5

Restriction: Degree >= 2

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

Row coordinates of the input control polygon.

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

Column coordinates of the input control polygon.

WeightsInWeightsInWeightsInWeightsInweightsInweights_in (input_control)  real-array HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Input weight vector.

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

Row coordinates of the control polygon.

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

Columns coordinates of the control polygon.

WeightsWeightsWeightsWeightsweightsweights (output_control)  real-array HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Weight vector.

Result

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

Possible Predecessors

open_windowopen_windowOpenWindowOpenWindowOpenWindowopen_window

Possible Successors

set_coloredset_coloredSetColoredSetColoredSetColoredset_colored, set_line_widthset_line_widthSetLineWidthSetLineWidthSetLineWidthset_line_width, set_drawset_drawSetDrawSetDrawSetDrawset_draw, set_insertset_insertSetInsertSetInsertSetInsertset_insert

Alternatives

draw_nurbs_interp_moddraw_nurbs_interp_modDrawNurbsInterpModDrawNurbsInterpModDrawNurbsInterpModdraw_nurbs_interp_mod, draw_xld_moddraw_xld_modDrawXldModDrawXldModDrawXldModdraw_xld_mod

See also

draw_nurbsdraw_nurbsDrawNurbsDrawNurbsDrawNurbsdraw_nurbs, draw_nurbs_interpdraw_nurbs_interpDrawNurbsInterpDrawNurbsInterpDrawNurbsInterpdraw_nurbs_interp, gen_contour_nurbs_xldgen_contour_nurbs_xldGenContourNurbsXldGenContourNurbsXldGenContourNurbsXldgen_contour_nurbs_xld

Module

Foundation