Point3d object can't be compared to None

I don’t expect this to gather a lot of support, but many of the RhinoScriptSyntax functions use/return Point3d objects and they can’t be compared to None.

import Rhino.Geometry as rg
ImportantPoint = rg.Point3d(1,2,3)
if ImportantPoint == None:
    print('Not Defined Yet')

Complains that

TypeError: No method matches given arguments for Point3d.op_Equality: (<class ‘NoneType’>)

Instead of setting the default value of my objects to None, I thought I would create an “empty” Point3d object and then use the IsValid to see if it is defined yet. But that doesn’t work because even an empty Point3d is still valid because it defaults to the origin.

Q = rg.Point3d()
print(Q.IsValid)  <- True

Back to the old try:except block :slight_smile:

Hi Henry - this, and a number of other type errors, has been fixed.

Incidentally, the dev pointed out that using “== None” is not ideal - preferably, use “is None”

-Pascal