# Maximum vertical distance between two polylines

## Recommended Posts

Is there any way to find out the Maximum vertical distance between two polylines?

##### Share on other sites

Seems that you will need to provide more information on this. Are those polylines singe or multi segment? Were drew in plan or in 3D? For the second case, were on the same vertical plane, in parallel planes or in an arbitrary relative position?

##### Share on other sites

Perhaps "vertical" means "Y" direction, in which case a bounding box routine would suffice.

##### Share on other sites

2 multi segment polylines (2D), I wanna find the maximum Y distance between them?

##### Share on other sites

Are you wanting to do it graphically or let a macro/LISP routine calculate it for you?

##### Share on other sites

Perhaps "vertical" means "Y" direction, in which case a bounding box routine would suffice.

I think that there may be 2 distinct cases:

##### Share on other sites

I think that there may be 2 distinct cases:

[ATTACH=CONFIG]44992[/ATTACH]

You are right Mircea, but it would be even more complicated when none of the vertices on one polyline were directly above or below vertices on the other polyline.

Looks like the OP has gone home for the day

##### Share on other sites

Depends on the required precision - programmatically may parse the sketch from most left point to most right one using a vertical line and build a list with the distances between the two intersection points (that it, the aforementioned vertical with first, respectively second polyline); sort the list and get the biggest gap. By decreasing the defame interval will increase the precision of the result, but in the same time will increase the processing time.

##### Share on other sites

... and the length and complexity of the polylines. I don't really see a problem to solve it programmatically (using your logic, for example), but if the OP isn't going to give us any more information it's all guess work on our part.

##### Share on other sites

... if the OP isn't going to give us any more information it's all guess work on our part.

This.

##### Share on other sites

So, seems that this is another fire-and-forget type questions...

##### Share on other sites

So, seems that this is another fire-and-forget type questions...

It certainly looks like that. Or he has rethought his problem and cannot define it accurately enough to answer our questions.

##### Share on other sites

I was out of office, so no autocad!

I'm interested to know the Y-distance what I showed in the picture . The polylines that I have are very long and curvy so their highest and lowest points are located in different parts, look here:

Basically I want to know the max Y distance between two Plines not between their 2 vertices!

##### Share on other sites

anybody cannot help me?

##### Share on other sites

I believe the maximum distance will be at one of the vertices of the two polylines. Therefore you can start by setting Max to the distance from the 1st vertex of the top line vertically down to the intersection point of the bottom line. Then go to the top line's second vertex and determine the length from there to the bottom line. If it is larger than Max redefine Max to that value. Continue with the rest of the vertices in the top line then go vertex to vertex along the bottom polyline.

##### Share on other sites

FWIW -

This could make for an interesting .NET app, which employs transient graphics to indicate max and min distances between the two selected polylines, and hooks a PointFilter to cull the distance at the given cursor position dynamically. I cannot see this being useful, without tying back into C3D for my use though.

##### Share on other sites

So, Radiman, you were looking for the distance marked with yellow below?

Please check that Lrm have a very good observation (as long there are no curved segments along those polylines); may want to check Lee Mac's intersection functions library.

May want also to ask a Moderator to move your thread into Development sub-forum for extra support.

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.

×   Pasted as rich text.   Restore formatting

Only 75 emoji are allowed.