Hello,
I am trying to query the end points i.e. vertices of an edge in revit.
I tried using edge.AsCurve().GetEndPoint(0/1), which is returning the correct endpoints as an object of XYZ class.
But I also want a unique identifier of each vertex so that I can eliminate the overlapping vertices from my processing while creating Boundary Represenation of a revit body.
I tried using Edge.GetHashCode() which works good for Revit Edges i.e the hash code for an edge queried from one face is same when we get the same edge in another face.
But XYZ.GetHashCode() is not returning same code for end points that are common for different edges/faces.
Am I querying the end points correctly?
Is there any other way to query a unique identifier for the revit vertices and even edges?
Thanks & Regards,
Chintan
Solved! Go to Solution.
Solved by jeremytammik. Go to Solution.
Hi Jeremy,
Using Dicionary for assigning unique ids to curve endpoints (XYZ) worked for me.
Thanks a lot!!!
~Chintan
Dear Chintan,
Thank you for your confirmation and marking the issue as solved.
I recapitulate our discussion on The Building Coder for future reference:
Cheers,
Jeremy
Can't find what you're looking for? Ask the community or share your knowledge.