565 lines
20 KiB
Plaintext
565 lines
20 KiB
Plaintext
;------------------------------------------------------------------------;
|
|
; Baugruppe oder Sonder aus 1 Weiche - links oder rechts (STAHL) ;
|
|
;------------------------------------------------------------------------;
|
|
; AW 12.05.93 ;
|
|
;------------------------------------------------------------------------;
|
|
|
|
(defun datain ()
|
|
(setq ALTFANG (getvar "osmode"))
|
|
(setq MUFFE-ZAEHLER 0)
|
|
(setq auswahl-satz nil)
|
|
;------------------------
|
|
;>>>> Eingabeteil <<<<<<<
|
|
;------------------------
|
|
(initget (+ 2 4))
|
|
(setq RADIUS (getint "\nRadius (1)=650/ (2)=400/ (3)=175 <1>: "))
|
|
(if (or (= RADIUS nil) (< RADIUS 1) (> RADIUS 3))
|
|
(setq RADIUS 1)
|
|
)
|
|
|
|
(initget "L R")
|
|
(setq RICHTUNG (getkword "\n(L)inks oder (R)echts ? <L>: "))
|
|
(if (not RICHTUNG)
|
|
(setq RICHTUNG "L")
|
|
)
|
|
(setq RICHTUNG (strcase RICHTUNG))
|
|
|
|
(initget "W B")
|
|
(setq ABSCHLUSS (getkword "\n(W)eiche oder (B)ogen ? <W>: "))
|
|
(if (not ABSCHLUSS)
|
|
(setq ABSCHLUSS "W")
|
|
)
|
|
(if (= RADIUS 2)
|
|
(setq ABSCHLUSS "B")
|
|
)
|
|
(setq ABSCHLUSS (strcase ABSCHLUSS))
|
|
|
|
(initget (+ 1 2 4))
|
|
|
|
(setq PT01 (getpoint "\nAnfangspunkt antippen: "))
|
|
(setq PT0 (getpoint PT01 "\nSchnittpunkt antippen: "))
|
|
(setq PT02 (getpoint PT0 "\nEndpunkt antippen: "))
|
|
|
|
(setvar "osmode" 0)
|
|
|
|
(setq WINK_RAD1 (angle PT01 PT0))
|
|
(setq WINK_GRA1 (/ (* WINK_RAD1 180) pi))
|
|
(if (= RICHTUNG "L")
|
|
(setq WINK_RAD2 (+ WINK_RAD1 (/ pi 4)))
|
|
(setq WINK_RAD2 (- WINK_RAD1 (/ pi 4)))
|
|
)
|
|
(setq WINK_GRA2 (/ (* WINK_RAD2 180) pi))
|
|
;------------------;
|
|
;Abst„nde berechnen;
|
|
;------------------;
|
|
|
|
; (setq L1 (* (fix (/ (+ (distance PT01 PT0) 1) 2)) 2))
|
|
; (setq L2 (* (fix (/ (+ (distance PT0 PT02) 1)2)) 2))
|
|
(setq L1 (distance PT01 PT0))
|
|
(setq L2 (distance PT0 PT02))
|
|
|
|
(if (= RADIUS 1) ; Radius 650
|
|
(progn
|
|
(if (or (< L1 325) (> L1 1800) (< L2 360) (> L2 1800))
|
|
(progn
|
|
(alert "Abstand zu groá oder zu klein ...")
|
|
(setvar "osmode" ALTFANG)
|
|
(exit)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(if (= RADIUS 2) ; Radius 400
|
|
(progn
|
|
(if (or (< L1 190) (> L1 1800) (< L2 268) (> L2 1800))
|
|
(progn
|
|
(alert "Abstand zu groá oder zu klein ...")
|
|
(setvar "osmode" ALTFANG)
|
|
(exit)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(if (= RADIUS 3) ; Radius 175
|
|
(progn
|
|
(if (or (< L1 170) (> L1 1800) (< L2 148) (> L2 1800))
|
|
(progn
|
|
(alert "Abstand zu groá oder zu klein ...")
|
|
(setvar "osmode" ALTFANG)
|
|
(exit)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
;------------------------------------------------------------
|
|
(princ (strcat "\nL1= " (rtos L1) " | L2= " (rtos L2)
|
|
" W1= " (rtos WINK_RAD1 3 3) " | W2= " (rtos WINK_RAD2 3 3)
|
|
"\n"))
|
|
;--------
|
|
; Muffen
|
|
;--------
|
|
(command "_layer" "_m" "L-6" "_c" "6" "" "")
|
|
(command "_insert" (strcat lw "/prog/acad/layout/muffe") PT01 "" "" "0")
|
|
(attribute-aendern "0" "0" "" "" "" "" "825002016" "MUFFE ANGESCHWEISST (BG)" "" "")
|
|
(setq auswahl-satz (ssget "_L"))
|
|
(setq MUFFE-ZAEHLER (+ MUFFE-ZAEHLER 1))
|
|
(command "_insert" (strcat lw "/prog/acad/layout/muffe") PT02 "" "" "0")
|
|
(attribute-aendern "0" "0" "" "" "" "" "825002016" "MUFFE ANGESCHWEISST (BG)" "" "")
|
|
(ssadd (entlast) auswahl-satz)
|
|
(setq MUFFE-ZAEHLER (+ MUFFE-ZAEHLER 1))
|
|
(if (= ABSCHLUSS "W")
|
|
(progn
|
|
(command "_layer" "_m" "L-7" "_c" "7" "" "")
|
|
(if (= RADIUS 3)
|
|
(command "_insert" (strcat lw "/prog/acad/layout/muffe") (polar PT0 WINK_RAD1 550) "" "" "0")
|
|
(command "_insert" (strcat lw "/prog/acad/layout/muffe") (polar PT0 WINK_RAD1 375) "" "" "0")
|
|
)
|
|
(attribute-aendern "0" "0" "" "" "" "" "825004017" "DREIKANTLASCHE" "" "")
|
|
(ssadd (entlast) auswahl-satz)
|
|
)
|
|
)
|
|
(command "_layer" "_m" "L-3" "_c" "3" "" "")
|
|
)
|
|
|
|
(defun geometrie-650()
|
|
;-----------------------------------------
|
|
; Abst„nde analysieren und Elemente setzen
|
|
;-----------------------------------------
|
|
;***************
|
|
; L1 bearbeiten
|
|
;***************
|
|
|
|
(if (= ABSCHLUSS "W")
|
|
(progn
|
|
(cond
|
|
(
|
|
(< L1 425)
|
|
(command "_layer" "_m" "L-1" "_c" "1" "" "")
|
|
(if (= RICHTUNG "L")
|
|
(progn
|
|
(command "_insert" (strcat lw "/prog/acad/layout/w45650l3") PT0 "" "" (rtos WINK_GRA1))
|
|
(attribute-aendern "0" "0" "" (rtos L1) "" "" "824052012" " (BG)" "" "")
|
|
(ssadd (entlast) auswahl-satz)
|
|
)
|
|
(progn
|
|
(command "_insert" (strcat lw "/prog/acad/layout/w45650r3") PT0 "" "" (rtos WINK_GRA1))
|
|
(attribute-aendern "0" "0" "" (rtos L1) "" "" "824052011" " (BG)" "" "")
|
|
(ssadd (entlast) auswahl-satz)
|
|
)
|
|
)
|
|
(if (> L1 325)
|
|
(progn
|
|
(setq PT3 (polar PT01 WINK_RAD1 (- L1 325)))
|
|
(command "_line" PT01 PT3 "")
|
|
(ssadd (entlast) auswahl-satz)
|
|
)
|
|
)
|
|
)
|
|
|
|
(
|
|
(and (>= L1 425) (<= L1 1800))
|
|
(command "_layer" "_m" "L-3" "_c" "3" "" "")
|
|
(if (= RICHTUNG "L")
|
|
(command "_insert" (strcat lw "/prog/acad/layout/w45650l4") PT0 "" "" (rtos WINK_GRA1))
|
|
(command "_insert" (strcat lw "/prog/acad/layout/w45650r4") PT0 "" "" (rtos WINK_GRA1))
|
|
)
|
|
(attribute-aendern "0" "0" "" "" "" "" "" " (BG)" "" "")
|
|
(ssadd (entlast) auswahl-satz)
|
|
(if (> L1 426) ; sonst wird auch bei 425,3 Verbindung gesetzt!
|
|
(progn
|
|
(setq PT3 (polar PT01 WINK_RAD1 (- L1 425)))
|
|
(command "_insert" (strcat lw "/prog/acad/layout/verbind") PT3 "0.5" "0.5" (rtos WINK_GRA1))
|
|
(ssadd (entlast) auswahl-satz)
|
|
(command "_insert" (strcat lw "/prog/acad/layout/stbg") PT01 (- L1 425) "1" (rtos WINK_GRA1))
|
|
(attribute-aendern "0" "0" "" (rtos (- L1 425)) "" "" ""
|
|
(strcat " L=" (rtos (- L1 425))) "" "")
|
|
(ssadd (entlast) auswahl-satz)
|
|
)
|
|
)
|
|
)
|
|
) ; endcond
|
|
) ;----end PROGN
|
|
) ;---- endif ABSCHLUSS="W"
|
|
|
|
(if (= ABSCHLUSS "B")
|
|
(progn
|
|
(cond
|
|
(
|
|
(< L1 425)
|
|
(command "_layer" "_m" "L-1" "_c" "1" "" "")
|
|
(if (= RICHTUNG "L")
|
|
(command "_insert" (strcat lw "/prog/acad/layout/s45650l3") PT0 "" "" (rtos WINK_GRA1))
|
|
(command "_insert" (strcat lw "/prog/acad/layout/s45650r3") PT0 "" "" (rtos WINK_GRA1))
|
|
)
|
|
(attribute-aendern "0" "0" "" (rtos L1) "" "" "" " SONDER IN (BG)" "" "")
|
|
(ssadd (entlast) auswahl-satz)
|
|
(if (> L1 700)
|
|
(progn
|
|
(setq PT3 (polar PT01 WINK_RAD1 (- L1 325)))
|
|
(command "_line" PT01 PT3 "")
|
|
(ssadd (entlast) auswahl-satz)
|
|
)
|
|
)
|
|
)
|
|
|
|
(
|
|
(and (>= L1 425) (<= L1 1800))
|
|
(command "_layer" "_m" "L-3" "_c" "3" "" "")
|
|
(if (= RICHTUNG "L")
|
|
(command "_insert" (strcat lw "/prog/acad/layout/s45650l4") PT0 "" "" (rtos WINK_GRA1))
|
|
(command "_insert" (strcat lw "/prog/acad/layout/s45650r4") PT0 "" "" (rtos WINK_GRA1))
|
|
)
|
|
(attribute-aendern "0" "0" "" "" "" "" "" " (BG)" "" "")
|
|
(ssadd (entlast) auswahl-satz)
|
|
(if (> L1 426)
|
|
(progn
|
|
(setq PT3 (polar PT01 WINK_RAD1 (- L1 425)))
|
|
(command "_insert" (strcat lw "/prog/acad/layout/verbind") PT3 "0.5" "0.5" (rtos WINK_GRA1))
|
|
(ssadd (entlast) auswahl-satz)
|
|
(command "_insert" (strcat lw "/prog/acad/layout/stbg") PT01 (- L1 425) "1" (rtos WINK_GRA1))
|
|
(attribute-aendern "0" "0" "" (rtos (- L1 425)) "" "" ""
|
|
(strcat " L=" (rtos (- L1 425))) "" "")
|
|
(ssadd (entlast) auswahl-satz)
|
|
)
|
|
)
|
|
)
|
|
) ; endcond
|
|
) ;----end PROGN
|
|
) ;---- endif ABSCHLUSS="B"
|
|
|
|
|
|
;***************
|
|
; L2 bearbeiten
|
|
;***************
|
|
(cond
|
|
(
|
|
(< L2 565)
|
|
(command "_layer" "_m" "L-1" "_c" "1" "" "")
|
|
(if (> L2 360)
|
|
(progn
|
|
(setq PT4 (polar PT0 WINK_RAD2 360))
|
|
(command "_line" PT02 PT4 "")
|
|
(ssadd (entlast) auswahl-satz)
|
|
)
|
|
)
|
|
)
|
|
|
|
(
|
|
(and (>= L2 565) (<= L2 1800))
|
|
(command "_layer" "_m" "L-3" "_c" "3" "" "")
|
|
(if (> L2 565)
|
|
(progn
|
|
(setq PT4 (polar PT0 WINK_RAD2 565))
|
|
(command "_insert" (strcat lw "/prog/acad/layout/verbind") PT4 "0.5" "0.5" (rtos WINK_GRA2))
|
|
(ssadd (entlast) auswahl-satz)
|
|
(command "_insert" (strcat lw "/prog/acad/layout/stbg") PT4 (- L2 565) "1" (rtos WINK_GRA2))
|
|
(attribute-aendern "0" "0" "" (rtos (- L2 565)) "" "" ""
|
|
(strcat " L=" (rtos (- L2 565))) "" "")
|
|
(ssadd (entlast) auswahl-satz)
|
|
)
|
|
)
|
|
)
|
|
) ; endcond
|
|
)
|
|
|
|
(defun geometrie-400()
|
|
;-----------------------------------------
|
|
; Abst„nde analysieren und Elemente setzen
|
|
;-----------------------------------------
|
|
;***************
|
|
; L1 bearbeiten
|
|
;***************
|
|
|
|
(if (= ABSCHLUSS "B")
|
|
(progn
|
|
(cond
|
|
(
|
|
(< L1 270)
|
|
(command "_layer" "_m" "L-1" "_c" "1" "" "")
|
|
(if (= RICHTUNG "L")
|
|
(command "_insert" (strcat lw "/prog/acad/layout/s45400l5") PT0 "" "" (rtos WINK_GRA1))
|
|
(command "_insert" (strcat lw "/prog/acad/layout/s45400r5") PT0 "" "" (rtos WINK_GRA1))
|
|
)
|
|
(attribute-aendern "0" "0" "" (rtos L1) "" "" "" " SONDER IN (BG)" "" "")
|
|
(ssadd (entlast) auswahl-satz)
|
|
(if (> L1 190)
|
|
(progn
|
|
(setq PT3 (polar PT01 WINK_RAD1 (- L1 190)))
|
|
(command "_line" PT01 PT3 "")
|
|
(ssadd (entlast) auswahl-satz)
|
|
)
|
|
)
|
|
)
|
|
|
|
(
|
|
(and (>= L1 270) (<= L1 1800))
|
|
(command "_layer" "_m" "L-3" "_c" "3" "" "")
|
|
(if (= RICHTUNG "L")
|
|
(command "_insert" (strcat lw "/prog/acad/layout/s45400l5") PT0 "" "" (rtos WINK_GRA1))
|
|
(command "_insert" (strcat lw "/prog/acad/layout/s45400r5") PT0 "" "" (rtos WINK_GRA1))
|
|
)
|
|
(attribute-aendern "0" "0" "" "" "" "" "" " (BG)" "" "")
|
|
(ssadd (entlast) auswahl-satz)
|
|
(if (> L1 270)
|
|
(progn
|
|
(setq PT3 (polar PT01 WINK_RAD1 (- L1 270)))
|
|
(command "_insert" (strcat lw "/prog/acad/layout/verbind") PT3 "0.5" "0.5" (rtos WINK_GRA1))
|
|
(ssadd (entlast) auswahl-satz)
|
|
(command "_insert" (strcat lw "/prog/acad/layout/stbg") PT01 (- L1 270) "1" (rtos WINK_GRA1))
|
|
(attribute-aendern "0" "0" "" (rtos (- L1 270)) "" "" ""
|
|
(strcat " L=" (rtos (- L1 270))) "" "")
|
|
(ssadd (entlast) auswahl-satz)
|
|
)
|
|
)
|
|
)
|
|
) ; endcond
|
|
) ;----end PROGN
|
|
) ;---- endif ABSCHLUSS="B"
|
|
|
|
|
|
;***************
|
|
; L2 bearbeiten
|
|
;***************
|
|
(cond
|
|
(
|
|
(< L2 565)
|
|
(command "_layer" "_m" "L-1" "_c" "1" "" "")
|
|
(if (> L2 268)
|
|
(progn
|
|
(setq PT4 (polar PT0 WINK_RAD2 268))
|
|
(command "_line" PT02 PT4 "")
|
|
(ssadd (entlast) auswahl-satz)
|
|
)
|
|
)
|
|
)
|
|
|
|
(
|
|
(and (>= L2 565) (<= L2 1800))
|
|
(command "_layer" "_m" "L-3" "_c" "3" "" "")
|
|
(if (> L2 565)
|
|
(progn
|
|
(setq PT4 (polar PT0 WINK_RAD2 565))
|
|
(command "_insert" (strcat lw "/prog/acad/layout/verbind") PT4 "0.5" "0.5" (rtos WINK_GRA2))
|
|
(ssadd (entlast) auswahl-satz)
|
|
(command "_insert" (strcat lw "/prog/acad/layout/stbg") PT4 (- L2 565) "1" (rtos WINK_GRA2))
|
|
(attribute-aendern "0" "0" "" (rtos (- L2 565)) "" "" ""
|
|
(strcat " L=" (rtos (- L2 565))) "" "")
|
|
(ssadd (entlast) auswahl-satz)
|
|
)
|
|
)
|
|
)
|
|
) ; endcond
|
|
)
|
|
|
|
(defun geometrie-175()
|
|
;-----------------------------------------
|
|
; Abst„nde analysieren und Elemente setzen
|
|
;-----------------------------------------
|
|
;***************
|
|
; L1 bearbeiten
|
|
;***************
|
|
|
|
(if (= ABSCHLUSS "W")
|
|
(progn
|
|
(cond
|
|
(
|
|
(< L1 250)
|
|
(command "_layer" "_m" "L-1" "_c" "1" "" "")
|
|
(if (= RICHTUNG "L")
|
|
(command "_insert" (strcat lw "/prog/acad/layout/w45175l3") PT0 "" "" (rtos WINK_GRA1))
|
|
(command "_insert" (strcat lw "/prog/acad/layout/w45175r3") PT0 "" "" (rtos WINK_GRA1))
|
|
)
|
|
(attribute-aendern "0" "0" "" (rtos L1) "" "" "" " (BG)" "" "")
|
|
(ssadd (entlast) auswahl-satz)
|
|
(if (> L1 170)
|
|
(progn
|
|
(setq PT3 (polar PT01 WINK_RAD1 (- L1 170)))
|
|
(command "_line" PT01 PT3 "")
|
|
(ssadd (entlast) auswahl-satz)
|
|
)
|
|
)
|
|
)
|
|
|
|
(
|
|
(and (>= L1 250) (<= L1 1800))
|
|
(command "_layer" "_m" "L-3" "_c" "3" "" "")
|
|
(if (= RICHTUNG "L")
|
|
(command "_insert" (strcat lw "/prog/acad/layout/w45175l4") PT0 "" "" (rtos WINK_GRA1))
|
|
(command "_insert" (strcat lw "/prog/acad/layout/w45175r4") PT0 "" "" (rtos WINK_GRA1))
|
|
)
|
|
(attribute-aendern "0" "0" "" "" "" "" "" " (BG)" "" "")
|
|
(ssadd (entlast) auswahl-satz)
|
|
(if (> L1 250)
|
|
(progn
|
|
(setq PT3 (polar PT01 WINK_RAD1 (- L1 250)))
|
|
(command "_insert" (strcat lw "/prog/acad/layout/verbind") PT3 "0.5" "0.5" (rtos WINK_GRA1))
|
|
(ssadd (entlast) auswahl-satz)
|
|
(command "_insert" (strcat lw "/prog/acad/layout/stbg") PT01 (- L1 250) "1" (rtos WINK_GRA1))
|
|
(attribute-aendern "0" "0" "" (rtos (- L1 250)) "" "" ""
|
|
(strcat " L=" (rtos (- L1 250))) "" "")
|
|
(ssadd (entlast) auswahl-satz)
|
|
)
|
|
)
|
|
)
|
|
) ; endcond
|
|
) ;----end PROGN
|
|
) ;---- endif ABSCHLUSS="W"
|
|
|
|
(if (= ABSCHLUSS "B")
|
|
(progn
|
|
(cond
|
|
(
|
|
(< L1 250)
|
|
(command "_layer" "_m" "L-1" "_c" "1" "" "")
|
|
(if (= RICHTUNG "L")
|
|
(command "_insert" (strcat lw "/prog/acad/layout/s45175l4") PT0 "" "" (rtos WINK_GRA1))
|
|
(command "_insert" (strcat lw "/prog/acad/layout/s45175r4") PT0 "" "" (rtos WINK_GRA1))
|
|
)
|
|
(attribute-aendern "0" "0" "" (rtos L1) "" "" "" " SONDER IN (BG)" "" "")
|
|
(ssadd (entlast) auswahl-satz)
|
|
(if (> L1 190)
|
|
(progn
|
|
(setq PT3 (polar PT01 WINK_RAD1 (- L1 190)))
|
|
(command "_line" PT01 PT3 "")
|
|
(ssadd (entlast) auswahl-satz)
|
|
)
|
|
)
|
|
)
|
|
|
|
(
|
|
(and (>= L1 250) (<= L1 1800))
|
|
(command "_layer" "_m" "L-3" "_c" "3" "" "")
|
|
(if (= RICHTUNG "L")
|
|
(command "_insert" (strcat lw "/prog/acad/layout/s45175l4") PT0 "" "" (rtos WINK_GRA1))
|
|
(command "_insert" (strcat lw "/prog/acad/layout/s45175r4") PT0 "" "" (rtos WINK_GRA1))
|
|
)
|
|
(attribute-aendern "0" "0" "" "" "" "" "" " (BG)" "" "")
|
|
(ssadd (entlast) auswahl-satz)
|
|
(if (> L1 250)
|
|
(progn
|
|
(setq PT3 (polar PT01 WINK_RAD1 (- L1 250)))
|
|
(command "_insert" (strcat lw "/prog/acad/layout/verbind") PT3 "0.5" "0.5" (rtos WINK_GRA1))
|
|
(ssadd (entlast) auswahl-satz)
|
|
(command "_insert" (strcat lw "/prog/acad/layout/stbg") PT01 (- L1 250) "1" (rtos WINK_GRA1))
|
|
(attribute-aendern "0" "0" "" (rtos (- L1 250)) "" "" ""
|
|
(strcat " L=" (rtos (- L1 250))) "" "")
|
|
(ssadd (entlast) auswahl-satz)
|
|
)
|
|
)
|
|
)
|
|
) ; endcond
|
|
) ;----end PROGN
|
|
) ;---- endif ABSCHLUSS="B"
|
|
|
|
|
|
;***************
|
|
; L2 bearbeiten
|
|
;***************
|
|
(cond
|
|
(
|
|
(< L2 565)
|
|
(command "_layer" "_m" "L-1" "_c" "1" "" "")
|
|
(if (> L2 148)
|
|
(progn
|
|
(setq PT4 (polar PT0 WINK_RAD2 148))
|
|
(command "_line" PT02 PT4 "")
|
|
(ssadd (entlast) auswahl-satz)
|
|
)
|
|
)
|
|
)
|
|
|
|
(
|
|
(and (>= L2 565) (<= L2 1800))
|
|
(command "_layer" "_m" "L-3" "_c" "3" "" "")
|
|
(if (> L2 565)
|
|
(progn
|
|
(setq PT4 (polar PT0 WINK_RAD2 565))
|
|
(command "_insert" (strcat lw "/prog/acad/layout/verbind") PT4 "0.5" "0.5" (rtos WINK_GRA2))
|
|
(ssadd (entlast) auswahl-satz)
|
|
(command "_insert" (strcat lw "/prog/acad/layout/stbg") PT4 (- L2 565) "1" (rtos WINK_GRA2))
|
|
(attribute-aendern "0" "0" "" (rtos (- L2 565)) "" "" ""
|
|
(strcat " L=" (rtos (- L2 565))) "" "")
|
|
(ssadd (entlast) auswahl-satz)
|
|
)
|
|
)
|
|
)
|
|
) ; endcond
|
|
)
|
|
|
|
|
|
;-------------------
|
|
(defun BEMASSUNG ()
|
|
;---------
|
|
; Bemaáung
|
|
;---------
|
|
(command "_layer" "_m" "L-10" "_c" "10" "" "")
|
|
(command "_dim")
|
|
(command "_dimtad" "0")
|
|
(command "_dimtxt" "125")
|
|
(command "_dimasz" "40")
|
|
(if (= RICHTUNG "L")
|
|
(setq WINK_BEM1 (- WINK_RAD1 (/ pi 2)))
|
|
(setq WINK_BEM1 (+ WINK_RAD1 (/ pi 2)))
|
|
)
|
|
(if (= RICHTUNG "L")
|
|
(setq WINK_BEM2 (- WINK_RAD2 (/ pi 2)))
|
|
(setq WINK_BEM2 (+ WINK_RAD2 (/ pi 2)))
|
|
)
|
|
(command "_align" PT01 PT0 (polar PT01 WINK_BEM1 200) "")
|
|
(command "_align" PT0 PT02 (polar PT0 WINK_BEM2 200) "")
|
|
(command "_exit")
|
|
(command "_layer" "_m" "L-3" "_c" "3" "" "")
|
|
)
|
|
|
|
;------------------------------------------------------------------------------
|
|
(defun c:l_bg_w45 ( / PT0 PT01 PT02 PT3 PT4 RADIUS RICHTUNG
|
|
ABSCHLUSS WINK_RAD1 WINK_RAD2 WINK_GRA1 WINK_GRA2)
|
|
(setvar "limcheck" 0)
|
|
(prompt "**** BG/Sonder aus Weiche/STB - links oder rechts *******")
|
|
(prompt "")
|
|
(datain)
|
|
|
|
(if (= ABSCHLUSS "W")
|
|
(setq ART "W")
|
|
(setq ART "STB")
|
|
)
|
|
|
|
(if (= RADIUS 1)
|
|
(progn
|
|
(geometrie-650)
|
|
(setq RAD " R650")
|
|
(if (or (< L1 800) (< L2 800))
|
|
(setq BEZ (strcat ART " (SONDER)" RAD "/45-" RICHTUNG " L=" (rtos L1) "-" (rtos L2)))
|
|
(setq BEZ (strcat ART "+ST" RAD "/45-" RICHTUNG " L=" (rtos L1) "-" (rtos L2)))
|
|
)
|
|
)
|
|
)
|
|
(if (= RADIUS 2)
|
|
(progn
|
|
(geometrie-400)
|
|
(setq RAD " R400")
|
|
(if (or (< L1 500) (< L2 500))
|
|
(setq BEZ (strcat ART " (SONDER)" RAD "/45-" RICHTUNG " L=" (rtos L1) "-" (rtos L2)))
|
|
(setq BEZ (strcat ART "+ST" RAD "/45-" RICHTUNG " L=" (rtos L1) "-" (rtos L2)))
|
|
)
|
|
)
|
|
)
|
|
(if (= RADIUS 3)
|
|
(progn
|
|
(geometrie-175)
|
|
(setq RAD " R175")
|
|
(if (or (< L1 400) (< L2 400))
|
|
(setq BEZ (strcat ART " (SONDER)" RAD "/45-" RICHTUNG " L=" (rtos L1) "-" (rtos L2)))
|
|
(setq BEZ (strcat ART "+ST" RAD "/45-" RICHTUNG " L=" (rtos L1) "-" (rtos L2)))
|
|
)
|
|
)
|
|
)
|
|
|
|
(mach-block PT0 "0" auswahl-satz)
|
|
(setq auswahl-satz nil)
|
|
(setq BEZ (strcat BEZ " + " (rtos MUFFE-ZAEHLER) " MUFFE(N)"))
|
|
(attribute-aendern "0" "2" "1" "" "" "" "888888888" BEZ "" "") ; in SSTBASE.LSP
|
|
(bemassung)
|
|
(setvar "osmode" ALTFANG)
|
|
)
|
|
;------------------------------------------------------------------------------ |