Author Topic: curly bracket  (Read 1980 times)

0 Members and 1 Guest are viewing this topic.

Notsober

  • Guest
curly bracket
« on: November 07, 2007, 11:44:29 AM »
Is there a routine that will help me make adjustable/sizable/scalable curly brackets without the use of text?

Using the curly bracket with text makes the curly bracket too large. And of course, it's not possible to scale text in just x OR y axes.

Any suggestions?

Notsober

  • Guest
Re: curly bracket
« Reply #1 on: November 07, 2007, 11:57:25 AM »
nevermind... I converted a spline into a block and scaled it that way.

not fancy or anything, but it'll do.

deegeecees

  • Guest
Re: curly bracket
« Reply #2 on: November 07, 2007, 12:19:24 PM »
Is there a routine that will help me make adjustable/sizable/scalable curly brackets without the use of text?

Using the curly bracket with text makes the curly bracket too large. And of course, it's not possible to scale text in just x OR y axes.

Any suggestions?


You know, I have one that I made a long time ago. It ain't pretty, but it works. I can't believe someone actually needs this. This is strange...

Just remove the stuff in RED if you don't need the Layer option (you'd have to adjust for the Title Block as well).

Code: [Select]
;bracket.lsp
;Created for G.E.I.S. by P.R. Donnelly
;Date: Sept of 2002
;Description: Creates brackets for text and such...
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;start prog


(defun dtr (A)
   (* pi (/ A 180.0)))

[color=red](defun getinfo ()
(setq tester1 (SSGET "X" (LIST (CONS 0 "insert") (CONS 2 "Tsbder57"))))
(if tester1
(progn
(SETQ fixer1 (ssname tester1 0))
(SETQ ats3 (ENTGET fixer1))
(if ats3
(progn
(setq wutscale (cdr (assoc 41 ats3)))
(setq wutscale (/ wutscale 16))
)
)
)
(progn
(setq wutscale 0.125)
(alert "No Border to set scale, default scale is 0.0625")
)
)

(setq zz nil
      xx "Yes")
(setq ts (tblsearch "layer" "MISC"))
(if (null ts)
(prompt "\nCreating layer MISC")
(progn
(if (= (logand 1 (cdr (assoc 70 ts))) 1)
(progn
(prompt "\nLayer MISC is frozen. ")
(initget "Yes No")
(setq xx (getkword "\nThaw layer MISC and proceed? Yes/<No>: "))
(if (= xx "Yes")
(command "layer" "t" "MISC" "")
)
)
)
)
)
(if (= xx "Yes")
(progn
(command "layer" "m" "MISC" "c" "blue" "MISC" "")
)
)
)[/color]


(defun c:bracket ()
(setq oldplinew (getvar "plinewid"))
(setvar "plinewid" 0)
(setq oldlay (getvar "clayer"))

[color=red](getinfo);;;;;TAKE THIS OUT TOO[/color]

(setq pnt1 (getpoint "\nSelect point for bottom of bracket:"))
(setq pnt1x (car pnt1))
(setq pnt1y (cdr pnt1))
(setq pnt1y (car pnt1y))
(setq pnt1x2str (rtos pnt1x))
(setq pnt1y2str (rtos pnt1y))
(setq pnt1xy (strcat pnt1x2str " " pnt1y2str))
;(alert pnt1xy);;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;debugger

;(setq ormod (getvar "orthomode"))
;(setvar "orthomode" 1)
(setq pnt2 (getpoint pnt1 "\nSelect point for top of bracket:"))
;(setvar "orthomode" ormod)
(setq ang1 (angle pnt1 pnt2))
(setq pnt2x (car pnt2))
(setq pnt2y (cdr pnt2))
(setq pnt2y (car pnt2y))
(setq pnt2x2str (rtos pnt2x))
(setq pnt2y2str (rtos pnt2y))
(setq pnt2xy (strcat pnt2x2str " " pnt2y2str))
;(alert pnt2xy);;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;debugger

(setq pnt3 (polar pnt1 (angle pnt1 pnt2) (/ (distance pnt1 pnt2) 2)))
(setq pnt4 (polar pnt3 (+ (dtr 180) ang1) wutscale))
(setq pnt5 (polar pnt3 ang1 wutscale))
(setq pnt6 (polar pnt3 (+ (dtr 270) ang1) wutscale))
(setq pnt7 (polar pnt1 (+ (dtr 135) ang1) wutscale))
(setq pnt8 (polar pnt2 (+ (dtr 45) ang1) wutscale))
(command "pline" pnt7 pnt1 pnt4 pnt6 pnt5 pnt2 pnt8 "")
(setvar "clayer" oldlay)
(setvar "plinewid" oldplinew)
(princ)



)