NickThissen Posted October 22, 2012 Posted October 22, 2012 Hi, I am still a beginner with AutoCAD and tought it to myself mostly by just doing and trying, but I've now reached a problem that I cannot solve. I'm afraid I'm missing a obvious solution because this shouldn't be too hard to achieve, yet I can't find it... What I want to do basically is merge a couple of polylines (which have different widths and may overlap each other) together into a single 'shape'. I am calling it shape, but I think the correct term would be polygon. The end result should ("from the outside") look the same as before merging, the only difference being that the polylines are now merged into one shape. Important note: it cannot be a polyline with segments of different width, I know AutoCAD supports this, but the drawing will be exported to a format which does not seem to support this (and the result then is a line with a single width - wrong). Here's a mockup of what I want to achieve: On the left are three polylines (PL1, 2, 3), where PL2 has a different width and overlaps the other two polylines. On the right is the desired result: a single polygon (NOT a polyline with variable width) in the same shape as the polylines. Can anyone help me achieve this? It must be a pretty basic operation, yet I can't figure it out... Thanks! Quote
eldon Posted October 22, 2012 Posted October 22, 2012 Probably better ways of doing it now, but I would WMFOUT the shape. Then WMFIN that file and scale it to suit the original. Then use BPOLY and there is your shape Quote
Dana W Posted October 22, 2012 Posted October 22, 2012 Hi, I am still a beginner with AutoCAD and tought it to myself mostly by just doing and trying, but I've now reached a problem that I cannot solve. I'm afraid I'm missing a obvious solution because this shouldn't be too hard to achieve, yet I can't find it... What I want to do basically is merge a couple of polylines (which have different widths and may overlap each other) together into a single 'shape'. I am calling it shape, but I think the correct term would be polygon. The end result should ("from the outside") look the same as before merging, the only difference being that the polylines are now merged into one shape. Important note: it cannot be a polyline with segments of different width, I know AutoCAD supports this, but the drawing will be exported to a format which does not seem to support this (and the result then is a line with a single width - wrong). Here's a mockup of what I want to achieve: On the left are three polylines (PL1, 2, 3), where PL2 has a different width and overlaps the other two polylines. On the right is the desired result: a single polygon (NOT a polyline with variable width) in the same shape as the polylines. Can anyone help me achieve this? It must be a pretty basic operation, yet I can't figure it out... Thanks! If these polygons are simply 2D polygons, do this: Execute the Trim command, then trim off the overlapping areas. Excecute the Join command, select the object with the desired properties as your source object, then select the other objects as those to be joined. All the polylines will end up with the properties of your source object, and they will be one continuous polyline "Polygon". The join command will onl;y work if all your objects have at least one point in common, so don't separate them after the trim. Quote
RobDraw Posted October 22, 2012 Posted October 22, 2012 Important note: it cannot be a polyline with segments of different width. On the right is the desired result: a single polygon (NOT a polyline with variable width) in the same shape as the polylines. Psst Dana, I think you missed something. Quote
NickThissen Posted October 22, 2012 Author Posted October 22, 2012 The three lines are polylines as I said. But that is not really a requirement, all I need to do is draw some lines roughly in the shape of my example (they represent a part of electrical contacts ultimately), I just used polylines because it's easy to change their coordinates and width in case the specifications of the desired contacts changes (quite often). I could build the entire final structure (right side of example) using a polygon to begin with, but that would be very cumbersome to work with, so I'd rather use polylines and then turn them into a polygon at the end. It has to be a single polygon at the end, it cannot be a polyline with multiple segments of different width. I need to export the drawing to GDS finally (I actually export it to DXF first and use a different application to get the GDS), and those kind of 'multiple width' polylines aren't translated properly and turn out as just normal polylines with a single width. They can also not be separate polylines (as on the left of the example), they must be one continous shape to avoid numerous complications. I think that's about all the background I can give, I hope it's plenty @eldon: thanks. I just didn't understand anything that you said I'll try tomorrow, but I've no idea what WMFIN/OUT are/do. It sounds as though the shape is going to be exported to some file and then imported again? Will that work considering that the example I showed is only going to be a small part of a bigger drawing (with many of these polylines that need to be merged, as well as other shapes)? Quote
SLW210 Posted October 22, 2012 Posted October 22, 2012 Might want to search for a LISP, or perhaps one could be written for you. Quote
RobDraw Posted October 22, 2012 Posted October 22, 2012 LISP would be cool but how would one do it without LISP? Is there a way to change a polyline with width to a shape? If there is, then the trimming part afterwards would be easy. Quote
SLW210 Posted October 22, 2012 Posted October 22, 2012 As Eldon has explained is the Non-LISP way, you could possibly write a Script. Visually you could set FILLMODE=0 for an outline with a solid hatch or wipeout. LISP is the easiest solution IMHO. Quote
Dana W Posted October 23, 2012 Posted October 23, 2012 Psst Dana, I think you missed something. Of course I did. Why would this instance be any different than every other thing I've touched today. Don't tell me, It will come to me later right after I remember that I don't have on any pants, and I have just come home from the Walmart. Quote
RobDraw Posted October 23, 2012 Posted October 23, 2012 I'm surprised that there isn't a command to convert polylines in this manner. I can see how it would be quite useful. Quote
SLW210 Posted October 23, 2012 Posted October 23, 2012 I'm surprised that there isn't a command to convert polylines in this manner. I can see how it would be quite useful. +1 ........................... 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.