Perpendicular Distance

HI guys…how can I find the perpendicular distance between two lines whether be parallel or not

If they aren’t parallel then how are you defining perpendicular?

We sort of need a sketch showing what you are after. Upload here or use a 3rd party hosting service such as Dropbox, Google drive, onedrive, box, etc…

1 Like

is there any way…?..and what if be perpendicular?

Not entirely sure but you could try point.project using the tangent vector of one line as the direction… but again it’s help to see what condition you’ve got and what you’re after.

2 Likes

If they aren’t parallel then the distance will vary depending where you measure at - the problem is flawed at the outset.

If you know the curves are parallel, then any point adjacent to the other curve could report the distance using closest point to the other curve, or a tangent curve could be intersected with it and the distance to that point checked.

Generally best to learn about geometric fundamentals when you get into this space of computation as it only gets more challenging from here without the right understanding of the problems to be solved. Play with curve normals, tangents, parameters etc. and the possibilities will become more apparent I think.

2 Likes

Hello, you could try with this node
https://dictionary.dynamobim.com/#/Geometry/Solid/Create/ByRevolve
Extract circle inf rinf
Extract circ sup rsup
edit:

Cordially
Christian.stan

1 Like

Hi @ali_arch ,

If you simply want to get the distance between two curves I recommend Geometry.DistanceTo. Perhaps Geometry.ClosestPointTo might also help you out, but I find it hard to understand what you’re trying to do here exactly.

Please share some sketches/ explanations about what you mean regarding the parallel/ perpendicular.

PS: @christian.stan you’re approach seems a little bit overcomplicated, why not use Geometry.DistanceTo or Geometry.ClosestPointTo?

Hi, It was not to complicate unnecessarily, more to show that there was an infinity of solution of perpendiculars (between these 2 terminals) infinity of points on the line.
Cordially
christian.stan

1 Like

check if the lines are parallel
if yes : Geometry.DistanceTo
if not: do something

1 Like