Anyone know how to generate a circle around a curve via python API? Trying to use Circle(Point3d, Vector3d, Point3d) but I think I am missing something. I am trying to target one curve’s start and endpoint to dictate center point and direction (vector).
Thanks !
import Rhino
import rhinoscriptsyntax as rs
import scriptcontext
master_obj_list = rs.AllObjects()
for obj in master_obj_list:
if rs.ObjectType(obj) == 4:
print("This is ID is the curve " + str(obj))
target_crv = rs.coercecurve(obj)
print target_crv
print type(target_crv.PointAtLength(0))
vectorOne = Rhino.Geometry.Vector3d(target_crv.PointAtLength(0))
circleOne = Rhino.Geometry.Circle(target_crv.PointAtLength(0), vectorOne, target_crv.PointAtLength(1))
scriptcontext.doc.ActiveDoc.Views.Redraw