Hello All,
Bit of a head stumper here for me. I have a simple consultant drawing (attached) which contains a small sample of contour lines made from 2D polylines. I would like to convert these to regular polylines without losing the elevation. I have used the CONVERT and CONVERTPOLY commands to no avail. Has anyone encountered this before?? Can anyone offer some suggestions to how I can convert these 2D polylines without losing the elevation property?
I can always explode the lines and rejoin them but that will brake up the pline into hundreds of segments (which I don't want). The line segments would become so small that the ltscale would have no affect as I need to see the lines and dashes.
PLINETYPE is set to 2 already.
If you spline fit a polyline it turns it into a 2d polyline so I'm not sure if this method was used for the contour lines. BTW... does anyone know why or when a 2d polyline would be used. To me they are just the same thing but with different context menus.
Any help would be appreciated!
Solved! Go to Solution.
Solved by Kent1Cooper. Go to Solution.
Solved by hgasty1001. Go to Solution.
Hi thanks for your reply. I should have added more detail. I tried the decurve already and yes it does convert it to a polyline. However it 'decurves' the original shape of the contour line and makes it sharp and jagged. I want to retain the original curvature of the contour line as this is an important design aspect.
Thanks for your suggestion..
This may not be the solution you want, but if there are not a lot of contours this seemed to work.
explode the 3dpolyline.....pedit...yes...join...p (for previous)
then enable linetype generation. repeat as required.
It's kind of onerous...but achieves your end product.
Sorry but it's all i got. Good luck.
I may have done this wrong, but I made sure my peditaccept was set for 1, entered pedit, selected your top line, which offered to let me close the spline.
It then became a closed spline.
Is this what you were looking for. It didn't look like it changed the curves, it just became a closed spline. The elevations stayed the same.
Hope this helps.
Going just from memory, 2D Polylines are also known as "Heavy" polylines. I believe each vertex is recorded as an x,y,z value, whereas LW Polylines (Polylines) only record the x & y values of the individual vertices, and Z is recorded only once for the polyline object.
I was not able to "convert" your 2D Polylines either, but was successful in Xploding them and then putting them back together in one operation using LeeMac's Polyjoin lisp. In a busy drawing, simply select all the offending polylines using whatever method you prefer (QSelect, SelectSimilar, Layiso, etc) and ISOLATE them until you've exploded and re-joined them.
Since they appear to be made from all-line-segment LWPolylines using Pedit and probably the Spline option, you can't use the handy CONVERTPOLY command on them to make them LightWeight, as you would be able to do with a Polyline originally drawn as "heavy" 2D. But try this [a routine could easily be written to automate the process]:
Offset the Polyline to one side [by a small amount, so you don't adversely affect areas of tighter curvature], then back again the other way. Eliminate the original and the intermediate offset Polylines. It's essentially the equivalent of Exploding it and Pedit-Joining the results back together, so the final one will be lots of short line segments, which means you will be able to use CONVERTPOLY on it to make it LightWeight. Enable linetype generation.
Thanks everyone for your suggestions. It is much appreciated!
From what I have gathered, all the methods involve (to a certain extent) exploding and rejoining to turning it into a regular polyline. The downside to this is that the contours become hundreds of smaller pieces joined together. Applying an ltscale to this will have minimal affect as the segments are so tiny that the lines and dashes of hidden lines won't show. This is something we will have to live with as certain portions will have the hidden linetype visible. At least this will be as close as possible to our desired end result.
Once again thanks for everyone's feedback!
Hi,
You can use SPLINEDIT to convert that *Splines* to a polyline (Lightweight).
Gaston Nunez
Hi Gaston,
The splinedit worked much better! Was able to convert the contours to a polyline without making it into hundreds of tiny line segments and retaining the ltscale. Perfect. Got our desired result!
I would never of thought about using splinedit on a polyline.
Hats off to you Gaston!
Hi,
Glad to help. The point is that once you pedit a pline using the spline option, you end up with a... spline ( a cubic one by default), so splinedit should work.
Gaston Nunez
@mlang wrote:
....contours become hundreds of smaller pieces joined together. Applying an ltscale to this will have minimal affect as the segments are so tiny that the lines and dashes of hidden lines won't show. This is something we will have to live with ....
I know you have a different solution, but to clarify what's been mentioned already in several replies about the above: Turn on [enable] linetype generation for the resulting Polylines [in the Properties box is the easiest way, and you could do it for a whole selection's worth at once], and that won't be a problem -- non-continuous linetypes will "flow" across/around vertices, and won't be impaired by the lengths of the segments.
Hi Kent,
Enabling linetype generation resolves the ltscale issue. Considering the sheer number of contour lines in my full drawing, this solution may be more practical as you can apply it to a whole selection.
Much appreciated for your input. Thanks Kent!
Another solution:
Just use the CONVERT command.
---
Command: CONVERT
Enter type of objects to convert [Hatch/Polyline/All] <All>: p
Enter object selection preference [Select/All] <All>: s
I've attached a little lisp routine I wrote quite a few years ago that turns on LTGEN for ALL Polylines and LWPolylines in your drawing. It's very basic and simple but I have found it very usefull over the years.
Once you load it just type LTGEN and - poof! All ltgen's are on.
It might help you out some time.
This worked for me: Isolate Object (the 2d polyline), then do BOUNDARY and click the interior. It creates a regular polyline that looks just like the 2d polyline.
Dear all
No need for a LISP to Convert 2d polyline to polyline.
Just make a block (WBLOCK) off all the 2d polylines and save it as"autocad release 13 ASCII DXF" or "12,11,10,9.ASCII DXF".
Done
"Si seleccionas la 2d Polyline, aplicando el comando Join tambien se convierte en polyline"
If you select the 2d Polyline, applying the Join command also becomes a Polyline