gen_nurbs_interpT_gen_nurbs_interpGenNurbsInterpGenNurbsInterpgen_nurbs_interp (算子)
名称
gen_nurbs_interpT_gen_nurbs_interpGenNurbsInterpGenNurbsInterpgen_nurbs_interp — 创建插值给定点的 NURBS 曲线的控制数据。
签名
def gen_nurbs_interp(rows: Sequence[float], cols: Sequence[float], tangents: Sequence[float], degree: int) -> Tuple[Sequence[float], Sequence[float], Sequence[float]]
描述
gen_nurbs_interpgen_nurbs_interpGenNurbsInterpGenNurbsInterpGenNurbsInterpgen_nurbs_interp creates the NURBS control data
CtrlRowsCtrlRowsCtrlRowsCtrlRowsctrlRowsctrl_rows, CtrlColsCtrlColsCtrlColsCtrlColsctrlColsctrl_cols, and KnotsKnotsKnotsKnotsknotsknots of a NURBS
curve that interpolates the input points (RowsRowsRowsRowsrowsrows, ColsColsColsColscolscols).
If the input point list is not closed (i.e., the first point is identical to
the last point), the tangents of the first and last point must be given
in TangentsTangentsTangentsTangentstangentstangents in the order [drow_{0},dcol_{0},drow_{n-1},dcol_{n-1}]
(for closed point lists, TangentsTangentsTangentsTangentstangentstangents must be an empty tuple).
Furthermore the DegreeDegreeDegreeDegreedegreedegree of the NURBS curve must be specified.
The output of gen_nurbs_interpgen_nurbs_interpGenNurbsInterpGenNurbsInterpGenNurbsInterpgen_nurbs_interp can be used directly with
gen_contour_nurbs_xldgen_contour_nurbs_xldGenContourNurbsXldGenContourNurbsXldGenContourNurbsXldgen_contour_nurbs_xld with the weights vector set to
'auto'"auto""auto""auto""auto""auto".
See the documentation of gen_contour_nurbs_xldgen_contour_nurbs_xldGenContourNurbsXldGenContourNurbsXldGenContourNurbsXldgen_contour_nurbs_xld for more information
on NURBS curves.
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
RowsRowsRowsRowsrowsrows (输入控制) coordinates.y-array → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Row coordinates of input point list.
元素数量:
Rows == Cols
ColsColsColsColscolscols (输入控制) coordinates.x-array → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Column coordinates of input point list.
元素数量:
Cols == Rows
TangentsTangentsTangentsTangentstangentstangents (输入控制) real-array → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Tangents at first and last point.
默认值:
[]
DegreeDegreeDegreeDegreedegreedegree (输入控制) integer → HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Order of the output curve.
默认值:
3
建议值:
2, 3, 4, 5
限制:
Degree >= 2
CtrlRowsCtrlRowsCtrlRowsCtrlRowsctrlRowsctrl_rows (输出控制) coordinates.y-array → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Row coordinates of the control polygon.
CtrlColsCtrlColsCtrlColsCtrlColsctrlColsctrl_cols (输出控制) coordinates.x-array → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Column coordinates of the control polygon.
元素数量:
Cols == Rows
KnotsKnotsKnotsKnotsknotsknots (输出控制) real-array → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
The knot vector of the output curve.
结果
If all input parameters are correct gen_nurbs_interpgen_nurbs_interpGenNurbsInterpGenNurbsInterpGenNurbsInterpgen_nurbs_interp 返回值 2 ( H_MSG_TRUE )。
可能的后继
gen_contour_nurbs_xldgen_contour_nurbs_xldGenContourNurbsXldGenContourNurbsXldGenContourNurbsXldgen_contour_nurbs_xld
另见
draw_nurbs_interpdraw_nurbs_interpDrawNurbsInterpDrawNurbsInterpDrawNurbsInterpdraw_nurbs_interp,
draw_nurbs_interp_moddraw_nurbs_interp_modDrawNurbsInterpModDrawNurbsInterpModDrawNurbsInterpModdraw_nurbs_interp_mod
参考文献
L. Piegl, W. Tiller: ”The NURBS Book”, 2nd Edition, Springer, 1997.
模块
基础