Skip to content

draw_nurbs_modDrawNurbsModDrawNurbsModdraw_nurbs_modT_draw_nurbs_mod🔗

Short description🔗

draw_nurbs_modDrawNurbsModDrawNurbsModdraw_nurbs_modT_draw_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( out xld_cont ContOut, window WindowHandle, string Rotate, string Move, string Scale, string KeepRatio, string Edit, integer Degree, coordinates.y RowsIn, coordinates.x ColsIn, real WeightsIn, out coordinates.y Rows, out coordinates.x Cols, out real 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 )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 )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]]

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

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 )

Description🔗

draw_nurbs_modDrawNurbsMod returns the contour ContOutcontOutcont_out and control information (Rowsrowsrows, Colscolscols, and Weightsweightsweights) of a NURBS curve of degree Degreedegreedegree, which has been interactively modified by the user in the window WindowHandlewindowHandlewindow_handle. For additional information concerning NURBS curves, see the documentation of gen_contour_nurbs_xldGenContourNurbsXld. To use the control information Rowsrowsrows, Colscolscols, and Weightsweightsweights in a subsequent call to the operator gen_contour_nurbs_xldGenContourNurbsXld, the knot vector Knotsknotsknots should be set to 'auto'"auto".

The input NURBS curve is specified by its control polygon (RowsInrowsInrows_in, ColsIncolsIncols_in), its weight vector WeightsInweightsInweights_in and its degree Degreedegreedegree. The knot vector is assumed to be uniform (i.e. 'auto'"auto" in gen_contour_nurbs_xldGenContourNurbsXld).

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 Editeditedit is set to 'true'"true". Similarly, you can only rotate, move or scale it if Rotaterotaterotate, Movemovemove, and Scalescalescale, respectively, are set to 'true'"true".

draw_nurbs_modDrawNurbsMod 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 Rotaterotaterotate is set to 'true'"true", and a double-headed arrow to the upper right if Scalescalescale is set to '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🔗

In this mode a curve can be rotated, moved and scaled, as long as the respective parameter Rotaterotaterotate, Movemovemove and Scalescalescale are set to 'true'"true". The curve is displayed along with a cross in its center, an arrow pointing to the right (if Rotaterotaterotate is set to 'true'"true"), and a double arrow (if Scalescalescale is set to 'true'"true").

  • To move the curve, click with the left mouse button on the cross in the center and then drag it to the new position, i.e., keep the mouse button pressed while moving the mouse.

  • To rotate it, click with the left mouse button on the arrow and then drag it, till the curve has the right direction.

  • Scaling is achieved by dragging the double arrow. To keep the ratio, the parameter KeepRatiokeepRatiokeep_ratio has to be set to 'true'"true".

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:

  • To append control points, click with the left mouse button in the window and a new point is added at this position.

  • You can delete the point appended last by pressing the Ctrl key.

  • To move a point, drag it with the mouse.

  • To insert a point on the control polygon, click on the desired position on the polygon.

  • To close respectively open the curve, click on the first or on the last control point.

  • You can modify the weight of a control point by first clicking on the point itself (if it is not already the point which was modified or created last) and then dragging the circle around the point.

Pressing the right mouse button terminates the procedure.

The appearance of the curve while drawing is determined by the line width, size and color set via the operators set_colorSetColor, set_coloredSetColored, set_line_widthSetLineWidth, and set_line_styleSetLineStyle. The control polygon and all handles are displayed in the second color set by set_colorSetColor or set_coloredSetColored. Their line width is fixed to 1 and their line style is fixed to a drawn-through line.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

Parameters🔗

ContOutcontOutcont_out (output_object) xld_cont → objectHObjectHXLDContHObjectHobject *

Contour of the modified curve.

WindowHandlewindowHandlewindow_handle (input_control) window → (handle)HTuple (HHandle)HWindow, HTuple (IntPtr)HHandleHtuple (handle)

Window handle.

Rotaterotaterotate (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

Enable rotation?

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

Movemovemove (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

Enable moving?

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

Scalescalescale (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

Enable scaling?

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

KeepRatiokeepRatiokeep_ratio (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

Keep ratio while scaling?

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

Editeditedit (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

Enable editing?

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

Degreedegreedegree (input_control) integer → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

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

Default: 33
Suggested values: 2, 3, 4, 52, 3, 4, 5
Restriction: Degree >= 2

RowsInrowsInrows_in (input_control) coordinates.y-array → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Row coordinates of the input control polygon.

ColsIncolsIncols_in (input_control) coordinates.x-array → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Column coordinates of the input control polygon.

WeightsInweightsInweights_in (input_control) real-array → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Input weight vector.

Rowsrowsrows (output_control) coordinates.y-array → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Row coordinates of the control polygon.

Colscolscols (output_control) coordinates.x-array → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Columns coordinates of the control polygon.

Weightsweightsweights (output_control) real-array → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Weight vector.

Result🔗

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

Combinations with other operators🔗

Combinations

Possible predecessors

open_windowOpenWindow

Possible successors

set_coloredSetColored, set_line_widthSetLineWidth, set_drawSetDraw

Alternatives

draw_nurbs_interp_modDrawNurbsInterpMod, draw_xld_modDrawXldMod

See also

draw_nurbsDrawNurbs, draw_nurbs_interpDrawNurbsInterp, gen_contour_nurbs_xldGenContourNurbsXld

Module🔗

Foundation