通过直线、圆弧或顺滑的过渡,延伸一个未闭合的曲线物件直到其与选中的物件相交。
rhinoscriptsyntax.ExtendCurve (curve_id, extension_type, side, boundary_object_ids)
rhinoscript.curve.ExtendCurve (curve_id, extension_type, side, boundary_object_ids)
curve_id |
必须参数。字符串或 Guid。物件的 ID 。 |
||||||||
extension_type |
必须参数。数字。延伸的类型。
|
||||||||
side |
必须参数。数字。延伸方向。
|
||||||||
boundary_object_ids |
必须参数。列表或元组。作为边界的曲线、曲面和多重曲面物件的 ID。 |
Guid |
执行成功,返回延伸物件的ID。 |
None |
如果执行不成功或出错,返回空值。 |
import rhinoscriptsyntax as rs
filter = rs.filter.curve | rs.filter.surface | rs.filter.polysurface
objects = rs.GetObjects("Select boundary objects", filter)
if objects:
curve = rs.GetObject("Select curve to extend", rs.filter.curve)
if curve: rs.ExtendCurve( curve, 2, 1, objects )