Jump to content

Recommended Posts

Posted

I need a lisp routine that can take a long polyline and delete all the arc segments, thus leaving multiple shorter polylines (all consisting only of straight segments).

 

Can anyone help me with this please?

Posted

Not sure there is really needed a custom tool; you may achieve that by built-in commands:

  • Explode the said polyline.
  • Call QSELECT and use an appropriate filter to select all arcs.
  • Delete previous selected arcs.
  • Call PEDIT in Multiple mode and select all remaining segments; next use Join option with 0.0 as Fuzz factor to rebuild the desired polylines.

For sure, it may help to isolate the polyline into a temporary layer to don't interfere with other geometry; use LAYMRG when done to move result in its appropriate layer.

Posted

Upload an example of a sample drawing to showing before and after .

Posted

I guess the OP meant by long polyline is multiple segment polylines with arc segments

This is enough i think:

 

command: _.pedit

PEDIT Select polyline or [Multiple]:

Enter an option [Close/Join/Width/Edit vertex/Fit/Spline/Decurve/Ltype gen/Reverse/Undo]: D

Posted

I believe that OP was looking to discard the arc segments and keep only the intermediate straight parts as multiple polylines; your solution pBe will convert them into lines, thus preserving one entity.

If the arc segments were easy visually recognizable (that it, not too close to a line appearance) and in reasonable number, then may get rid of them by TRIM, too.

Posted
I believe that OP was looking to discard the arc segments and keep only the intermediate straight parts as multiple polylines;...

 

Hmmn, I guess you are right Msasu, good point :)

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...