home *** CD-ROM | disk | FTP | other *** search
- ;Paste lines or arcs together (kinda glitchy but it works and wont nuke
- ;anything)
- ; ********Patrick J. McKee, author********
- ; ****Copyright 1992, Power Key tm****
- ;
- (defun c:gl()
- (setq oer *error* *error* err2)
- (setq e1(car(entsel "\nPick first entity : ")))
- (setq e2(car(entsel "\nPick second entity: ")))
- (if(equal e1 e2)(err))
- (setq et1(cdr(assoc 0(entget e1))))
- (if(= et1 "LINE")(ga))
- (setq cp1(cdr(assoc 10(entget e1))))
- (setq cp3(cdr(assoc 10(entget e2))))
- (setq la1(cdr(assoc 8(entget e1))))
- (setq asp1(polar cp1(cdr(assoc 50(entget e1)))(cdr(assoc 40(entget e1)))))
- (setq asp2(polar cp1(cdr(assoc 51(entget e1)))(cdr(assoc 40(entget e1)))))
- (setq asp3(polar cp3(cdr(assoc 50(entget e2)))(cdr(assoc 40(entget e2)))))
- (setq asp4(polar cp3(cdr(assoc 51(entget e2)))(cdr(assoc 40(entget e2)))))
- (command"erase" e1 e2 "")
- (if(<(distance asp1 asp3)(distance asp1 asp4))
- (setq ep asp4 mp asp3 d(distance asp1 asp3))
- (setq ep asp3 mp asp4 d(distance asp1 asp4)))
- (if(<(distance asp2 asp3)(distance asp2 asp4))
- (setq ep1 asp4 mp1 asp3 d1(distance asp2 asp3))
- (setq ep1 asp3 mp1 asp4 d1(distance asp2 asp4)))
- (if(< d d1)
- (command "arc" asp2 mp ep)
- (command "arc" asp1 mp1 ep1))
- (command "change"(entlast)"" "p" "la" la1 "")
- (princ))
- (defun ga()
- (setq pt1(cdr(assoc 10(entget e1))))
- (setq pt2(cdr(assoc 11(entget e1))))
- (setq pt3(cdr(assoc 10(entget e2))))
- (setq pt4(cdr(assoc 11(entget e2))))
- (command "erase" e2 "")
- (if(>(distance pt1 pt3)(distance pt1 pt4))
- (command "change" e1 "" pt3)
- (command "change" e1 "" pt4))
- (princ))