convert polyline line segments to arc segments?

convert polyline line segments to arc segments?

mid-awe
Collaborator Collaborator
11,814 Views
20 Replies
Message 1 of 21

convert polyline line segments to arc segments?

mid-awe
Collaborator
Collaborator

hi all,

 

Can anyone help with a lisp that will convert polyline line segments to arc segments? I find myself hovering my mouse over polyline segment midpoints many times daily just to convert the line segment to an arc segment. It started me thinking that it would make sense to convert all the line segments to arc segments at once, rather than one at a time.

 

I found some similar lisps but they all require a buldge to be provided by the user. I would prefer an automatic ".01" or some other very small number used so that the buldge is not noticed visually but the segment would be an arc none the less.

 

Thank you for any help / suggestions.

0 Likes
Accepted solutions (2)
11,815 Views
20 Replies
Replies (20)
Message 21 of 21

Kent1Cooper
Consultant
Consultant

@laurens146 wrote:

....every selected polyline (NOT LWpolyline) ....


The (ssget) filter in line 28 of your code indicates that it is, in fact, made to work on only LWPolylines.  Unfortunately, they've made this confusing -- when you pick one of those and look at the Properties palette, it calls it a "Polyline."  But if you look at its actual entity type:

(cdr (assoc 0 (entget (car (entsel "\nSelect a Polyline to see what kind it is: ")))))

you will see what it "really" is.  If that code is accepting selection of them, LW is what kind they are, since it will not even "see" the other kinds because of that filter.

If that approach reports "POLYLINE" without the LW, it is either a 2D "heavy" one or a 3D one, and in the Properties palette it will be listed as one or the other.  I really wish they would not have arranged things so that one variety is called a "POLYLINE" in entity data, but the other variety is called a "Polyline" in the Properties palette.  But there we are....

By default, the various commands that make Polylines [PLINE, RECTANG, BPOLY, BOUNDARY, POLYGON, etc.] result in LWPolylines.  "Heavy" ones result from things like using PEDIT with the Spline or Fit option, or directly from 3DPOLY,  But if you need them to be "heavy" for some reason, you can set things to make newly-drawn ones that way, with the PLINETYPE System Variable [read about it].

Kent Cooper, AIA