Author Topic: ellipse to arc  (Read 250 times)

0 Members and 1 Guest are viewing this topic.

jack91066

  • Mosquito
  • Posts: 11
ellipse to arc
« on: March 17, 2017, 05:37:21 pm »
Hi everyone,

Please anyone help me try to convert ellipse to arc, i attach my cad file. in my cad file ellipse major and minor radius is not equal,
i use lee-mac lisp tyr to convert my cad file but not success.
if anybody have idea ,please share with me how to convert ellipse to arc 

gile

  • Water Moccasin
  • Posts: 2034
  • Marseille, France
Re: ellipse to arc
« Reply #1 on: March 17, 2017, 06:10:21 pm »
Hi

Not sure it's what you're looking for, but here's a quite old but not so bad one (I quickly translated the prompts to English).

Code - Auto/Visual Lisp: [Select]
  1. ;;; ARCEDIT (gile) 25/11/2005
  2. ;;; Convertit un cercle ou une ellipse en arc ou modifie le départ et la fin
  3. ;;; d'un arc d'après les angles spécifiés, l'option "Fermer" permet la conversion d'un
  4. ;;; arc de cercle en cercle ou d'un arc elliptique en ellipse fermée.
  5.  
  6. (defun c:arcedit (/ ucszdir getang ang->param set1 ent lst ang1 ang2 opt
  7.  echo)
  8.  
  9.  ;; ucszdir Retourne la direction d'extrusion du SCU courant (vecteur)
  10.  (defun ucszdir ()
  11.    (trans '(0 0 1) 1 0 T)
  12.  )
  13.  
  14.  ;; Saisie des angles de départ et de fin de l'arc (option "Fermer")
  15.  (defun getang ()
  16.    (if (or (= (cdr (assoc 0 lst)) "CIRCLE")
  17.    (and (= (cdr (assoc 0 lst)) "ELLIPSE")
  18. (= (cdr (assoc 41 lst)) 0.0)
  19. (= (cdr (assoc 42 lst)) (* 2 pi))
  20.    )
  21. )
  22.      (progn (setq opt "") (initget 1))
  23.      (progn (setq opt " ou [Close] <f>:") (initget "Close"))
  24.    )
  25.    (if (numberp (setq ang1
  26. (getangle (trans (cdr (assoc 10 lst)) ent 1)
  27.  (strcat "\nSpecify the arc start angle"
  28.  opt
  29.  ": "
  30.  )
  31. )
  32. )
  33. )
  34.      (progn
  35. (initget 1)
  36. (setq ang2
  37.       (getangle (trans (cdr (assoc 10 lst)) ent 1)
  38. "\nSpecify the arc end angle: "
  39.       )
  40. )
  41. (foreach ang '(ang1 ang2)
  42.  (set ang
  43.       (+ (eval ang)
  44.  (angle '(0 0) (trans (getvar "UCSXDIR") 0 (ucszdir)))
  45.  (getvar "ANGBASE")
  46.       )
  47.  )
  48. )
  49.      )
  50.    )
  51.  )
  52.  
  53.  ;; Convertit l'angle saisi en "paramètre" de l'ellipse (code dxf 41 et 42)
  54.  (defun ang->param (ang)
  55.    (setq
  56.      ang (- ang
  57.     (angle '(0 0) (trans (cdr (assoc 11 lst)) 0 (ucszdir)))
  58.  )
  59.    )
  60.    (atan (sin ang) (* (cos ang) (cdr (assoc 40 lst))))
  61.  )
  62.  
  63.  ;; Fonction principale
  64.  (if (and (= 1 (getvar "PICKFIRST"))
  65.   (setq set1 (ssget "_i" '((0 . "ARC,CIRCLE,ELLIPSE"))))
  66.   (eq 1 (sslength set1))
  67.      )
  68.    (progn
  69.      (setq ent (ssname set1 0)
  70.    lst (entget ent)
  71.      )
  72.      (sssetfirst nil nil)
  73.    )
  74.    (progn
  75.      (sssetfirst nil nil)
  76.      (while
  77. (not
  78.  (and
  79.    (setq ent
  80.   (car (entsel
  81.  "\nSelect an arc, a circle or an ellipse: "
  82. )
  83.   )
  84.    )
  85.    (setq lst (entget ent))
  86.    (member (cdr (assoc 0 lst)) '("ARC" "CIRCLE" "ELLIPSE"))
  87.  )
  88. )
  89.      )
  90.    )
  91.  )
  92.  (if (equal (ucszdir) (cdr (assoc 210 lst)) 1e-9)
  93.    (progn
  94.      (getang)
  95.      (cond
  96. ((= (cdr (assoc 0 lst)) "ARC")
  97. (if (numberp ang1)
  98.   (setq lst (subst (cons 50 ang1)
  99.    (assoc 50 lst)
  100.    (subst (cons 51 ang2) (assoc 51 lst) lst)
  101.     )
  102.   )
  103.   (setq
  104.     lst (cons '(0 . "CIRCLE")
  105.       (vl-remove-if
  106. '(lambda (x)
  107.    (member (car x) '(-1 0 330 5 100 50 51))
  108.  )
  109. lst
  110.       )
  111. )
  112.   )
  113. )
  114. )
  115. ((= (cdr (assoc 0 lst)) "CIRCLE")
  116. (setq lst
  117.  '(0 . "ARC")
  118.  (cons
  119.    (cons 50 ang1)
  120.    (cons
  121.      (cons 51 ang2)
  122.      (vl-remove-if
  123. '(lambda (x) (member (car x) '(-1 0 330 5 100)))
  124. lst
  125.      )
  126.    )
  127.  )
  128. )
  129. )
  130. )
  131. ((= (cdr (assoc 0 lst)) "ELLIPSE")
  132. (if (numberp ang1)
  133.   (foreach ang '(ang1 ang2)
  134.     (set ang (ang->param (eval ang)))
  135.   )
  136.   (setq ang1 0.0
  137. ang2 (* 2 pi)
  138.   )
  139. )
  140. (setq lst (subst (cons 41 ang1)
  141.  (assoc 41 lst)
  142.  (subst (cons 42 ang2) (assoc 42 lst) lst)
  143.   )
  144. )
  145. )
  146.      )
  147.      (setq echo (getvar "CMDECHO"))
  148.      (setvar "CMDECHO" 0)
  149.      (command "_undo" "_begin")
  150.      (entmake lst)
  151.      (entdel ent)
  152.      (command "_undo" "_end")
  153.      (setvar "CMDECHO" echo)
  154.    )
  155.    (princ
  156.      "\nError: the current UCS and the object OCS are not parallel."
  157.    )
  158.  )
  159.  (princ)
  160. )
Speaking English as a French Frog

jack91066

  • Mosquito
  • Posts: 11
Re: ellipse to arc
« Reply #2 on: March 17, 2017, 06:20:36 pm »
(defun c:e2a (/ acaddoc acadms acadobj center endangle obj radius ss ssn startangle)
  (vl-load-com)
  (if
    (setq ss (ssget '((0 . "ellipse"))))
    (progn     
      (setq acadobj (vlax-get-acad-object))
      (setq acaddoc (vla-get-activeDocument acadobj))
      (setq acadms (vla-get-modelspace acaddoc))
      (setq ssn (ssname ss 0))
      (setq obj (vlax-ename->vla-object ssn))
      (if
   obj ;(equal (vla-get-RadiusRatio obj) 1 0.0001)
   (progn
     (setq radius (vla-get-MajorRadius obj))
     (setq StartAngle (vla-get-StartAngle OBJ))
     (setq EndAngle (vla-get-EndAngle obj))
     (setq Center (vlax-get obj 'center))
     (entdel ssn)
     (vla-addarc acadms (vlax-3d-point Center) radius StartAngle EndAngle)
     ) ; progn
   (alert "> Ellipse objects failed to be converted")
   )   ; if
      )     ; progn
    )       ; if
  (princ)
  )       ; defun

jack91066

  • Mosquito
  • Posts: 11
Re: ellipse to arc
« Reply #3 on: March 17, 2017, 06:23:03 pm »
i use this code but is not working because my major and minor radius in not equal have any another code if major and minor radius not equal it working.

jack91066

  • Mosquito
  • Posts: 11
Re: ellipse to arc
« Reply #4 on: March 17, 2017, 06:24:39 pm »
check my attach cad file

gile

  • Water Moccasin
  • Posts: 2034
  • Marseille, France
Re: ellipse to arc
« Reply #5 on: March 17, 2017, 06:27:58 pm »
This one converts ellipse or elliptical arc into a polyline with circular arc segments.
Try EL2PL command.

Code - Auto/Visual Lisp: [Select]
  1. ;; EllipseToPolyline
  2. ;; Returns a polyline (vla-object) which is an approximation of the ellipse (or elliptical arc)
  3. ;;
  4. ;; Argument : an ellipse (vla-object)
  5.  
  6. (defun EllipseToPolyline (el /     cl    norm  cen elv   pt0   pt1  pt2 pt3   pt4   ac0
  7.  ac4 a04   a02   a24  bsc0 bsc2  bsc3  bsc4  plst blst  spt   spa
  8.  fspa srat  ept   epa  fepa erat  n
  9. )
  10.  (setq cl   (= (ang<2pi (vla-get-StartAngle el))
  11. (ang<2pi (vla-get-EndAngle el)))
  12. norm (vlax-get el 'Normal)
  13. cen  (trans (vlax-get el 'Center) 0 norm)
  14. elv  (caddr cen)
  15. cen  (3dTo2dPt cen)
  16. pt0  (mapcar '+ (trans (vlax-get el 'MajorAxis) 0 norm) cen)
  17. ac0  (angle cen pt0)
  18. pt4  (mapcar '+ cen (trans (vlax-get el 'MinorAxis) 0 norm))
  19. pt2  (3dTo2dPt (trans (vlax-curve-getPointAtparam el (/ pi 4.)) 0 norm))
  20. ac4  (angle cen pt4)
  21. a04  (angle pt0 pt4)
  22. a02  (angle pt0 pt2)
  23. a24  (angle pt2 pt4)
  24. bsc0 (/ (ang<2pi (- a02 ac4)) 2.)
  25. bsc2 (/ (ang<2pi (- a04 a02)) 2.)
  26. bsc3 (/ (ang<2pi (- a24 a04)) 2.)
  27. bsc4 (/ (ang<2pi (- (+ ac0 pi) a24)) 2.)
  28. pt1  (inters pt0
  29.     (polar pt0 (+ ac0 (/ pi 2.) bsc0) 1.)
  30.     pt2
  31.     (polar pt2 (+ a02 bsc2) 1.)
  32.     nil
  33.     )
  34. pt3  (inters pt2
  35.     (polar pt2 (+ a04 bsc3) 1.)
  36.     pt4
  37.     (polar pt4 (+ a24 bsc4) 1.)
  38.     nil
  39.     )
  40. plst (list pt4 pt3 pt2 pt1 pt0)
  41. blst (mapcar '(lambda (b) (tan (/ b 2.)))
  42.     (list bsc4 bsc3 bsc2 bsc0)
  43.     )
  44.  )
  45.  (foreach b blst
  46.    (setq blst (cons b blst))
  47.  )
  48.  (foreach b blst
  49.    (setq blst (cons b blst))
  50.  )
  51.  (foreach p (cdr plst)
  52.    (setq ang  (angle cen p)
  53.  plst (cons
  54. (polar cen (+ ang (* 2 (- ac4 ang))) (distance cen p))
  55. plst
  56.       )
  57.    )
  58.  )
  59.  (foreach p (cdr plst)
  60.    (setq ang  (angle cen p)
  61.  plst (cons
  62. (polar cen (+ ang (* 2 (- ac0 ang))) (distance cen p))
  63. plst
  64.       )
  65.    )
  66.  )
  67.  (setq pl
  68.   'AddLightWeightPolyline
  69.  (setq plst
  70. (reverse (if cl
  71.    (cdr plst)
  72.    plst
  73.  )
  74. )
  75.  )
  76.   )
  77. )
  78.  )
  79.  (vlax-put pl 'Normal norm)
  80.  (vla-put-Elevation pl elv)
  81.  (mapcar '(lambda (i v) (vla-SetBulge pl i v))
  82.  '(0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16)
  83.  blst
  84.  )
  85.  (if cl
  86.    (vla-put-Closed pl :vlax-true)
  87.    (progn
  88.      (setq spt (vlax-curve-getClosestPointTo pl (vlax-get el 'Startpoint))
  89.    spa (vlax-curve-getParamAtPoint pl spt)
  90.    fspa (fix spa)
  91.    ept (vlax-curve-getClosestPointTo pl (vlax-get el 'Endpoint))
  92.    epa (vlax-curve-getParamAtPoint pl ept)
  93.    fepa (fix epa)
  94.    n 0
  95.      )
  96.      (cond
  97. ((equal spt (trans pt0 norm 0) 1e-9)
  98. (if (= epa fepa)
  99.   (setq plst (sublist plst 0 (1+ fepa))
  100. blst (sublist blst 0 (1+ fepa))
  101.   )
  102.   (setq erat (/ (- (vlax-curve-getDistAtParam pl epa)
  103. )
  104. (- (vlax-curve-getDistAtParam pl (rem (1+ fepa) 17))
  105. )
  106.      )
  107. plst (append (sublist plst 0 (1+ fepa))
  108.      (list (3dTo2dPt (trans ept 0 norm)))
  109.      )
  110. blst (append (sublist blst 0 (1+ fepa))
  111.      (list (k*bulge (nth fepa blst) erat))
  112.      )
  113.   )
  114. )
  115. )
  116. ((equal ept (trans pt0 norm 0) 1e-9)
  117. (if (= spa fspa)
  118.   (setq plst (sublist plst fspa nil)
  119. blst (sublist blst fspa nil)
  120.   )
  121.   (setq srat (/ (- (vlax-curve-getDistAtParam pl (rem (1+ fspa) 17))
  122. )
  123. (- (vlax-curve-getDistAtParam pl (rem (1+ fspa) 17))
  124. )
  125.      )
  126. plst (cons (3dTo2dPt (trans spt 0 norm))
  127.    (sublist plst (1+ fspa) nil)
  128.      )
  129. blst (cons (k*bulge (nth fspa blst) srat)
  130.    (sublist blst (1+ fspa) nil)
  131.      )
  132.   )
  133. )
  134. )
  135. (T
  136. (setq srat (/ (- (vlax-curve-getDistAtParam pl (rem (1+ fspa) 17))
  137.       )
  138.       (- (vlax-curve-getDistAtParam pl (rem (1+ fspa) 17))
  139.       )
  140.    )
  141.       erat (/ (- (vlax-curve-getDistAtParam pl epa)
  142.       )
  143.       (- (vlax-curve-getDistAtParam pl (rem (1+ fepa) 17))
  144.       )
  145.    )
  146. )
  147. (if (< epa spa)
  148.   (setq plst (append
  149. (if (= spa fspa)
  150.  (sublist plst fspa nil)
  151.  (cons (3dTo2dPt (trans spt 0 norm))
  152. (sublist plst (1+ fspa) nil)
  153.  )
  154. )
  155. (cdr (sublist plst 0 (1+ fepa)))
  156. (if (/= epa fepa)
  157.  (list (3dTo2dPt (trans ept 0 norm)))
  158. )
  159.      )
  160. blst (append
  161. (if (= spa fspa)
  162.  (sublist blst fspa nil)
  163.  (cons
  164.    (k*bulge (nth fspa blst) srat)
  165.    (sublist blst (1+ fspa) nil)
  166.  )
  167. )
  168. (sublist blst 0 fepa)
  169. (if (= epa fepa)
  170.  (list (nth fepa blst))
  171.  (list (k*bulge (nth fepa blst) erat))
  172. )
  173.      )
  174.   )
  175.   (setq plst (append
  176. (if (= spa fspa)
  177.  (sublist plst fspa (1+ (- fepa fspa)))
  178.  (cons (3dTo2dPt (trans spt 0 norm))
  179. (sublist plst (1+ fspa) (- fepa fspa))
  180.  )
  181. )
  182. (list (3dTo2dPt (trans ept 0 norm)))
  183.      )
  184. blst (append
  185. (if (= spa fspa)
  186.  (sublist blst fspa (- fepa fspa))
  187.  (cons
  188.    (k*bulge (nth fspa blst) srat)
  189.    (sublist blst (1+ fspa) (- fepa fspa))
  190.  )
  191. )
  192. (if (= epa fepa)
  193.  (list (nth fepa blst))
  194.  (list (k*bulge (nth fepa blst) erat))
  195. )
  196.      )
  197.   )
  198. )
  199. )
  200.      )
  201.      (vlax-put pl 'Coordinates (apply 'append plst))
  202.      (foreach b blst
  203. (vla-SetBulge pl n b)
  204. (setq n (1+ n))
  205.      )
  206.    )
  207.  )
  208.  pl
  209. )
  210.  
  211. ;; Ang<2pi
  212. ;; Returns the angle expression betweem 0 and 2*pi
  213. (defun ang<2pi (ang)
  214.  (if (and (<= 0 ang) (< ang (* 2 pi)))
  215.    ang
  216.    (ang<2pi (rem (+ ang (* 2 pi)) (* 2 pi)))
  217.  )
  218. )
  219.  
  220. ;; 3dTo2dPt
  221. ;; Returns the 2d point (x y) of a 3d point (x y z)
  222. (defun 3dTo2dPt (pt) (list (car pt) (cadr pt)))
  223.  
  224. ;; Tan
  225. ;; Returns the angle tangent
  226. (defun tan (a) (/ (sin a) (cos a)))
  227.  
  228. ;; SUBLIST
  229. ;; Returns a sub list
  230. ;;
  231. ;; Arguments
  232. ;; lst : a list
  233. ;; start : start index (first item = 0)
  234. ;; leng : the sub list length (number of items) or nil
  235. (defun sublist (lst start leng / n r)
  236.  (if (or (not leng) (< (- (length lst) start) leng))
  237.    (setq leng (- (length lst) start))
  238.  )
  239.  (setq n (+ start leng))
  240.  (while (< start n)
  241.    (setq r (cons (nth (setq n (1- n)) lst) r))
  242.  )
  243. )
  244.  
  245. ;; K*BULGE
  246. ;; Returns the proportinal bulge to the référence bulge
  247. ;; Arguments :
  248. ;; b : the bulge
  249. ;; k : the proportion ratio (between angles or arcs length)
  250. (defun k*bulge (b k / a)
  251.  (setq a (atan b))
  252.  (/ (sin (* k a)) (cos (* k a)))
  253. )
  254.  
  255. ;; EL2PL
  256. ;; Converts ellipses and elliptcal arcs into polylines
  257.  
  258. (defun c:el2pl (/ *error* fra acdoc ss)
  259.  (defun *error* (msg)
  260.    (if (and (/= msg "Fonction annulée")
  261.     (/= msg "Function cancelled")
  262. )
  263.      (princ (strcat (if (= "FRA" (getvar 'locale))
  264.       "\nErreur: "
  265.       "\Error: "
  266.     )
  267.     msg
  268.     )
  269.      )
  270.    )
  271.    (vla-endUndoMark acdoc)
  272.    (princ)
  273.  )
  274.  (if (ssget '((0 . "ELLIPSE")))
  275.    (progn
  276.      (vla-StartUndoMark acdoc)
  277.      (vlax-for e (setq ss (vla-get-ActiveSelectionSet acdoc))
  278. (EllipseToPolyline e)
  279.      )
  280.      (vla-delete ss)
  281.      (vla-EndUndoMark acdoc)
  282.    )
  283.  )
  284.  (princ)
  285. )
  286.  
  287. ;; PELL
  288. ;; Draws an ellipse or an elliptical arc approximation (polyline) on the fly
  289. (defun c:pell (/ *error* ec pe old ent)
  290.  (defun *error* (msg)
  291.    (if (and msg
  292.     (/= msg "Fonction annulée")
  293.     (/= msg "Function cancelled")
  294. )
  295.      (princ (strcat (if (= "FRA" (getvar 'locale))
  296.       "\nErreur: "
  297.       "\Error: "
  298.     )
  299.     msg
  300.     )
  301.      )
  302.    )
  303.    (setvar 'cmdecho ec)
  304.    (setvar 'pellipse pe)
  305.    (princ)
  306.  )
  307.  (setq ec  (getvar 'cmdecho)
  308. pe  (getvar 'pellipse)
  309. old (entlast)
  310.  )
  311.  (setvar 'cmdecho 1)
  312.  (setvar 'pellipse 0)
  313.  (command "_.ellipse")
  314.  (while (/= 0 (getvar 'cmdactive))
  315.    (command pause)
  316.  )
  317.  (if (not (eq old (setq ent (entlast))))
  318.    (progn
  319.      (EllipseToPolyline (vlax-ename->vla-object ent))
  320.      (entdel ent)
  321.    )
  322.  )
  323.  (*error* nil)
  324. )
Speaking English as a French Frog

gile

  • Water Moccasin
  • Posts: 2034
  • Marseille, France
Re: ellipse to arc
« Reply #6 on: March 17, 2017, 06:41:18 pm »
Warning, elliptical arc start point and end point might be slightly different after the conversion.
Keep in mind you can only approximate an ellispe with circular arcs.
The ellipse approximation in the upper code is the same as the on done by AutoCAD when PELLIPSE sysvar is set to 1.
« Last Edit: March 17, 2017, 06:47:14 pm by gile »
Speaking English as a French Frog

jack91066

  • Mosquito
  • Posts: 11
Re: ellipse to arc
« Reply #7 on: March 17, 2017, 07:04:52 pm »
sir ,
i need only arc object if because my cnc machine in take only arc boject.
i try to send some photo.

jack91066

  • Mosquito
  • Posts: 11
Re: ellipse to arc
« Reply #8 on: March 17, 2017, 07:06:34 pm »
i send another photo compare both photo

jack91066

  • Mosquito
  • Posts: 11
Re: ellipse to arc
« Reply #9 on: March 17, 2017, 07:16:09 pm »
;;-------------------=={ Ellipse to Arc }==-------------------;;
;;                                                            ;;
;;  Converts circular Ellipses & Elliptical Arcs (i.e. for    ;;
;;  which the Ellipse Axis Ratio = 1.0) to Circles & Arcs,    ;;
;;  whilst retaining all original properties. Works with      ;;
;;  Ellipses & Elliptical Arcs constructed in any UCS.        ;;
;;------------------------------------------------------------;;
;;  Author: Lee Mac, Copyright © 2013 - www.lee-mac.com       ;;
;;------------------------------------------------------------;;

(defun c:e2a ( / a b c e i m p q r s u v z )   
    (if (setq s (ssget "_:L" '((0 . "ELLIPSE") (40 . 1.0))))
        (repeat (setq i (sslength s))
            (setq e (entget (ssname s (setq i (1- i))))
                  z (cdr (assoc 210 e))
                  c (trans (cdr (assoc 10 e)) 0 z)
                  p (trans (cdr (assoc 11 e)) 0 z)
                  a (distance '(0.0 0.0) p)
                  b (* a (cdr (assoc 40 e)))
                  r (angle '(0.0 0.0) p)
                  u (cdr (assoc 41 e))
                  v (cdr (assoc 42 e))
                  m (list (list (cos r) (- (sin r))) (list (sin r) (cos r)))
                  p (mapcar '+ c (mxv m (list (* a (cos u)) (* b (sin u)))))
                  q (mapcar '+ c (mxv m (list (* a (cos v)) (* b (sin v)))))
            )
            (if
                (if (equal p q 1e-8)
                    (entmake
                        (cons '(0 . "CIRCLE")
                            (append (LM:defaultprops e)
                                (list
                                    (cons  010 c)
                                    (cons  040 a)
                                    (assoc 210 e)
                                )
                            )
                        )
                    )
                    (entmake
                        (cons '(0 . "ARC")
                            (append (LM:defaultprops e)
                                (list
                                    (cons  010 c)
                                    (cons  040 a)
                                    (cons  050 (angle c p))
                                    (cons  051 (angle c q))
                                    (assoc 210 e)
                                )
                            )
                        )
                    )
                )
                (entdel (cdr (assoc -1 e)))
            )
        )
    )
    (princ)
)

;; Default Properties  -  Lee Mac
;; Returns a list of DXF properties for the supplied DXF data,
;; substituting default values for absent DXF groups

(defun LM:defaultprops ( elist )
    (mapcar
        (function
            (lambda ( pair )
                (cond ((assoc (car pair) elist)) ( pair ))
            )
        )
       '(
            (008 . "0")
            (006 . "BYLAYER")
            (039 . 0.0)
            (062 . 256)
            (048 . 1.0)
            (370 . -1)
        )
    )
)

;; Matrix x Vector  -  Vladimir Nesterovsky
;; Args: m - nxn matrix, v - vector in R^n

(defun mxv ( m v )
    (mapcar '(lambda ( r ) (apply '+ (mapcar '* r v))) m)
)

(princ)

jack91066

  • Mosquito
  • Posts: 11
Re: ellipse to arc
« Reply #10 on: March 17, 2017, 07:19:57 pm »
i use that coding but if major and minor radius is same that coding is work.
if i change major and minor radius  then that coding is not working.
if any coding have please share ........

roy_043

  • Swamp Rat
  • Posts: 1407
  • BricsCAD 16
Re: ellipse to arc
« Reply #11 on: March 17, 2017, 08:00:26 pm »
Why not use Gile's EllipseToPolyline function and then explode the resulting polyline?

jack91066

  • Mosquito
  • Posts: 11
Re: ellipse to arc
« Reply #12 on: March 17, 2017, 08:14:46 pm »
sir
roy_043

my cnc machine is only take arc object,
if you have any idea about it..

gile

  • Water Moccasin
  • Posts: 2034
  • Marseille, France
Re: ellipse to arc
« Reply #13 on: March 18, 2017, 03:36:52 am »
Hi,

As said roy_043, you can simply explode the polylines generated by EL2PL and so get only arcs.

a video
Speaking English as a French Frog

jack91066

  • Mosquito
  • Posts: 11
Re: ellipse to arc
« Reply #14 on: March 18, 2017, 03:52:47 pm »
thanks Gile's and roy_04 sir..............