How to create ObjectBase from geometry

python

#1

Hi all i try to get GeometryBase from Geometry to use GeometryEquals to delete identical geometry because if one object gets selected more than ones creates different Object.Ids…so Sets are not possible otherwise i could write set(list1+list2) to only different objects.

But i dont know how to create a geometry base from a Geometry.
small example is very appreciated


(David Andres Leon) #2

Hi @flokart. Objects that inherit from GeometryBase can be geometrically tested with GeometryEquals like this:

Rhino.Geometry.GeometryBase.GeometryEquals(Curve1, Curve2)

or more specifically

Rhino.Geometry.Curve.GeometryEquals(Curve1, Curve2)

You’ll get a True/False return value. Hope this helps.


#3

Thanks David,

i was confused because
rh.Geometry.Curve.GeometryEquals(GeometryBase,GeometryBase)
ask for GeometryBase and not for the Geometry…so GeometryBase is the Geometry and cant be constructed like a AreaMassObject for example?