Hi all,
When I code in py3 using the scriptEditor in RhinoBETA (on MacbookPro 2019), I noticed that some of the RhinoScriptSyntax commands do not work. I am not sure if it is related to my system or is a general bug in the library but I wanted to share. Please find the commands and the related errors below. Thanks!
circleCenterPoint()
Script
import rhinoscriptsyntax as rs
id = rs.GetObject("Select circle")
if rs.IsCircle(id):
point = rs.CircleCenterPoint(id)
rs.AddPoint( point )
Error
Traceback (most recent call last):
File “file:///Users/ozanbalci/.rhinocode/stage/faujyaps.15w”, line 4, in
File “/Users/ozanbalci/.rhinocode/py39-rh8/site-rhinopython/rhinoscript/curve.py”, line 797, in CircleCenterPoint
rc, circle = curve.TryGetCircle(Rhino.RhinoMath.ZeroTolerance)
TypeError: No method matches given arguments for Curve.TryGetCircle: (<class ‘float’>)
circleRadius()
Script
import rhinoscriptsyntax as rs
id = rs.GetObject("Select circle")
if rs.IsCircle(id):
radius = rs.CircleRadius(id)
print ('Circle radius:', radius)
Error
Traceback (most recent call last):
File “file:///Users/ozanbalci/.rhinocode/stage/faujyaps.15w”, line 5, in
File “/Users/ozanbalci/.rhinocode/py39-rh8/site-rhinopython/rhinoscript/curve.py”, line 850, in CircleRadius
rc, circle = curve.TryGetCircle( Rhino.RhinoMath.ZeroTolerance )
TypeError: No method matches given arguments for Curve.TryGetCircle: (<class ‘float’>)
lineMinDistanceTo() (works but returns incorrect distance only if try to find the min distance between 2 circles)
Script
import rhinoscriptsyntax as rs
circle1 = rs.AddCircle((0,0,0),10)
circle2 = rs.AddCircle((30,0,0),10)
print(rs.LineMinDistanceTo(circle1,circle2))
Problem
It should return ‘10’ but returns ‘30’.
Best,
Ozan.