Measure Distance between Elements

Measure Distance between Elements

Anonymous
Not applicable
2,490 Views
1 Reply
Message 1 of 2

Measure Distance between Elements

Anonymous
Not applicable

Hi all,

I have been trying to get distance between two Elements in my C# plugin

 

prajwalraob_0-1595484371686.png

 

Have tried to get distance between faces by iteration thru all faces (distance between origins), but could not accurate results.

 

In dynamo we can get this by using Geometry.DistanceTo node, is there a way to call this functionality in my plugin?

 

prajwalraob_1-1595484671940.png

 

From what I researched and tried, I could not convert Revit Solid to Designscript Geometry to use in the above Function. Is there an alternative?

 

Pleas suggest if there is any other way to achieve this.

 

Thanks in advance.

 

 

2,491 Views
1 Reply
Reply (1)
Message 2 of 2

snabil76
Participant
Participant

simply get the origin of each element and draw line between each 2 point then get the line length

or you can check the distance direct by XYZ.DistanceTo

hope if i covered your question

 

Best Regards,

Sameh Nabil

0 Likes