TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Vikram on February 01, 2021, 05:05:55 AM
-
I need a lisp or a method to break the circle in 2 or more parts. I used to use AutoCAD previously so Lee Mac's circle break lisp was very helpful for me. Now my company have started using ProgeCAD/IntelliCAD and that lisp is not compatible with that lisp as it partially supports visual functions. You can see the combability on this link. https://www.progesoft.com/products/progecad-professional/manual?mp=understanding-autocad-compatibility/programming-progecad/understanding-autolisp-compatibility (https://www.progesoft.com/products/progecad-professional/manual?mp=understanding-autocad-compatibility/programming-progecad/understanding-autolisp-compatibility)
Whenever I use cbrk command and select the two points to break my IntelliCAD crashes.
I have attached Lee Macs lisp to break circle.
My project is stuck due to this! :sick:
-
Hi Vikram,
Not sure if the below will work in Progecad, but it uses native commands, so could work.
"If you convert a circle to a polyline and then explode it, you're left with 2 arcs -- a top arc and a bottom arc. If you select both arcs, you can drag the left and right endpoints of those arcs to the points on the circle where you wanted it broken"
-
RE: "If you convert a circle to a polyline and then explode it, you're left with 2 arcs -
------------------------
You see my Demo. Circle2Polyline .
(Defun dfn_cmd_circlebreak(en1 / cls nop xlm p obj ctr dia occ prv ra3 old) (asserte "A232")
(setq;|a13812|;
nam (car en1)
xlm (entget nam)
p (cadr en1)
old (entlast)
obj (cdr (assoc 0 xlm))) (if (= obj "CIRCLE") (progn (setq;|a13986|;
occ (cdr (assoc 62 xlm))
ra3 (cdr (assoc 40 xlm))
ctr (cdr (assoc 10 xlm))
xlm (if (/= occ nil) (subst (cons 62 11) (cons 62 occ) xlm) (subst (cons 62 12) nil xlm))
xlm (subst (cons 40 (* ra3 0.78)) (cons 40 ra3) xlm)) (entmakex (cdr xlm)))) (if (/= old (entlast)) (progn (setq;|a14372|;
dia (* 2.0 ra3)
cls (dfn_getx_readkey "[YN]" "Pline-toClose(y.yes)(n.no): ")) (if (= cls "Y") (command "_.break" p (polar p (/ kpi 4) 0.001) "_.pedit" p "_y" "_c" "_x") (command "_.break" p (polar p (/ kpi 4) 0.001) "_.pedit" p "_y" "_x"))))
)
You execute (dfn_cmd_circlebreak (entsel)) at line-command.
The "0.78" is decrease of radius. You replace with 1.0 for same-radius with circle/s.
For quickUnderstand you replace ~cls (dfn_getx_readkey "[YN]" ~ with
(setq cls "Y"),.
-
Thanks for your time appreciate your help but It dint work on ProgeCAD. But making it polyline and breaking it worked for me.
-
The other alternative is 1st principals know radius, know centre pt, erase circle, make an arc angle 0-PI, 2nd arc pi-2*pi using command or entmake should work with any cad.