Jump to content

Recommended Posts

Posted

I have an arc that is a number of short straight lines. Is there a way to convert the line segments to an arc?

Posted

If you use Pedit to join all the straight lines into one polyline, and then Fit curve.

 

One trouble there is that you would have as many arcs as you had short lines. Perhaps another approach would be to draw a new arc using three points, and then erase all the little lines.

Posted

If it is truelly an arc (part of a circle) rather than a general curve represented by lines then simply circle (or arc) with three points. Delete the lines.

Posted

I was trying to not have to draw all of them. Each arc is really made up of three or four arcs.

Posted
I was trying to not have to draw all of them. Each arc is really made up of three or four arcs.

 

Someone out there might have a lisp, but my question is, "Which lines go with which arcs?" That question is a lot easier for a human to answer than it is for a machine. Think about how you would code that....

Posted

Quick and CLUNKY...

 

Will only work on one set at a time.

(defun c:test (/ ss eLast ent)
 (vl-load-com)
 (if (setq ss (ssget "_:L" '((0 . "ARC"))))
   (progn
     (setq eLast (entlast))
     (if (eq (getvar 'peditaccept) 1)
       (vl-cmdf "_.pedit" "_m" ss "" "_j" "" "")
       (vl-cmdf "_.pedit" "_m" ss "" "_y" "_j" "" "")
     )
     (or
       (eq eLast (setq ent (entlast)))
       ((lambda (pts)
          (vl-cmdf "_.arc" "_non" (car pts) "_non" (nth (/ (length pts) 2) pts) "_non" (last pts))
          (entdel ent)
        )
         (mapcar (function cdr)
                 (vl-remove-if-not (function (lambda (x) (eq 10 (car x)))) (entget ent))
         )
       )
     )
   )
 )
 (princ)
)

Posted

Thanks for the suggestions. I am going to manually get them like I want.

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