Steven P Posted 6 hours ago Posted 6 hours ago On 10/20/2025 at 12:25 PM, PGia said: Hi again. This may also happen to others: sometimes I have two polylines and I need to get something like a common parallel to both. A sort of hybrid parallel from the original two. Is it possible that this topic has been discussed in the history of this forum and there is a LISP to solve this problem? Thanks in advance. I guess the solution is to programme how you currently do this - what is your manual method? As for a solution, haven't looked how SLW210 does his but might expand MHUPP to use both polylines and find the mid points using all verticies. 1 Quote
mhupp Posted 5 hours ago Posted 5 hours ago I guess you could do like (setq i (+ i 0.01)) 16 vertex poly would then create a 1600 vertex poly And then run overkill on the created polyline to remove all collinear vertexes. 1 1 1 Quote
PGia Posted 3 hours ago Author Posted 3 hours ago (edited) 2 hours ago, Steven P said: I guess the solution is to programme how you currently do this - what is your manual method? As for a solution, haven't looked how SLW210 does his but might expand MHUPP to use both polylines and find the mid points using all verticies. Basically I try to draw a polyline equidistant to the reference lines. To do this, I draw perpendiculars from each point of each polyline to the closest segment of the other. Sometimes several points are concentrated in one of the polylines while in the other polyline there is only one long segment. In these cases, I draw all the perpendiculars that intersect that long segment, but for the last point, I already draw a line to the end of the long segment. When the perpendicular from a point goes to the next segment to which the previous ones were in the opposite polyline, then the perpendiculars must continue being made from the opposite polyline. I suppose it is a bit complicated to explain and understand, so I attach images of what I mean. My method isn't perfect, but it's pretty close. I thought there would be a better method, one that would be more geometrically rigorous than mine. As for Lee Mac's code, I must thank him for sharing his knowledge and his great code I've tested it, and the result is pretty close to what the true axis between the two polylines should be. But it still deviates in the pivot areas. Also, the result varies depending on the order in which the polylines are selected, and this isn't good. A robust method should produce the same result in both cases. My idea was that it should be possible to obtain an axis in which any perpendicular to it is equidistant from the reference polylines. But I'm starting to think this isn't so easy. Edited 3 hours ago by PGia Quote
SLW210 Posted 7 minutes ago Posted 7 minutes ago Can you post a drawing with your manual center line? I always pick in the same direction, never noticed the line was different if selection reversed, I'll see if I can find out why. Your examples are much more extreme than anything I would have, could you say what those are and how they are generated? Quote
Recommended Posts
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.