Find points at which to cut a pair of curves so that a fillet of a specified radius fits. A fillet point is a pair of points (point0, point1) such that there is a circle of radius tangent to curve curve0 at point0 and tangent to curve curve1 at point1.
Of all possible fillet points, this function returns the one which is the closest to the base point base_point_0, base_point_1. Distance from the base point is measured by the sum of arc lengths along the two curves.
rhinoscriptsyntax.CurveFilletPoints (curve_id_0, curve_id_1, radius=1.0, base_point_0=None, base_point_1=None, return_points=True)
rhinoscript.curve.CurveFilletPoints (curve_id_0, curve_id_1, radius=1.0, base_point_0=None, base_point_1=None, return_points=True)
curve_id_0 |
Required. String or Guid. The identifier of the first curve object. |
curve_id_1 |
Required. String or Guid. The identifier of the second curve object. |
radius |
Optional. Number. The fillet radius. If omitted, a radius of 1.0 is specified. |
base_point_0 |
Optional. The base point on the first curve. If omitted, the starting point of the curve is used. |
base_point_1 |
Optional. The base point on the second curve. If omitted, the starting point of the curve is used. |
return_points |
Optional. If True (default), then the fillet points are returned. Otherwise, a fillet curve is created and it's identifieris returned. |
List |
If return_points is True, then a list of point and vector values if successful. The list elements are as follows:
|
||||||||||||
Guid |
If return_points is False, then the identifier of the fillet curve if successful. |
||||||||||||
None |
If not successful, or on error. |
import rhinoscriptsyntax as rs
curve0 = rs.AddLine([0,0,0], [5,1,0])
curve1 = rs.AddLine([0,0,0], [1,5,0])
fillet = rs.CurveFilletPoints(curve0, curve1)
if fillet:
rs.AddPoint( fillet[0] )
rs.AddPoint( fillet[1] )
rs.AddPoint( fillet[2] )