• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

convert a circle with two arches into a normal circle

  • Thread starter Thread starter doking
  • Start date Start date

doking

Guest
who of you could kindly suggest, gp, a lisp that converts me a circle formed by two arches in a normal circle, is already he there is turn the corners of a polyline in radius 3, thank you :d
 
for the first honestly I don't know but for the second you can directly use the fitting command, set the radius and select the polyline option (just inside the collecting command, you can simply press p or select it).
 
You don't need lisp, use the joint command.
the joint command joins the two arches but does not make them a circle and our pantograph does a bit to dick with this kind of holes
@legs sure that I can use the polylinear option to radiate the edges, but perhaps since if some pious soul wanted to write me a lisp, already that there is could do 1+1=2 xd
 
the joint command joins the two arches but does not make them a circle....
if with the unsci command does not turn them into a circle is because the two arches do not appear to the same circle. could have different radius.
 
I attach the modified version of atc.
the original version in fact works only with autocad in English and you find it here:http://www.cadtutor.net/forum/showt...ing-converting-arc-to-circle-lisp-code-please!

below the modified version for different languages.
Code:
(defun c:atc (/ *error* lay e1 enm1 arclay c rad #count)
  ;;; error handler
  (defun *error* (#message)
    (command "_.undo" "_end")
    (and
      #message
      (or (member
            #message
            '("console break" "function cancelled" "quit / exit abort")
          ) ;_ member
          (princ (strcat "\nerror: " #message))
      ) ;_ or
    ) ;_ and
  ) ;_ defun
  
  (setvar "cmdecho" 0)
  (command "_undo" "_begin")
  (command "_ucs" "_w")
  (prompt "\narc to circle: ")
  (setq lay (getvar "clayer")
        e1  (ssget ":l" '((0 . "arc")))
  ) ;_ setq
  (if e1
      (repeat (setq #count (sslength e1))
        (setq #count (1- #count)
              enm1 (ssname e1 #count)
            arclay (cdr (assoc 8 (entget enm1)))
            c      (cdr (assoc 10 (entget enm1)))
            rad    (cdr (assoc 40 (entget enm1)))
      ) ;_ setq
      (entdel enm1)
      (command "_layer" "_set" arclay "")
      (command "_circle" c rad)
      (command "_layer" "_set" lay "")
        )
  ) ;_ if
  (*error* nil)
  (setvar "cmdecho" 1)
  (princ)
) ;_ defun
Of course you should select only one arch.
 
I attach the modified version of atc.
the original version in fact works only with autocad in English and you find it here:http://www.cadtutor.net/forum/showt...ing-converting-arc-to-circle-lisp-code-please!

below the modified version for different languages.
Code:
(defun c:atc (/ *error* lay e1 enm1 arclay c rad #count)
  ;;; error handler
  (defun *error* (#message)
    (command "_.undo" "_end")
    (and
      #message
      (or (member
            #message
            '("console break" "function cancelled" "quit / exit abort")
          ) ;_ member
          (princ (strcat "\nerror: " #message))
      ) ;_ or
    ) ;_ and
  ) ;_ defun
  
  (setvar "cmdecho" 0)
  (command "_undo" "_begin")
  (command "_ucs" "_w")
  (prompt "\narc to circle: ")
  (setq lay (getvar "clayer")
        e1  (ssget ":l" '((0 . "arc")))
  ) ;_ setq
  (if e1
      (repeat (setq #count (sslength e1))
        (setq #count (1- #count)
              enm1 (ssname e1 #count)
            arclay (cdr (assoc 8 (entget enm1)))
            c      (cdr (assoc 10 (entget enm1)))
            rad    (cdr (assoc 40 (entget enm1)))
      ) ;_ setq
      (entdel enm1)
      (command "_layer" "_set" arclay "")
      (command "_circle" c rad)
      (command "_layer" "_set" lay "")
        )
  ) ;_ if
  (*error* nil)
  (setvar "cmdecho" 1)
  (princ)
) ;_ defun
Of course you should select only one arch.
thank you 1000 dieva, but I'm afraid that programming does not understand a bar :(
But would I ask too much if I asked you to be a clearer peline?

:redface:
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top