Need help getting rid of polyline vertices by joining them into one entity

Need help getting rid of polyline vertices by joining them into one entity

jimschmidt
Enthusiast Enthusiast
934 Views
18 Replies
Message 1 of 19

Need help getting rid of polyline vertices by joining them into one entity

jimschmidt
Enthusiast
Enthusiast

I have Autocad 2000 and my drawing is full of vertices created by poly lines (short sections of lines).  These vertices (endpoints) cause problems for my machinist.  The spline command smoothes out all the curves but the endpoints are still there.  Later versions of autocad can fix this by doing the following:

 

EXPLODE, JOIN, PLDIET 7 3 S

 Or

SPLINEDIT, FLATTEN

or

join

 

If anyone with a recent version of autocad can do this for my attached file I would appreciate it.

 

send to:

jim(at)jsengineering.net

 

thanks 

Jim Schmidt

 

 

0 Likes
935 Views
18 Replies
Replies (18)
Message 2 of 19

paullimapa
Mentor
Mentor

I'm using AutoCAD 2020 and I don't see the Flatten option for Splinedit.

These are the only options:

paulli_apa_0-1661132005173.png

Would it work if the current Spline object is converted into a REGION?


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 3 of 19

jimschmidt
Enthusiast
Enthusiast

Please try it for me.  Tell me if it gets rid of all those blue dots.

0 Likes
Message 4 of 19

paullimapa
Mentor
Mentor

REGION command is also available in AutoCAD 2000.

I just selected the SPLINE objects and they're now REGIONS.


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 5 of 19

jimschmidt
Enthusiast
Enthusiast

Yes - regions seems to work.  I'll test it with my machinist.

A huge thanks (maybe a premature thanks) for showing me something I had all along.

 

Jim

0 Likes
Message 6 of 19

paullimapa
Mentor
Mentor
Hopefully your machinist can accept Region objects.

Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 7 of 19

jimschmidt
Enthusiast
Enthusiast

Any reason the machinist (waterjet cutting) might not be able to accept regions?

0 Likes
Message 8 of 19

paullimapa
Mentor
Mentor
Only your machinist can answer that question

Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 9 of 19

pendean
Community Legend
Community Legend
If later-than-R2000 versions fix this, you are probably looking at a R2000 limitation that cannot be overcome.

Now you know.
0 Likes
Message 10 of 19

jimschmidt
Enthusiast
Enthusiast

If only a later version of autocad can fix this (I have autocad 2000) then I need someone to help me and apply the "weed" or some other command to get rid of all the segments.  Its just this one dwg I need to be fixed.  See attached file and my contact at the top of this thread.

0 Likes
Message 11 of 19

Kent1Cooper
Consultant
Consultant

@jimschmidt wrote:

....

EXPLODE, JOIN, PLDIET 7 3 S

....


As the author of PLDIET, I point out that the Polylines in your drawing are "heavy" ones.  PLDIET was written to work with "lightweight" ones, in reaction to the fact that the older WEED command couldn't, being written for "heavy" ones [I think before "lightweight" ones existed].

 

Unfortunately, a Polyline that has been spline-fit like those cannot be "light," so PLDIET is out of the question unless you want to lose the spline-fitting.  I haven't tried it, but I expect WEED can't work on a spline-fit one, either, because part of its work [carried over into PLDIET] is a check on the amount of bend at each vertex, which really applies only to line-segmented Polylines.

Kent Cooper, AIA
0 Likes
Message 12 of 19

jimschmidt
Enthusiast
Enthusiast

Can PLdiet/weed be applied befor splining, cleaning up the dwg and then be splined with an end result of eliminated segments?

0 Likes
Message 13 of 19

Kent1Cooper
Consultant
Consultant

@jimschmidt wrote:

Can PLdiet/weed be applied befor splining, cleaning up the dwg and then be splined with an end result of eliminated segments?


Sure, but surely at a loss in accuracy of the shape [which is what the lots of segments are for, after all].  Try it on a copy of a typical Polyline, and compare the results, to see whether the difference is acceptable for your purposes.

Kent Cooper, AIA
0 Likes
Message 14 of 19

jimschmidt
Enthusiast
Enthusiast

I tried "region" command and on my screen it appeared to join all the small segments into just one leaving only the endpoint and I thought I had it solved but when I sent it to my machinist he still saw too many segments.

 

I have the pldiet.lsp and the weed.lsp files    I tried to load PLD (pldiet.lsp) into my autocad 2000.  I've done this before but now I can't remember how.  

0 Likes
Message 15 of 19

paullimapa
Mentor
Mentor
At command prompt enter command APPLOAD
Then locate the lsp file and load it. Dismiss the dialogue and enter your lisp command to run it.

Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 16 of 19

jimschmidt
Enthusiast
Enthusiast

Appload worked - thanks.  But pld and weed commands don't seem to work in early autocad 2000

0 Likes
Message 17 of 19

paullimapa
Mentor
Mentor

post PLD & WEED lisp routines so we can all take it look to see if it actually runs in the more current AutoCAD versions.


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 18 of 19

Kent1Cooper
Consultant
Consultant

If you have a newer version of PLDIET.lsp, it has been updated for certain things about newer versions of AutoCAD that would mean it won't work in older-enough versions.  Try the one >here<, which doesn't have some of those updates, but it's not old all the way back to 2000, so I hope it will work for you.  Remember that it is written for "lightweight" Polylines [and without spline-fitting], in reaction to the fact that the WEED2 command, >here<, doesn't.  [I can't seem to find the older WEED command there any more, though it was around at the time I first posted PLDIET.]  If all else fails, you could try [also on "heavy" Polylines only] the PVD command >here<, which was also part of the inspiration for PLDIET.

Kent Cooper, AIA
0 Likes
Message 19 of 19

paullimapa
Mentor
Mentor

I could not successfully get the other lisp files @Kent1Cooper provided to work so I did the following:

1. Exploded the REGIONs which ended up with SPLINES: primary cover Mk3 splined (SPLINE).dwg

2. Attempted to use built-in commands PEDIT & SPLINEDIT to convert to LWPLINE but still created many vertices:

How to convert splines to polylines in AutoCAD | AutoCAD | Autodesk Knowledge Network

2. Searched on-line for: autolisp convert spline to pline and found Tony Hotchkiss' S2P which offered option to enter larger segments (less vertices): primary cover Mk3 splined (S2P).dwg

But as others have already stated in their responses to you, less vertices = less curves:

paulli_apa_1-1661734770315.png

 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes