0 Members and 1 Guest are viewing this topic.
;;;===========================================;;; Single Line Break Symbol Creator ;;;===========================================;;;;| Created by C. Alan Butler 2003 Yet another Break symbol creator Uses PloyLine created on the current layer Ortho Mode is up to you to pre set or not Symbol is proportional to the length and doesn't break anything [ Modified 01/06/2004 ] extends the break line out from the two picks|; ;(defun c:brk (/ p1 p2 p3 p4 p5 p6 dist ang usercmd) ; ; error function & Routine Exit (defun *error* (msg) (if (not (member msg '("console break" "Function cancelled" "quit / exit abort" "") ) ) (princ (strcat "\nError: " msg)) ) ; if (setvar "CMDECHO" usercmd) (setvar "osmode" useros) (princ) ) ; ;end error function (setq oldcmd (getvar "CMDECHO")) (setvar "CMDECHO" 0) (setq useros (getvar "osmode")) (setq usercmd (getvar "CMDECHO")) (setvar "CMDECHO" 0) (setvar "plinewid" 0) (if (and (setq p1 (getpoint "Starting point of line : ")) (setq p6 (getpoint p1 "\nSelect second point: ")) ) (progn (setq dist (distance p1 p6) ang (angle p1 p6) p1 (polar p1 (- ang pi) (* 0.3 dist)) p6 (polar p6 ang (* 0.3 dist)) dist (distance p1 p6) ) (setq p2 (polar p1 ang (* 0.4167 dist)) p5 (polar p1 ang (* 0.5833 dist)) p3 (polar p2 (+ 1.25664 ang) (* 0.1667 dist)) p4 (polar p5 (+ 4.39824 ang) (* 0.1667 dist)) ) ;_ end of setq ;; create extension points (setvar "osmode" 0) (command "pline" p1 p2 p3 p4 p5 p6 "") ; Draw the Z-Line ) ) (*error* "") (princ))(prompt "\nBreak Symbol Creator loaded. Type BRK to run it.")(princ)
...but there are times when the break symbol is larger than the distance to to break. did i confuse ya?
; BRL.lsp; Copyright ©1994 J.J.Damstra; Modified for TheSwamp.org 13-01-2005(defun c:brl (/ a a1 a2 af1 af2 hoek entp entq entv ep le p1 p2 p3 p4 p5 p6 sp) (setq sp (getpoint "\nPoint 1:") ep (trans (getpoint sp "\nPoint 2:") 1 0) sp (trans sp 1 0)) (setq le (distance sp ep) hoek (angle sp ep)) (setq a1 (+ 1 (fix (/ le (* 25 (getvar "DIMSCALE"))))) a (/ le a1) a2 (/ a 2.0)) (setq af1 (* 1 (getvar "DIMSCALE")) af2 (* 1.5 (getvar "DIMSCALE"))) (setq entp (list (cons 0 "polyline"))) (setq entv (cons 0 "vertex")) (setq entq (list (cons 0 "seqend"))) (entmake entp) (setq p1 (cons 10 sp)) (entmake (list entv p1)) (repeat a1 (setq p2 (cons 10 (polar (cdr p1) hoek a2)) p3 (cons 10 (polar (cdr p2) (+ hoek pi) af1)) p4 (cons 10 (polar (cdr p2) (+ hoek (* pi 0.6)) af2)) p5 (cons 10 (polar (cdr p2) (- hoek (* pi 0.4)) af2)) p6 (cons 10 (polar (cdr p2) hoek af1)) ) (entmake (list entv p3)) (entmake (list entv p4)) (entmake (list entv p5)) (entmake (list entv p6)) (setq p1 p2 a2 a) ) (setq ep (cons 10 ep)) (entmake (list entv ep)) (entmake entq) (princ))