draw_nurbs_interp_modT_draw_nurbs_interp_modDrawNurbsInterpModDrawNurbsInterpModdraw_nurbs_interp_mod (算子)

名称

draw_nurbs_interp_modT_draw_nurbs_interp_modDrawNurbsInterpModDrawNurbsInterpModdraw_nurbs_interp_mod — 使用插值交互式修改 NURBS 曲线。

警告

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

签名

draw_nurbs_interp_mod( : ContOut : WindowHandle, Rotate, Move, Scale, KeepRatio, Edit, Degree, RowsIn, ColsIn, TangentsIn : ControlRows, ControlCols, Knots, Rows, Cols, Tangents)

Herror T_draw_nurbs_interp_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 TangentsIn, Htuple* ControlRows, Htuple* ControlCols, Htuple* Knots, Htuple* Rows, Htuple* Cols, Htuple* Tangents)

void DrawNurbsInterpMod(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& TangentsIn, HTuple* ControlRows, HTuple* ControlCols, HTuple* Knots, HTuple* Rows, HTuple* Cols, HTuple* Tangents)

void HXLDCont::DrawNurbsInterpMod(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& TangentsIn, HTuple* ControlRows, HTuple* ControlCols, HTuple* Knots, HTuple* Rows, HTuple* Cols, HTuple* Tangents)

void HXLDCont::DrawNurbsInterpMod(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& TangentsIn, HTuple* ControlRows, HTuple* ControlCols, HTuple* Knots, HTuple* Rows, HTuple* Cols, HTuple* Tangents)

void HXLDCont::DrawNurbsInterpMod(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& TangentsIn, HTuple* ControlRows, HTuple* ControlCols, HTuple* Knots, HTuple* Rows, HTuple* Cols, HTuple* Tangents)   ( Windows only)

HXLDCont HWindow::DrawNurbsInterpMod(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& TangentsIn, HTuple* ControlRows, HTuple* ControlCols, HTuple* Knots, HTuple* Rows, HTuple* Cols, HTuple* Tangents) const

HXLDCont HWindow::DrawNurbsInterpMod(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& TangentsIn, HTuple* ControlRows, HTuple* ControlCols, HTuple* Knots, HTuple* Rows, HTuple* Cols, HTuple* Tangents) const

HXLDCont HWindow::DrawNurbsInterpMod(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& TangentsIn, HTuple* ControlRows, HTuple* ControlCols, HTuple* Knots, HTuple* Rows, HTuple* Cols, HTuple* Tangents) const   ( Windows only)

static void HOperatorSet.DrawNurbsInterpMod(out HObject contOut, HTuple windowHandle, HTuple rotate, HTuple move, HTuple scale, HTuple keepRatio, HTuple edit, HTuple degree, HTuple rowsIn, HTuple colsIn, HTuple tangentsIn, out HTuple controlRows, out HTuple controlCols, out HTuple knots, out HTuple rows, out HTuple cols, out HTuple tangents)

void HXLDCont.DrawNurbsInterpMod(HWindow windowHandle, string rotate, string move, string scale, string keepRatio, string edit, int degree, HTuple rowsIn, HTuple colsIn, HTuple tangentsIn, out HTuple controlRows, out HTuple controlCols, out HTuple knots, out HTuple rows, out HTuple cols, out HTuple tangents)

HXLDCont HWindow.DrawNurbsInterpMod(string rotate, string move, string scale, string keepRatio, string edit, int degree, HTuple rowsIn, HTuple colsIn, HTuple tangentsIn, out HTuple controlRows, out HTuple controlCols, out HTuple knots, out HTuple rows, out HTuple cols, out HTuple tangents)

def draw_nurbs_interp_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], tangents_in: Sequence[float]) -> Tuple[HObject, Sequence[float], Sequence[float], Sequence[float], Sequence[float], Sequence[float], Sequence[float]]

描述

draw_nurbs_interp_moddraw_nurbs_interp_modDrawNurbsInterpModDrawNurbsInterpModDrawNurbsInterpModdraw_nurbs_interp_mod returns the contour ContOutContOutContOutContOutcontOutcont_out of a NURBS curve of degree DegreeDegreeDegreeDegreedegreedegree, which has been modified interactively by the user in the window WindowHandleWindowHandleWindowHandleWindowHandlewindowHandlewindow_handle

In addition to ContOutContOutContOutContOutcontOutcont_out the control information of the curve (ControlRowsControlRowsControlRowsControlRowscontrolRowscontrol_rows, ControlColsControlColsControlColsControlColscontrolColscontrol_cols, 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_xldGenContourNurbsXldGenContourNurbsXldGenContourNurbsXldgen_contour_nurbs_xld。For more information on NURBS see the documentation of gen_contour_nurbs_xldgen_contour_nurbs_xldGenContourNurbsXldGenContourNurbsXldGenContourNurbsXldgen_contour_nurbs_xld

The input curve is specified by the interpolation points (RowsInRowsInRowsInRowsInrowsInrows_in, ColsInColsInColsInColsIncolsIncols_in), its degree DegreeDegreeDegreeDegreedegreedegree and the tangents TangentsInTangentsInTangentsInTangentsIntangentsIntangents_in, such that draw_nurbs_interp_moddraw_nurbs_interp_modDrawNurbsInterpModDrawNurbsInterpModDrawNurbsInterpModdraw_nurbs_interp_mod can be applied to the output data of draw_nurbs_interpdraw_nurbs_interpDrawNurbsInterpDrawNurbsInterpDrawNurbsInterpdraw_nurbs_interp

You can modify the curve in two ways: by editing the interpolation points, e.g., by inserting or moving points, or by transforming the curve as a whole, e.g., by rotating moving or scaling it. Note that you can only edit the curve 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_interp_moddraw_nurbs_interp_modDrawNurbsInterpModDrawNurbsInterpModDrawNurbsInterpModdraw_nurbs_interp_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

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

Edit Mode

In this mode, the curve is displayed together with its interpolation points and the start and end tangent. Start and end point are marked by an additional square. You can perform the following modifications:

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_colorset_colorSetColorSetColorSetColorset_color, set_coloredset_coloredSetColoredSetColoredSetColoredset_colored, set_line_widthset_line_widthSetLineWidthSetLineWidthSetLineWidthset_line_width, and set_line_styleset_line_styleSetLineStyleSetLineStyleSetLineStyleset_line_style。The tangents 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.

注意

In contrast to draw_nurbsdraw_nurbsDrawNurbsDrawNurbsDrawNurbsdraw_nurbs, 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.

执行信息

参数

ContOutContOutContOutContOutcontOutcont_out (输出对象)  xld_cont objectHXLDContHObjectHXLDContHobject *

Contour of the modified curve.

WindowHandleWindowHandleWindowHandleWindowHandlewindowHandlewindow_handle (输入控制)  window HWindow, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

窗口句柄。

RotateRotateRotateRotaterotaterotate (输入控制)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Enable rotation?

默认值: 'true' "true" "true" "true" "true" "true"

值列表: 'false'"false""false""false""false""false", 'true'"true""true""true""true""true"

MoveMoveMoveMovemovemove (输入控制)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Enable moving?

默认值: 'true' "true" "true" "true" "true" "true"

值列表: 'false'"false""false""false""false""false", 'true'"true""true""true""true""true"

ScaleScaleScaleScalescalescale (输入控制)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Enable scaling?

默认值: 'true' "true" "true" "true" "true" "true"

值列表: 'false'"false""false""false""false""false", 'true'"true""true""true""true""true"

KeepRatioKeepRatioKeepRatioKeepRatiokeepRatiokeep_ratio (输入控制)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Keep ratio while scaling?

默认值: 'true' "true" "true" "true" "true" "true"

值列表: 'false'"false""false""false""false""false", 'true'"true""true""true""true""true"

EditEditEditEditeditedit (输入控制)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Enable editing?

默认值: 'true' "true" "true" "true" "true" "true"

值列表: 'false'"false""false""false""false""false", 'true'"true""true""true""true""true"

DegreeDegreeDegreeDegreedegreedegree (输入控制)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

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

默认值: 3

建议值: 2, 3, 4, 5

限制: Degree >= 2 && Degree <= 9

RowsInRowsInRowsInRowsInrowsInrows_in (输入控制)  coordinates.y-array HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Row coordinates of the input interpolation points.

ColsInColsInColsInColsIncolsIncols_in (输入控制)  coordinates.x-array HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Column coordinates of the input interpolation points.

TangentsInTangentsInTangentsInTangentsIntangentsIntangents_in (输入控制)  real-array HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Input tangents.

ControlRowsControlRowsControlRowsControlRowscontrolRowscontrol_rows (输出控制)  coordinates.y-array HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Row coordinates of the control polygon.

ControlColsControlColsControlColsControlColscontrolColscontrol_cols (输出控制)  coordinates.x-array HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Column coordinates of the control polygon.

KnotsKnotsKnotsKnotsknotsknots (输出控制)  real-array HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Knot vector.

RowsRowsRowsRowsrowsrows (输出控制)  coordinates.y-array HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Row coordinates of the points specified by the user.

ColsColsColsColscolscols (输出控制)  coordinates.x-array HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Column coordinates of the points specified by the user.

TangentsTangentsTangentsTangentstangentstangents (输出控制)  real-array HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Tangents specified by the user.

结果

draw_nurbs_interp_moddraw_nurbs_interp_modDrawNurbsInterpModDrawNurbsInterpModDrawNurbsInterpModdraw_nurbs_interp_mod returns 2 ( H_MSG_TRUE) , if the window is valid。如有必要,则抛出异常。

可能的前趋

open_windowopen_windowOpenWindowOpenWindowOpenWindowopen_window

可能的后继

set_coloredset_coloredSetColoredSetColoredSetColoredset_colored, set_line_widthset_line_widthSetLineWidthSetLineWidthSetLineWidthset_line_width, set_drawset_drawSetDrawSetDrawSetDrawset_draw, set_insertset_insertSetInsertSetInsertSetInsertset_insert

替代

draw_xld_moddraw_xld_modDrawXldModDrawXldModDrawXldModdraw_xld_mod, draw_nurbs_moddraw_nurbs_modDrawNurbsModDrawNurbsModDrawNurbsModdraw_nurbs_mod

另见

draw_nurbs_interpdraw_nurbs_interpDrawNurbsInterpDrawNurbsInterpDrawNurbsInterpdraw_nurbs_interp, gen_contour_nurbs_xldgen_contour_nurbs_xldGenContourNurbsXldGenContourNurbsXldGenContourNurbsXldgen_contour_nurbs_xld

模块

基础