cadman_meg
Usenet Archive
- Joined
- Jul 14, 2003
- Messages
- 51
- Reaction score
- 0
Could someone please add the functionality of picking which side of the primary line to add the arc? It also creates a circle for some reason rather than an arc like it should, maybe you could fix that as well please. When finished you could email it to me at . I really appreciate the help. Here is the routine:
(defun C
LBREAK2 (/ CMDE CNT ENAM1 ENAM2 EOBJ1 EOBJ2 PTLST PTLST2 SSETC SSETL) (initget 7) (setq RAD (getdist "\nEnter hump radius: ")) (while (not (setq ESEL1 (entsel "\nSelect primary line: "))) (princ "\nNull selection, please select again: ")  
(while (not (setq ESEL2 (entsel "\nSelect line to be broken: "))) (princ "\nNull selection, please select again: ")  
(setq ENAM1 (car ESEL1) EOBJ1 (vlax-ename->vla-object ENAM1) ENAM2 (car ESEL2) EOBJ2 (vlax-ename->vla-object ENAM2) PTLST (vlax-safearray->list (variant-value (vla-intersectwith EOBJ1 EOBJ2 0)  
 
CNT 0  
(setq PTLST (point_list PTLST)) (vla-put-visible EOBJ1 :vlax-false) (setq ENAM4 (entlast)) (setq CMDE (getvar "cmdecho")) (setvar "cmdecho" 0) (foreach N PTLST (print N) (vl-cmdf "circle" N RAD) (setq ENAM3 (entlast)) (if SSETC (setq SSETC (ssadd ENAM3 SSETC)) (setq SSETC (ssadd ENAM3))  
(vl-cmdf "trim" ENAM3 "" N "")
 
(while (setq ENAM4 (entnext ENAM4))
(if SSETL
(setq SSETL (ssadd ENAM4 SSETL))
(setq SSETL (ssadd ENAM4))
 
 
(setq CNT 0)
(repeat (sslength SSETC)
(setq ENAM (ssname SSETC CNT)
CNT (1+ CNT) EOBJ (vlax-ename->vla-object ENAM) TPTS (point_list (vlax-safearray->list (variant-value (vla-intersectwith EOBJ EOBJ1 0)  
 
 
 
(vl-cmdf "trim" SSETL ""
(if (< (distance (car TPTS) (list 0.0 0.0 0.0)) (distance (cadr TPTS) (list 0.0 0.0 0.0))  
(car TPTS) (cadr TPTS)  
""  
 
(vla-put-visible EOBJ1 :vlax-true) (vl-cmdf "pedit" (ssname SSETC 0) "Y" "J" SSETC SSETL "" "") (setvar "cmdecho" CMDE) ) ; This routine converts coordinate list into a list of points (defun POINT_LIST (PTLST / CNT PTLST2) (setq CNT 0) (repeat (/ (length PTLST) 3) (setq PTLST2 (cons (list (nth (+ 0 (* CNT 3)) PTLST) (nth (+ 1 (* CNT 3)) PTLST) (nth (+ 2 (* CNT 3)) PTLST)  
PTLST2  
CNT (1+ CNT)  
 
PTLST2 )
(defun C
 
(while (setq ENAM4 (entnext ENAM4))
(if SSETL
(setq SSETL (ssadd ENAM4 SSETL))
(setq SSETL (ssadd ENAM4))
 
 
(setq CNT 0)
(repeat (sslength SSETC)
(setq ENAM (ssname SSETC CNT)
CNT (1+ CNT) EOBJ (vlax-ename->vla-object ENAM) TPTS (point_list (vlax-safearray->list (variant-value (vla-intersectwith EOBJ EOBJ1 0)  
 
(vl-cmdf "trim" SSETL ""
(if (< (distance (car TPTS) (list 0.0 0.0 0.0)) (distance (cadr TPTS) (list 0.0 0.0 0.0))