HALCON Reference Manual 10.0.2
Table of Contents / Graphics / Drawing ClassesClassesClasses | | | Operators

draw_nurbs_interp_modT_draw_nurbs_interp_moddraw_nurbs_interp_modDrawNurbsInterpModDrawNurbsInterpMod (Operator)

Name

draw_nurbs_interp_modT_draw_nurbs_interp_moddraw_nurbs_interp_modDrawNurbsInterpModDrawNurbsInterpMod — Interactive modification of a NURBS curve using interpolation.

Signature

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)

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

HXLDCont HXLDCont::DrawNurbsInterpMod(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 HOperatorSetX.DrawNurbsInterpMod(
[out] IHUntypedObjectX*ContOut, [in] VARIANT WindowHandle, [in] VARIANT Rotate, [in] VARIANT Move, [in] VARIANT Scale, [in] VARIANT KeepRatio, [in] VARIANT Edit, [in] VARIANT Degree, [in] VARIANT RowsIn, [in] VARIANT ColsIn, [in] VARIANT TangentsIn, [out] VARIANT* ControlRows, [out] VARIANT* ControlCols, [out] VARIANT* Knots, [out] VARIANT* Rows, [out] VARIANT* Cols, [out] VARIANT* Tangents)

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

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

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)

Description

draw_nurbs_interp_moddraw_nurbs_interp_moddraw_nurbs_interp_modDrawNurbsInterpModDrawNurbsInterpMod returns the contour ContOutContOutContOutContOutcontOut of a NURBS curve of degree DegreeDegreeDegreeDegreedegree, which has been modified interactively by the user in the window WindowHandleWindowHandleWindowHandleWindowHandlewindowHandle.

In addition to ContOutContOutContOutContOutcontOut the control information of the curve (ControlRowsControlRowsControlRowsControlRowscontrolRows, ControlColsControlColsControlColsControlColscontrolCols, and KnotsKnotsKnotsKnotsknots), the interpolation points (RowsRowsRowsRowsrows, ColsColsColsColscols) specified by the user and the tangents at the first and the last point (TangentsTangentsTangentsTangentstangents) are returned. TangentsTangentsTangentsTangentstangents 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" as weight vector, if the control information is used in a subsequent call to the operator gen_contour_nurbs_xldgen_contour_nurbs_xldgen_contour_nurbs_xldGenContourNurbsXldGenContourNurbsXld. For more information on NURBS see the documentation of gen_contour_nurbs_xldgen_contour_nurbs_xldgen_contour_nurbs_xldGenContourNurbsXldGenContourNurbsXld.

The input curve is specified by the interpolation points (RowsInRowsInRowsInRowsInrowsIn, ColsInColsInColsInColsIncolsIn), its degree DegreeDegreeDegreeDegreedegree and the tangents TangentsInTangentsInTangentsInTangentsIntangentsIn, such that draw_nurbs_interp_moddraw_nurbs_interp_moddraw_nurbs_interp_modDrawNurbsInterpModDrawNurbsInterpMod can be applied to the output data of draw_nurbs_interpdraw_nurbs_interpdraw_nurbs_interpDrawNurbsInterpDrawNurbsInterp.

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 EditEditEditEditedit is set to 'true'"true""true""true""true". Similarly, you can only rotate, move or scale it if RotateRotateRotateRotaterotate, MoveMoveMoveMovemove, and ScaleScaleScaleScalescale, respectively, are set to 'true'"true""true""true""true".

draw_nurbs_interp_moddraw_nurbs_interp_moddraw_nurbs_interp_modDrawNurbsInterpModDrawNurbsInterpMod 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 RotateRotateRotateRotaterotate is set to 'true'"true""true""true""true", and a double-headed arrow to the upper right if ScaleScaleScaleScalescale is set to '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 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_colorset_colorSetColorSetColor, set_coloredset_coloredset_coloredSetColoredSetColored, set_line_widthset_line_widthset_line_widthSetLineWidthSetLineWidth, and set_line_styleset_line_styleset_line_styleSetLineStyleSetLineStyle. The tangents and all handles are displayed in the second color set by set_colorset_colorset_colorSetColorSetColor or set_coloredset_coloredset_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_nurbsdraw_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

ContOutContOutContOutContOutcontOut (output_object)  xld_cont objectHXLDContHXLDContHXLDContXHobject *

Contour of the modified curve.

WindowHandleWindowHandleWindowHandleWindowHandlewindowHandle (input_control)  window HWindow, HTupleHTupleHWindowX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong)

Window identifier.

RotateRotateRotateRotaterotate (input_control)  string HTupleHTupleVARIANTHtuple (string) (string) (char*) (BSTR) (char*)

Enable rotation?

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

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

MoveMoveMoveMovemove (input_control)  string HTupleHTupleVARIANTHtuple (string) (string) (char*) (BSTR) (char*)

Enable moving?

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

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

ScaleScaleScaleScalescale (input_control)  string HTupleHTupleVARIANTHtuple (string) (string) (char*) (BSTR) (char*)

Enable scaling?

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

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

KeepRatioKeepRatioKeepRatioKeepRatiokeepRatio (input_control)  string HTupleHTupleVARIANTHtuple (string) (string) (char*) (BSTR) (char*)

Keep ratio while scaling?

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

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

EditEditEditEditedit (input_control)  string HTupleHTupleVARIANTHtuple (string) (string) (char*) (BSTR) (char*)

Enable editing?

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

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

DegreeDegreeDegreeDegreedegree (input_control)  integer HTupleHTupleVARIANTHtuple (integer) (int / long) (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)

RowsInRowsInRowsInRowsInrowsIn (input_control)  coordinates.y-array HTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double)

Row coordinates of the input interpolation points.

ColsInColsInColsInColsIncolsIn (input_control)  coordinates.x-array HTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double)

Column coordinates of the input interpolation points.

TangentsInTangentsInTangentsInTangentsIntangentsIn (input_control)  real-array HTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double)

Input tangents.

ControlRowsControlRowsControlRowsControlRowscontrolRows (output_control)  coordinates.y-array HTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double)

Row coordinates of the control polygon.

ControlColsControlColsControlColsControlColscontrolCols (output_control)  coordinates.x-array HTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double)

Column coordinates of the control polygon.

KnotsKnotsKnotsKnotsknots (output_control)  real-array HTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double)

Knot vector.

RowsRowsRowsRowsrows (output_control)  coordinates.y-array HTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double)

Row coordinates of the points specified by the user.

ColsColsColsColscols (output_control)  coordinates.x-array HTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double)

Column coordinates of the points specified by the user.

TangentsTangentsTangentsTangentstangents (output_control)  real-array HTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double)

Tangents specified by the user.

Result

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

Possible Predecessors

open_windowopen_windowopen_windowOpenWindowOpenWindow

Possible Successors

set_coloredset_coloredset_coloredSetColoredSetColored, set_line_widthset_line_widthset_line_widthSetLineWidthSetLineWidth, set_drawset_drawset_drawSetDrawSetDraw, set_insertset_insertset_insertSetInsertSetInsert

Alternatives

draw_xld_moddraw_xld_moddraw_xld_modDrawXldModDrawXldMod, draw_nurbs_moddraw_nurbs_moddraw_nurbs_modDrawNurbsModDrawNurbsMod

See also

draw_nurbs_interpdraw_nurbs_interpdraw_nurbs_interpDrawNurbsInterpDrawNurbsInterp, gen_contour_nurbs_xldgen_contour_nurbs_xldgen_contour_nurbs_xldGenContourNurbsXldGenContourNurbsXld

Module

Foundation


Table of Contents / Graphics / Drawing ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH