8.9.24194.18121, 2024-07-12
import Rhino
torusA = Rhino.Geometry.Torus(
basePlane=Rhino.Geometry.Plane.WorldXY,
majorRadius=20.0,
minorRadius=10.0)
sEval = "torusA.IsValid"; print("{}: {}".format(sEval, eval(sEval)))
torusB = Rhino.Geometry.Torus(
Rhino.Geometry.Plane.WorldXY,
majorRadius=20.0,
minorRadius=10.0)
sEval = "torusB.IsValid"; print("{}: {}".format(sEval, eval(sEval)))
Python2 result:
torusA.IsValid: True
torusB.IsValid: True
Python3 result:
torusA.IsValid: False
torusB.IsValid: True
This isn’t limited to Geometry.Torus; calling (all?) other structure constructors also creates invalid geometry when the first parameter name is included.