Dear all,
I am learning …
I met a problem after I divide a circle by 6 points when the circle is generated by picking a point in rhino and AddCircle.
After many rounds of coordinating with Chatjpt, I still got faulty feedback.
The script is below:
import rhinoscriptsyntax as rs
point = rs.GetObject ('select the center point',rs.filter.point)
point_coord = rs.PointCoordinates(point)
print(point_coord)
radius = rs.GetReal ("radius of new circle", 3.14, 1.0)
if radius:
curve = rs.AddCircle( (point_coord), radius )
print(curve)
points = rs.DivideCurve(curve, 6, True, True)
for point in points:
point_coord = rs.PointCoordinates(point)
rs.AddPoint(point_coord)
the feedback is
Message: Parameter must be a Guid or string representing a Guid
Traceback:
line 890, in coerceguid, "C:\Users\Lenovo\AppData\Roaming\McNeel\Rhinoceros\7.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rhinoscript\utility.py"
line 961, in coercegeometry, "C:\Users\Lenovo\AppData\Roaming\McNeel\Rhinoceros\7.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rhinoscript\utility.py"
line 778, in PointCoordinates, "C:\Users\Lenovo\AppData\Roaming\McNeel\Rhinoceros\7.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rhinoscript\geometry.py"
line 29, in <module>, "D:\024 Computational Design+design critic\Assignment\assignment_week 1.py"
I assume the divideCurve command causes this problem, but as a newbie, I haven’t figured out the correct way…
If someone can help, that will be an excellent thanks from me!!
Flora