Jump to content

Maximum vertical distance between two polylines


radiman

Recommended Posts

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?

Link to comment
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:

 

2plines.gif

 

Hope OP would give us more information.

Link to comment
Share on other sites

I think that there may be 2 distinct cases:

 

[ATTACH=CONFIG]44992[/ATTACH]

 

Hope OP would give us more information.

 

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 ;)

Link to comment
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.

Link to comment
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.

Link to comment
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.

Link to comment
Share on other sites

I was out of office, so no autocad! :oops:

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

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

Link to comment
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.

Link to comment
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.

Link to comment
Share on other sites

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

 

maxgap.gif

 

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.

Link to comment
Share on other sites

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.

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

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...