neue Folder LAYOUT MENU und MODULE dazu
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
l_bg_2b : dialog {
|
||||
label = "SCHONENBERGER Systeme GmbH";
|
||||
: text {
|
||||
label = "180 degree Curve (STB)";
|
||||
}
|
||||
: row {
|
||||
: boxed_radio_column {
|
||||
label = "Radius";
|
||||
key = "RA";
|
||||
: radio_button {
|
||||
label = "R 650";
|
||||
key = "RA_1";
|
||||
}
|
||||
: radio_button {
|
||||
label = "R 400";
|
||||
key = "RA_2";
|
||||
}
|
||||
: radio_button {
|
||||
label = "R 175";
|
||||
key = "RA_3";
|
||||
}
|
||||
}
|
||||
: image {
|
||||
height = 5;
|
||||
width = 5;
|
||||
color = 0;
|
||||
key = "anzeige";
|
||||
}
|
||||
}
|
||||
: row {
|
||||
: toggle {
|
||||
label = "Dimensioning";
|
||||
mnemonic = "B";
|
||||
key = "BEMASSEN";
|
||||
}
|
||||
}
|
||||
ok_cancel;
|
||||
}
|
||||
@@ -0,0 +1,555 @@
|
||||
;------------------------------------------------------------------------;
|
||||
; Baugruppe oder Sonder aus 2 STB 90 Grad ;
|
||||
;------------------------------------------------------------------------;
|
||||
; AW 13.05.93 ;
|
||||
;------------------------------------------------------------------------;
|
||||
|
||||
(defun Dbox (/ Dat)
|
||||
(setq Dat (load_dialog (strcat lw "/acadsst/layout/l_bg_2b.DCL")))
|
||||
(if (not (new_dialog "l_bg_2b" Dat)) (exit))
|
||||
(set_tile "RA" m_RA)
|
||||
(set_tile "BEMASSEN" m_BEMASSEN)
|
||||
(setq breite (dimx_tile "anzeige"))
|
||||
(setq hoehe (dimy_tile "anzeige"))
|
||||
(start_image "anzeige")
|
||||
(slide_image 0 0 breite hoehe "layout(l_bg_2b)")
|
||||
(end_image)
|
||||
(action_tile "accept" "(SetPara) (done_dialog)")
|
||||
(action_tile "cancel" "(exit) (done_dialog)")
|
||||
(start_dialog)
|
||||
(unload_dialog Dat)
|
||||
)
|
||||
|
||||
(defun SetPara ()
|
||||
(setq m_RA (get_tile "RA")
|
||||
m_BEMASSEN (get_tile "BEMASSEN")
|
||||
)
|
||||
(if (= m_RA "RA_1")
|
||||
(setq RADIUS 1)
|
||||
)
|
||||
(if (= m_RA "RA_2")
|
||||
(setq RADIUS 2)
|
||||
)
|
||||
(if (= m_RA "RA_3")
|
||||
(setq RADIUS 3)
|
||||
)
|
||||
)
|
||||
|
||||
(defun datain ()
|
||||
(setq ALTFANG (getvar "osmode"))
|
||||
(setq MUFFE-ZAEHLER 0)
|
||||
;------------------------
|
||||
;>>>> Eingabeteil <<<<<<<
|
||||
;------------------------
|
||||
(setq auswahl-satz nil)
|
||||
|
||||
(initget (+ 1 2 4))
|
||||
(setq PT0 (getpoint "\nAnfangspunkt antippen: "))
|
||||
(setq PT01 (getpoint PT0 "\n1.Schnittpunkt antippen: "))
|
||||
(setq PT02 (getpoint PT01 "\n2.Schnittpunkt antippen: "))
|
||||
(setq PT03 (getpoint PT02 "\nEndpunkt antippen: "))
|
||||
(bl-name PT0) ;--> Block-Name definieren -> R�ckgabe: element-name
|
||||
(setvar "osmode" 0)
|
||||
|
||||
(setq WINK_RAD1 (angle PT0 PT01))
|
||||
(setq WINK_GRA1 (/ (* WINK_RAD1 180) pi))
|
||||
(setq WINK_RAD2 (+ WINK_RAD1 (/ pi 2)))
|
||||
(setq WINK_GRA2 (/ (* WINK_RAD2 180) pi))
|
||||
(setq WINK_RAD3 (+ WINK_RAD1 pi))
|
||||
(setq WINK_GRA3 (/ (* WINK_RAD3 180) pi))
|
||||
;------------------;
|
||||
;Abst„nde berechnen;
|
||||
;------------------;
|
||||
(setq L1 (* (fix (/ (+ (distance PT0 PT01) 1) 2)) 2))
|
||||
(setq L2 (* (fix (/ (+ (distance PT01 PT02) 1) 2)) 2))
|
||||
(setq L3 (* (fix (/ (+ (distance PT02 PT03) 1) 2)) 2))
|
||||
|
||||
(if (= RADIUS 1) ; Radius 650
|
||||
(progn
|
||||
(if (or (< L1 650) (> L1 1800) (< L2 1300) (> L2 2000)
|
||||
(< L3 650) (> L3 1800))
|
||||
(progn
|
||||
(alert "Abstand zu groá oder zu klein ...")
|
||||
(setvar "osmode" ALTFANG)
|
||||
(exit)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (= RADIUS 2) ; Radius 400
|
||||
(progn
|
||||
(if (or (< L1 400) (> L1 1800) (< L2 800) (> L2 2000)
|
||||
(< L3 400) (> L3 1800))
|
||||
(progn
|
||||
(alert "Abstand zu groá oder zu klein ...")
|
||||
(setvar "osmode" ALTFANG)
|
||||
(exit)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (= RADIUS 3) ; Radius 175
|
||||
(progn
|
||||
(if (or (< L1 250) (> L1 1800) (< L2 500) (> L2 2000)
|
||||
(< L1 250) (> L1 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"))
|
||||
;------------------------------------------------------------
|
||||
; (setq PTA (getpoint "\nAufbaupunkt antippen: "))
|
||||
;------------------------------------------------------------
|
||||
;<<<<< Konstruktionspunkte definieren >>>>>>>
|
||||
;--------------------------------------------------------
|
||||
(setq PT1 (polar PT0 WINK_RAD1 L1))
|
||||
(setq PT2 (polar PT1 WINK_RAD2 L2))
|
||||
(setq PT3 (polar PT2 WINK_RAD3 L3))
|
||||
;--------
|
||||
; Muffen
|
||||
;--------
|
||||
(command "_layer" "_m" "L-6" "_c" "6" "" "")
|
||||
(command "_insert" (strcat lw "/acadsst/layout/muffe") PT0 "" "" "0")
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "825002016" "MUFFE ANGESCHWEISST (BG)" "" "")
|
||||
(setq auswahl-satz (ssget "_L"))
|
||||
(setq MUFFE-ZAEHLER (+ MUFFE-ZAEHLER 1))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/muffe") PT3 "" "" "0")
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "825002016" "MUFFE ANGESCHWEISST (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(setq MUFFE-ZAEHLER (+ MUFFE-ZAEHLER 1))
|
||||
)
|
||||
|
||||
(defun geometrie-650()
|
||||
;-----------------------------------------
|
||||
; Abst„nde analysieren und Elemente setzen
|
||||
;-----------------------------------------
|
||||
;***************
|
||||
; L1 bearbeiten
|
||||
;***************
|
||||
(if (or (< L1 800) (< L2 1600) (< L3 800))
|
||||
(command "_layer" "_m" "L-1" "_c" "1" "" "")
|
||||
(command "_layer" "_m" "L-3" "_c" "3" "" "")
|
||||
)
|
||||
(cond
|
||||
(
|
||||
(< L1 800)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s90650l8") PT1 "" "" (rtos WINK_GRA1))
|
||||
(attribute-aendern "0" "0" "" (rtos L1) "" block-kennung "" " SONDER IN (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
|
||||
(if (> L1 650)
|
||||
(progn
|
||||
(setq PT4 (polar PT0 WINK_RAD1 (- L1 650)))
|
||||
(command "_line" PT0 PT4 "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(
|
||||
(and (>= L1 800) (<= L1 1800))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s90650l8") PT1 "" "" (rtos WINK_GRA1))
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "" " (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(if (> L1 800)
|
||||
(progn
|
||||
(setq PT4 (polar PT0 WINK_RAD1 (- L1 800)))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT4 "0.5" "0.5" (rtos WINK_GRA1))
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/stbg") PT0 (- L1 800) "1" (rtos WINK_GRA1))
|
||||
(attribute-aendern "0" "0" "" (rtos (- L1 800)) "" block-kennung ""
|
||||
(strcat " L=" (rtos (- L1 800))) "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
)
|
||||
)
|
||||
) ; endcond
|
||||
;***************
|
||||
; L2 bearbeiten
|
||||
;***************
|
||||
(cond
|
||||
(
|
||||
(< L2 1600)
|
||||
(setq PT5 (polar PT1 WINK_RAD2 (/ L2 2)))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT5 "0.5" "0.5" (rtos WINK_GRA2))
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
|
||||
(
|
||||
(and (>= L2 1600) (<= L2 2000))
|
||||
(setq PT5 (polar PT1 WINK_RAD2 800))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT5 "0.5" "0.5" (rtos WINK_GRA2))
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(if (> L2 1600)
|
||||
(progn
|
||||
(setq PT6 (polar PT1 WINK_RAD2 800))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT6 "0.5" "0.5" (rtos WINK_GRA2))
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/stbg") PT6 (- L2 1600) "1" (rtos WINK_GRA2))
|
||||
(attribute-aendern "0" "0" "" (rtos (- L2 1600)) "" block-kennung ""
|
||||
(strcat " L=" (rtos (- L2 1600))) "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
)
|
||||
)
|
||||
) ; endcond
|
||||
|
||||
;***************
|
||||
; L3 bearbeiten
|
||||
;***************
|
||||
(cond
|
||||
(
|
||||
(< L3 800)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s90650r8") PT2 "" "" (rtos WINK_GRA1))
|
||||
(attribute-aendern "0" "0" "" (rtos L3) "" block-kennung "" " SONDER IN (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(if (> L3 650)
|
||||
(progn
|
||||
(setq PT7 (polar PT2 WINK_RAD3 650))
|
||||
(command "_line" PT7 PT3 "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(
|
||||
(and (>= L3 800) (<= L3 1800))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s90650r8") PT2 "" "" (rtos WINK_GRA1))
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "" " (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(if (> L3 800)
|
||||
(progn
|
||||
(setq PT7 (polar PT2 WINK_RAD3 800))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT7 "0.5" "0.5" (rtos WINK_GRA1))
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/stbg") PT3 (- L3 800) "1" (rtos WINK_GRA1))
|
||||
(attribute-aendern "0" "0" "" (rtos (- L3 800)) "" block-kennung ""
|
||||
(strcat " L=" (rtos (- L3 800))) "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
)
|
||||
)
|
||||
) ; endcond
|
||||
)
|
||||
|
||||
(defun geometrie-400()
|
||||
(if (or (< L1 500) (< L2 1000) (< L3 500))
|
||||
(command "_layer" "_m" "L-1" "_c" "1" "" "")
|
||||
(command "_layer" "_m" "L-3" "_c" "3" "" "")
|
||||
)
|
||||
;-----------------------------------------
|
||||
; Abst„nde analysieren und Elemente setzen
|
||||
;-----------------------------------------
|
||||
;***************
|
||||
; L1 bearbeiten
|
||||
;***************
|
||||
(if (or (< L1 500) (< L2 1000) (< L3 500))
|
||||
(command "_layer" "_m" "L-1" "_c" "1" "" "")
|
||||
(command "_layer" "_m" "L-3" "_c" "3" "" "")
|
||||
)
|
||||
(cond
|
||||
(
|
||||
(< L1 500)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s90400l5") PT1 "" "" (rtos WINK_GRA1))
|
||||
(attribute-aendern "0" "0" "" (rtos L1) "" block-kennung "" " SONDER IN (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(if (> L1 400)
|
||||
(progn
|
||||
(setq PT4 (polar PT0 WINK_RAD1 (- L1 400)))
|
||||
(command "_line" PT0 PT4 "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(
|
||||
(and (>= L1 500) (<= L1 1800))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s90400l5") PT1 "" "" (rtos WINK_GRA1))
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "" " (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(if (> L1 500)
|
||||
(progn
|
||||
(setq PT4 (polar PT0 WINK_RAD1 (- L1 500)))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT4 "0.5" "0.5" (rtos WINK_GRA1))
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/stbg") PT0 (- L1 500) "1" (rtos WINK_GRA1))
|
||||
(attribute-aendern "0" "0" "" (rtos (- L1 500)) "" block-kennung ""
|
||||
(strcat " L=" (rtos (- L1 500))) "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
)
|
||||
)
|
||||
) ; endcond
|
||||
;***************
|
||||
; L2 bearbeiten
|
||||
;***************
|
||||
(cond
|
||||
(
|
||||
(< L2 1000)
|
||||
(setq PT5 (polar PT1 WINK_RAD2 (/ L2 2)))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT5 "0.5" "0.5" (rtos WINK_GRA2))
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
|
||||
(
|
||||
(and (>= L2 1000) (<= L2 2000))
|
||||
(setq PT5 (polar PT1 WINK_RAD2 500))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT5 "0.5" "0.5" (rtos WINK_GRA2))
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(if (> L2 1000)
|
||||
(progn
|
||||
(setq PT6 (polar PT1 WINK_RAD2 500))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT6 "0.5" "0.5" (rtos WINK_GRA2))
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/stbg") PT6 (- L2 1000) "1" (rtos WINK_GRA2))
|
||||
(attribute-aendern "0" "0" "" (rtos (- L2 1000)) "" block-kennung ""
|
||||
(strcat " L=" (rtos (- L2 1000))) "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
)
|
||||
)
|
||||
) ; endcond
|
||||
|
||||
;***************
|
||||
; L3 bearbeiten
|
||||
;***************
|
||||
(cond
|
||||
(
|
||||
(< L3 500)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s90400r5") PT2 "" "" (rtos WINK_GRA1))
|
||||
(attribute-aendern "0" "0" "" (rtos L3) "" block-kennung "" " SONDER IN (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(if (> L3 400)
|
||||
(progn
|
||||
(setq PT7 (polar PT2 WINK_RAD3 400))
|
||||
(command "_line" PT7 PT3 "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(
|
||||
(and (>= L3 500) (<= L3 1800))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s90400r5") PT2 "" "" (rtos WINK_GRA1))
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "" " (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(if (> L3 500)
|
||||
(progn
|
||||
(setq PT7 (polar PT2 WINK_RAD3 500))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT7 "0.5" "0.5" (rtos WINK_GRA1))
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/stbg") PT3 (- L3 500) "1" (rtos WINK_GRA1))
|
||||
(attribute-aendern "0" "0" "" (rtos (- L3 500)) "" block-kennung ""
|
||||
(strcat " L=" (rtos (- L3 500))) "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
)
|
||||
)
|
||||
) ; endcond
|
||||
)
|
||||
|
||||
(defun geometrie-175()
|
||||
(if (or (< L1 400) (< L2 400) (< L3 800))
|
||||
(command "_layer" "_m" "L-1" "_c" "1" "" "")
|
||||
(command "_layer" "_m" "L-3" "_c" "3" "" "")
|
||||
)
|
||||
;-----------------------------------------
|
||||
; Abst„nde analysieren und Elemente setzen
|
||||
;-----------------------------------------
|
||||
;***************
|
||||
; L1 bearbeiten
|
||||
;***************
|
||||
(if (or (< L1 400) (< L2 800) (< L3 400))
|
||||
(command "_layer" "_m" "L-1" "_c" "1" "" "")
|
||||
(command "_layer" "_m" "L-3" "_c" "3" "" "")
|
||||
)
|
||||
(cond
|
||||
(
|
||||
(< L1 400)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s90175l4") PT1 "" "" (rtos WINK_GRA1))
|
||||
(attribute-aendern "0" "0" "" (rtos L1) "" block-kennung "" " SONDER IN (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(if (> L1 250)
|
||||
(progn
|
||||
(setq PT4 (polar PT0 WINK_RAD1 (- L1 250)))
|
||||
(command "_line" PT0 PT4 "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(
|
||||
(and (>= L1 400) (<= L1 1800))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s90175l4") PT1 "" "" (rtos WINK_GRA1))
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "" " (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(if (> L1 400)
|
||||
(progn
|
||||
(setq PT4 (polar PT0 WINK_RAD1 (- L1 400)))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT4 "0.5" "0.5" (rtos WINK_GRA1))
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/stbg") PT0 (- L1 400) "1" (rtos WINK_GRA1))
|
||||
(attribute-aendern "0" "0" "" (rtos (- L1 400)) "" block-kennung ""
|
||||
(strcat " L=" (rtos (- L1 400))) "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
)
|
||||
)
|
||||
) ; endcond
|
||||
;***************
|
||||
; L2 bearbeiten
|
||||
;***************
|
||||
(cond
|
||||
(
|
||||
(< L2 800)
|
||||
(setq PT5 (polar PT1 WINK_RAD2 (/ L2 2)))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT5 "0.5" "0.5" (rtos WINK_GRA2))
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
|
||||
(
|
||||
(and (>= L2 800) (<= L2 2000))
|
||||
(setq PT5 (polar PT1 WINK_RAD2 400))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT5 "0.5" "0.5" (rtos WINK_GRA2))
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(if (> L2 800)
|
||||
(progn
|
||||
(setq PT6 (polar PT1 WINK_RAD2 400))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT6 "0.5" "0.5" (rtos WINK_GRA2))
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/stbg") PT6 (- L2 800) "1" (rtos WINK_GRA2))
|
||||
(attribute-aendern "0" "0" "" (rtos (- L2 800)) "" block-kennung ""
|
||||
(strcat " L=" (rtos (- L2 800))) "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
)
|
||||
)
|
||||
) ; endcond
|
||||
|
||||
;***************
|
||||
; L3 bearbeiten
|
||||
;***************
|
||||
(cond
|
||||
(
|
||||
(< L3 400)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s90175r4") PT2 "" "" (rtos WINK_GRA1))
|
||||
(attribute-aendern "0" "0" "" (rtos L3) "" block-kennung "" " SONDER IN (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(if (> L3 250)
|
||||
(progn
|
||||
(setq PT7 (polar PT2 WINK_RAD3 250))
|
||||
(command "_line" PT7 PT3 "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(
|
||||
(and (>= L3 400) (<= L3 1800))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s90175r4") PT2 "" "" (rtos WINK_GRA1))
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "" " (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(if (> L3 400)
|
||||
(progn
|
||||
(setq PT7 (polar PT2 WINK_RAD3 400))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT7 "0.5" "0.5" (rtos WINK_GRA1))
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/stbg") PT3 (- L3 400) "1" (rtos WINK_GRA1))
|
||||
(attribute-aendern "0" "0" "" (rtos (- L3 400)) "" block-kennung ""
|
||||
(strcat " L=" (rtos (- L3 400))) "" "")
|
||||
(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")
|
||||
(setq WINK_BEM1 (- WINK_RAD1 (/ pi 2)))
|
||||
(setq WINK_BEM2 (- WINK_RAD2 (/ pi 2)))
|
||||
(setq WINK_BEM3 (- WINK_RAD3 (/ pi 2)))
|
||||
(command "_align" PT0 PT01 (polar PT0 WINK_BEM1 200) "")
|
||||
(command "_align" PT01 PT02 (polar PT01 WINK_BEM2 200) "")
|
||||
(command "_align" PT02 PT03 (polar PT02 WINK_BEM3 200) "")
|
||||
(command "_exit")
|
||||
(command "_layer" "_m" "L-3" "_c" "3" "" "")
|
||||
)
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
(defun c:l_bg_2b ( / PT0 PT01 PT02 PT03 PT1 PT2 PT3 PT4 PT5 PT6 PT7
|
||||
RADIUS ABSCHLUSS wink_rad1 wink_rad2 wink_rad3
|
||||
wink_gra1 wink_gra2 wink_gra3 bez rad kleiner l1 l2 l3)
|
||||
(setvar "limcheck" 0)
|
||||
(prompt "**** BG aus 2 STBL *******")
|
||||
(prompt "")
|
||||
(if (null m_RA) (setq m_RA "RA_1")) ; Radius 650
|
||||
(if (null m_BEMASSEN) (setq m_BEMASSEN "1")) ; mit Bemaáung
|
||||
(dbox)
|
||||
(datain)
|
||||
(setq KLEINER 0)
|
||||
(if (= RADIUS 1)
|
||||
(progn
|
||||
(geometrie-650)
|
||||
(setq RAD " R650")
|
||||
(if (or (< L1 800) (< L2 800))
|
||||
(setq KLEINER 1)
|
||||
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (= RADIUS 2)
|
||||
(progn
|
||||
(geometrie-400)
|
||||
(setq RAD " R400")
|
||||
(if (or (< L1 500) (< L2 500))
|
||||
(setq KLEINER 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (= RADIUS 3)
|
||||
(progn
|
||||
(geometrie-175)
|
||||
(setq RAD " R175")
|
||||
(if (or (< L1 400) (< L2 400))
|
||||
(setq KLEINER 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(if (= KLEINER 1)
|
||||
(setq BEZ (strcat "** BG 2 STBL(*)"RAD "/90- "
|
||||
(rtos L1) "-" (rtos L2) "-" (rtos L3) " + " (rtos MUFFE-ZAEHLER) " MUFFE(N)"))
|
||||
(setq BEZ (strcat "** BG 2 STBL"RAD "/90- "
|
||||
(rtos L1) "-" (rtos L2) "-" (rtos L3) " + " (rtos MUFFE-ZAEHLER) " MUFFE(N)"))
|
||||
)
|
||||
|
||||
(mach-block PT0 "0" auswahl-satz)
|
||||
(setq auswahl-satz nil)
|
||||
(attribute-aendern "0" "2" "1" "" "" block-kennung "111111111" (strcat BEZ " [BG1]") "" "") ; in SSTBASE.LSP
|
||||
(if (= m_BEMASSEN "1")
|
||||
(bemassung)
|
||||
)
|
||||
(setvar "osmode" ALTFANG)
|
||||
|
||||
)
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
l_bg_drw : dialog {
|
||||
label = "SCHONENBERGER Systeme GmbH";
|
||||
: text {
|
||||
label = "Group DRW/DW R=650";
|
||||
}
|
||||
: row {
|
||||
: boxed_radio_column {
|
||||
label = "Switch";
|
||||
key = "ART_";
|
||||
: radio_button {
|
||||
label = "DRW";
|
||||
key = "ART_DRW";
|
||||
}
|
||||
: radio_button {
|
||||
label = "DW";
|
||||
key = "ART_DW";
|
||||
}
|
||||
}
|
||||
: image {
|
||||
height = 5;
|
||||
width = 5;
|
||||
color = 0;
|
||||
key = "anzeige";
|
||||
}
|
||||
}
|
||||
: row {
|
||||
: toggle {
|
||||
label = "Dimensioning";
|
||||
mnemonic = "B";
|
||||
key = "BEMASSEN";
|
||||
}
|
||||
}
|
||||
ok_cancel;
|
||||
}
|
||||
@@ -0,0 +1,259 @@
|
||||
;------------------------------------------------------------------------;
|
||||
; Baugruppe aus DW/DRW (STAHL) ;
|
||||
;------------------------------------------------------------------------;
|
||||
; AW 12.05.93 ;
|
||||
;------------------------------------------------------------------------;
|
||||
|
||||
(defun Dbox (/ Dat)
|
||||
(setq Dat (load_dialog (strcat lw "/acadsst/layout/l_bg_drw.DCL")))
|
||||
(if (not (new_dialog "l_bg_drw" Dat)) (exit))
|
||||
(set_tile "ART_" m_ART)
|
||||
(setq breite (dimx_tile "anzeige"))
|
||||
(setq hoehe (dimy_tile "anzeige"))
|
||||
(set_tile "BEMASSEN" m_BEMASSEN)
|
||||
(start_image "anzeige")
|
||||
(slide_image 0 0 breite hoehe "layout(l_bg_drw)")
|
||||
(end_image)
|
||||
(action_tile "accept" "(SetPara) (done_dialog)")
|
||||
(action_tile "cancel" "(exit) (done_dialog)")
|
||||
(start_dialog)
|
||||
(unload_dialog Dat)
|
||||
)
|
||||
|
||||
(defun SetPara ()
|
||||
(setq m_ART (get_tile "ART_")
|
||||
m_BEMASSEN (get_tile "BEMASSEN")
|
||||
)
|
||||
(if (= m_ART "ART_DRW")
|
||||
(setq ART 1)
|
||||
)
|
||||
(if (= m_ART "ART_DW")
|
||||
(setq ART 2)
|
||||
)
|
||||
)
|
||||
|
||||
(defun datain ()
|
||||
(setq ALTFANG (getvar "osmode"))
|
||||
(setq MUFFE-ZAEHLER 0)
|
||||
;------------------------
|
||||
;>>>> Eingabeteil <<<<<<<
|
||||
;------------------------
|
||||
(setq auswahl-satz nil)
|
||||
(initget (+ 1 2 4))
|
||||
(setq PT0 (getpoint "\nSchnittpunkt antippen: "))
|
||||
(setq PT01 (getpoint PT0 "\n1. Schenkel: "))
|
||||
(setq PT02 (getpoint PT0 "\n2. Schenkel: "))
|
||||
(setq PT03 (getpoint PT0 "\n3. Schenkel: "))
|
||||
(bl-name PT0) ;--> Block-Name definieren -> R�ckgabe: element-name
|
||||
|
||||
(setvar "osmode" 0)
|
||||
|
||||
(setq WINK_RAD1 (angle PT0 PT01))
|
||||
(setq WINK_GRA1 (/ (* WINK_RAD1 180) pi))
|
||||
(setq WINK_RAD2 (- WINK_RAD1 (/ pi 2)))
|
||||
(setq WINK_GRA2 (/ (* WINK_RAD2 180) pi))
|
||||
(setq WINK_RAD3 (+ WINK_RAD1 (/ pi 2)))
|
||||
(setq WINK_GRA3 (/ (* WINK_RAD3 180) pi))
|
||||
|
||||
;------------------;
|
||||
;Abst„nde berechnen;
|
||||
;------------------;
|
||||
(setq L1 (* (fix (/ (+ (distance PT0 PT01) 1) 2)) 2))
|
||||
(setq L2 (* (fix (/ (+ (distance PT0 PT02) 1) 2)) 2))
|
||||
(setq L3 (* (fix (/ (+ (distance PT0 PT03) 1) 2)) 2))
|
||||
|
||||
(if (or (< L1 700) (< L2 700) (< L3 700)
|
||||
(> L1 1800) (> L2 1800) (> L3 1800))
|
||||
(progn
|
||||
(alert "Abstand zu groá oder zu klein ...")
|
||||
(setvar "osmode" ALTFANG)
|
||||
(exit)
|
||||
)
|
||||
)
|
||||
(princ (strcat "\nL1= " (rtos L1) " | L2= " (rtos L2) " | L3= "
|
||||
(rtos L3) "\n"))
|
||||
; (setq PTA (getpoint "\nAufbaupunkt antippen: "))
|
||||
)
|
||||
|
||||
|
||||
(defun geometrie()
|
||||
;--------------------------------------------------------
|
||||
;<<<<< Konstruktionspunkte definieren >>>>>>>
|
||||
;--------------------------------------------------------
|
||||
(setq PT1 (polar PT0 WINK_RAD1 L1)
|
||||
PT2 (polar PT0 WINK_RAD2 L2)
|
||||
PT3 (polar PT0 WINK_RAD3 L3)
|
||||
)
|
||||
|
||||
;-----------------
|
||||
; Muffen dazugeben
|
||||
;------------------
|
||||
(command "_layer" "_m" "L-6" "_c" "6" "" "")
|
||||
(command "_insert" (strcat lw "/acadsst/layout/muffe") PT1 "" "" "0")
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "825002016" "MUFFE ANGESCHWEISST (BG)" "" "")
|
||||
(setq auswahl-satz (ssget "_L"))
|
||||
(setq MUFFE-ZAEHLER (+ MUFFE-ZAEHLER 1))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/muffe") PT2 "" "" "0")
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "825002016" "MUFFE ANGESCHWEISST (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(setq MUFFE-ZAEHLER (+ MUFFE-ZAEHLER 1))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/muffe") PT3 "" "" "0")
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "825002016" "MUFFE ANGESCHWEISST (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(setq MUFFE-ZAEHLER (+ MUFFE-ZAEHLER 1))
|
||||
;-----------------------------------------
|
||||
; Abst„nde analysieren und Elemente setzen
|
||||
;-----------------------------------------
|
||||
;***********************
|
||||
; 1. Abstand bearbeiten
|
||||
;***********************
|
||||
|
||||
(if (or (< L1 800) (< L2 800) (< L3 800))
|
||||
(command "_layer" "_m" "L-1" "_c" "1" "" "")
|
||||
(command "_layer" "_m" "L-3" "_c" "3" "" "")
|
||||
)
|
||||
|
||||
(cond
|
||||
((< L1 800)
|
||||
|
||||
(if (= ART 1)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/drw1400x") PT0 "" "" WINK_GRA1)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/dw1400xx") PT0 "" "" WINK_GRA1)
|
||||
)
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "" " (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(if (> L1 700)
|
||||
(progn
|
||||
(setq PT4 (polar PT0 WINK_RAD1 700))
|
||||
(command "_line" PT1 PT4 "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
((and (>= L1 800) (<= L1 1800))
|
||||
(if (= ART 1)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/drw1600x") PT0 "" "" WINK_GRA1)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/dw1600xx") PT0 "" "" WINK_GRA1)
|
||||
)
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "" " (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(if (> L1 800)
|
||||
(progn
|
||||
(setq PT4 (polar PT0 WINK_RAD1 800))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT4 "0.5" "0.5" "0")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/stbg") PT4 (- L1 800) "1" WINK_GRA1)
|
||||
(attribute-aendern "0" "0" "" (rtos (- L1 800)) "" block-kennung ""
|
||||
(strcat " L=" (rtos (- L1 800))) "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
))
|
||||
) ; endcond
|
||||
;***********************
|
||||
; 2. Abstand bearbeiten
|
||||
;***********************
|
||||
|
||||
(cond
|
||||
((< L2 800)
|
||||
(if (> L2 700)
|
||||
(progn
|
||||
(setq PT5 (polar PT0 WINK_RAD2 700))
|
||||
(command "_line" PT2 PT5 "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
))
|
||||
|
||||
((and (>= L2 800) (<= L2 1800))
|
||||
(if (> L2 800)
|
||||
(progn
|
||||
(setq PT5 (polar PT0 WINK_RAD2 800))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT5 "0.5" "0.5" "0")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/stbg") PT5 (- L2 800) "1" WINK_GRA2)
|
||||
(attribute-aendern "0" "0" "" (rtos (- L2 800)) "" block-kennung ""
|
||||
(strcat " L=" (rtos (- L2 800))) "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
))
|
||||
) ; endcond
|
||||
;***********************
|
||||
; 3. Abstand bearbeiten
|
||||
;***********************
|
||||
|
||||
(cond
|
||||
((< L3 800)
|
||||
(if (> L3 700)
|
||||
(progn
|
||||
(setq PT6 (polar PT0 WINK_RAD3 700))
|
||||
(command "_line" PT4 PT6 "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
))
|
||||
|
||||
((and (>= L3 800) (<= L3 1800))
|
||||
(if (> L3 800)
|
||||
(progn
|
||||
(setq PT6 (polar PT0 WINK_RAD3 800))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT6 "0.5" "0.5" "0")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/stbg") PT6 (- L3 800) "1" WINK_GRA3)
|
||||
(attribute-aendern "0" "0" "" (rtos (- L3 800)) "" block-kennung ""
|
||||
(strcat " L=" (rtos (- L3 800))) "" "")
|
||||
(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")
|
||||
(command "_align" PT0 PT01 (polar PT0 (+ WINK_RAD1 (/ pi 2)) 200) "")
|
||||
(command "_align" PT0 PT02 (polar PT0 (+ WINK_RAD1 pi) 200) "")
|
||||
(command "_align" PT0 PT03 (polar PT0 (+ WINK_RAD1 pi) 200) "")
|
||||
(command "_exit")
|
||||
(command "_layer" "_m" "L-3" "_c" "3" "" "")
|
||||
)
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
(defun c:l_bg_drw ( / PT0 PT01 PT02 PT03 PT1 PT2 PT3 WINK_RAD1 WINK_RAD2
|
||||
WINK_RAD3 WINK_GRA1 WINK_GRA2 WINK_GRA3 pt4 pt5 pt6 art
|
||||
l1 l2 l3)
|
||||
(setvar "limcheck" 0)
|
||||
(prompt "**** BG aus DW/DRW *******")
|
||||
(prompt "")
|
||||
(if (null m_ART) (setq m_ART "ART_DRW")) ; DRW
|
||||
(if (null m_BEMASSEN) (setq m_BEMASSEN "1")) ; mit Bemaáung
|
||||
(dbox)
|
||||
(datain)
|
||||
(geometrie)
|
||||
(mach-block PT0 "0" auswahl-satz)
|
||||
(setq auswahl-satz nil)
|
||||
|
||||
(if (or (< L1 800) (< L2 800) (< L3 800))
|
||||
(setq PREFIX "SONDER-")
|
||||
(setq PREFIX "BG-")
|
||||
)
|
||||
|
||||
(if (= ART 1)
|
||||
(setq BEZ (strcat PREFIX "** BG DRW R650 -" (itoa L1) "-" (itoa L2) "-"
|
||||
(itoa L3) " + " (rtos MUFFE-ZAEHLER) " MUFFE(N)"))
|
||||
(setq BEZ (strcat PREFIX "** BG DW R650 -" (itoa L1) "-" (itoa L2) "-"
|
||||
(itoa L3) " + " (rtos MUFFE-ZAEHLER) " MUFFE(N)"))
|
||||
)
|
||||
|
||||
(attribute-aendern "0" "2" "1" "" "" block-kennung "111111111" (strcat BEZ " [BG1]") "" "") ; in SSTBASE.LSP
|
||||
(if (= m_BEMASSEN "1")
|
||||
(bemassung)
|
||||
)
|
||||
(setvar "osmode" ALTFANG)
|
||||
)
|
||||
;------------------------------------------------------------------------------
|
||||
@@ -0,0 +1,42 @@
|
||||
l_bg_kw : dialog {
|
||||
label = "SCHONENBERGER Systeme GmbH";
|
||||
: text {
|
||||
label = "Group KW+STB";
|
||||
}
|
||||
: row {
|
||||
: boxed_radio_column {
|
||||
label = "STB's";
|
||||
key = "ANZ";
|
||||
: radio_button {
|
||||
label = "1 STB";
|
||||
key = "ANZ_1";
|
||||
}
|
||||
: radio_button {
|
||||
label = "2 STB";
|
||||
key = "ANZ_2";
|
||||
}
|
||||
: radio_button {
|
||||
label = "3 STB";
|
||||
key = "ANZ_3";
|
||||
}
|
||||
: radio_button {
|
||||
label = "4 STB";
|
||||
key = "ANZ_4";
|
||||
}
|
||||
}
|
||||
: image {
|
||||
height = 5;
|
||||
width = 5;
|
||||
color = 0;
|
||||
key = "anzeige";
|
||||
}
|
||||
}
|
||||
: row {
|
||||
: toggle {
|
||||
label = "Dimensioning";
|
||||
mnemonic = "D";
|
||||
key = "BEMASSEN";
|
||||
}
|
||||
}
|
||||
ok_cancel;
|
||||
}
|
||||
@@ -0,0 +1,234 @@
|
||||
;------------------------------------------------------------------------;
|
||||
; Baugruppe aus KW+STB ;
|
||||
;------------------------------------------------------------------------;
|
||||
; AW 10.05.93 ;
|
||||
;------------------------------------------------------------------------;
|
||||
|
||||
(defun Dbox (/ Dat)
|
||||
(setq Dat (load_dialog (strcat lw "/acadsst/layout/l_bg_kw.DCL")))
|
||||
(if (not (new_dialog "l_bg_kw" Dat)) (exit))
|
||||
(set_tile "ANZ" m_ANZ)
|
||||
(setq breite (dimx_tile "anzeige"))
|
||||
(setq hoehe (dimy_tile "anzeige"))
|
||||
(set_tile "BEMASSEN" m_BEMASSEN)
|
||||
(start_image "anzeige")
|
||||
(slide_image 0 0 breite hoehe "layout(l_bg_kw)")
|
||||
(end_image)
|
||||
(action_tile "accept" "(SetPara) (done_dialog)")
|
||||
(action_tile "cancel" "(exit) (done_dialog)")
|
||||
(start_dialog)
|
||||
(unload_dialog Dat)
|
||||
)
|
||||
|
||||
(defun SetPara ()
|
||||
(setq m_ANZ (get_tile "ANZ")
|
||||
m_BEMASSEN (get_tile "BEMASSEN")
|
||||
)
|
||||
(if (= m_ANZ "ANZ_1")
|
||||
(setq ANZAHL 1)
|
||||
)
|
||||
(if (= m_ANZ "ANZ_2")
|
||||
(setq ANZAHL 2)
|
||||
)
|
||||
(if (= m_ANZ "ANZ_3")
|
||||
(setq ANZAHL 3)
|
||||
)
|
||||
(if (= m_ANZ "ANZ_4")
|
||||
(setq ANZAHL 4)
|
||||
)
|
||||
)
|
||||
|
||||
(defun datain ()
|
||||
(setq auswahl-satz nil)
|
||||
(setq MUFFE-ZAEHLER 0)
|
||||
(setq ALTFANG (getvar "osmode"))
|
||||
|
||||
(initget (+ 1 2 4))
|
||||
(setq PT0 (getpoint "\nZentrum der KW antippen: "))
|
||||
(bl-name PT0) ;--> Block-Name definieren -> R�ckgabe: element-name
|
||||
(command "_layer" "_m" "L-3" "_c" "3" "" "")
|
||||
(command "_insert" (strcat lw "/acadsst/layout/kw800_8x") PT0 "" "" "")
|
||||
(attribute-aendern "0" "0" "" "" "" "" "" " (BG)" "" "")
|
||||
(setq auswahl-satz (ssget "_L"))
|
||||
)
|
||||
|
||||
(defun geometrie()
|
||||
(setq zaehler 0)
|
||||
(repeat ANZAHL
|
||||
(setvar "osmode" ALTFANG)
|
||||
(setq zaehler (+ zaehler 1))
|
||||
(setq PT01 (getpoint PT0 "\nRichtungscchnittpunkt antippen: "))
|
||||
(setq PT02 (getpoint PT0 "\nPlatzierungsscchnittpunkt antippen: "))
|
||||
(setvar "osmode" 0)
|
||||
;-----------------
|
||||
; Winkel berechnen
|
||||
;-----------------
|
||||
(setq WINK_RAD1 (angle PT0 PT01))
|
||||
(setq WINK_GRA1 (/ (* WINK_RAD1 180) pi))
|
||||
(setq WINK_RAD2 (angle PT0 PT02))
|
||||
(setq WINK_GRA2 (/ (* WINK_RAD2 180) pi))
|
||||
(setq WINK_RAD3 (angle PT01 PT02))
|
||||
(setq WINK_GRA3 (/ (* WINK_RAD3 180) pi))
|
||||
;------------------------
|
||||
; Punkte f�r die Bemaáung
|
||||
;------------------------
|
||||
(setq PT1 (polar PT01 WINK_RAD3 1000))
|
||||
(setq PT2 (polar PT0 WINK_RAD3 1000))
|
||||
;-----------------
|
||||
;Abstand berechnen
|
||||
;-----------------
|
||||
(setq L1 (* (fix (/ (+ (distance PT0 PT01) 1) 2)) 2))
|
||||
|
||||
(if (or (< L1 350) (> L1 1800))
|
||||
(progn
|
||||
(alert "Abstand zu groá oder zu klein ...")
|
||||
(setvar "osmode" ALTFANG)
|
||||
(exit)
|
||||
)
|
||||
)
|
||||
(setq L2 (* (fix (/ (+ (distance PT0 PT02) 1) 2)) 2))
|
||||
;--------------------------------------------------------
|
||||
;<<<<< RICHTUNG ermitteln >>>>>>>
|
||||
;--------------------------------------------------------
|
||||
(initget "L R")
|
||||
(setq RICHTUNG (getkword "\n(L)inks oder (R)echts ? <L>: "))
|
||||
(if (not RICHTUNG)
|
||||
(setq RICHTUNG "L")
|
||||
)
|
||||
(setq RICHTUNG (strcase RICHTUNG))
|
||||
|
||||
(setq BEZ (strcat BEZ "/" RICHTUNG " " (rtos L1)))
|
||||
|
||||
(princ (strcat "\nL1= " (rtos L1) " | L2= " (rtos L2) " | RICHTUNG= "
|
||||
RICHTUNG " | W1= " (rtos WINK_RAD1 3 3) " | W2= "
|
||||
(rtos WINK_RAD2 3 3) " | W3= " (rtos WINK_RAD3 3 3)
|
||||
" | Z = " (rtos zaehler) "\n"))
|
||||
;--------------------------------------------------------
|
||||
;<<<<< Konstruktionspunkte definieren >>>>>>>
|
||||
;--------------------------------------------------------
|
||||
(setq PT01 (polar PT0 WINK_RAD1 L1)
|
||||
PT02 (polar PT0 WINK_RAD2 L2)
|
||||
PT10 (polar PT0 WINK_RAD2 400)
|
||||
)
|
||||
|
||||
(if (and (>= L1 350) (<= L1 530)) ; R400 + LINIE
|
||||
(progn
|
||||
(setq PT11 (polar PT01 WINK_RAD3 800)
|
||||
PT12 (polar PT02 WINK_RAD3 270)
|
||||
)
|
||||
(command "_layer" "_m" "L-3" "_c" "3" "" "")
|
||||
(if (= RICHTUNG "L")
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s45400l4") PT02 "" "" (rtos (+ WINK_GRA1 90)))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s45400r4") PT02 "" "" (rtos (- WINK_GRA1 90)))
|
||||
)
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "" " (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(if (< L1 530)
|
||||
(progn
|
||||
(command "_line" PT11 PT12 "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT10 "0.5" "0.5" "0")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(command "_layer" "_m" "L-6" "_c" "6" "" "")
|
||||
(command "_insert" (strcat lw "/acadsst/layout/muffe") PT11 "" "" "0")
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "825002016" "MUFFE ANGESCHWEISST (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(setq MUFFE-ZAEHLER (+ MUFFE-ZAEHLER 1))
|
||||
)
|
||||
)
|
||||
|
||||
(if (and (> L1 530) (<= L1 683)) ; R650
|
||||
(progn
|
||||
(setq PT11 (polar PT02 WINK_RAD3 425)
|
||||
)
|
||||
(command "_layer" "_m" "L-3" "_c" "3" "" "")
|
||||
(if (= RICHTUNG "L")
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s45650l4") PT02 "" "" (rtos (+ WINK_GRA1 90)))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s45650r4") PT02 "" "" (rtos (- WINK_GRA1 90)))
|
||||
)
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "" " (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT10 "0.5" "0.5" "0")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(command "_layer" "_m" "L-6" "_c" "6" "" "")
|
||||
(command "_insert" (strcat lw "/acadsst/layout/muffe") PT11 "" "" "0")
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "825002016" "MUFFE ANGESCHWEISST (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(setq MUFFE-ZAEHLER (+ MUFFE-ZAEHLER 1))
|
||||
)
|
||||
)
|
||||
|
||||
(if (and (> L1 683) (<= L1 1800)) ; R650
|
||||
(progn
|
||||
(setq PT11 (polar PT02 WINK_RAD3 425)
|
||||
PT13 (polar PT10 WINK_RAD2 (- L2 400 565))
|
||||
)
|
||||
(command "_layer" "_m" "L-3" "_c" "3" "" "")
|
||||
(if (= RICHTUNG "L")
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s45650l4") PT02 "" "" (rtos (+ WINK_GRA1 90)))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s45650r4") PT02 "" "" (rtos (- WINK_GRA1 90)))
|
||||
)
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "" " (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT10 "0.5" "0.5" "0")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT13 "0.5" "0.5" "0")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/stbg") PT10 (- L2 400 565) "1" (rtos WINK_GRA2))
|
||||
(attribute-aendern "0" "0" "" (rtos (- L2 400 565)) "" block-kennung ""
|
||||
(strcat " L=" (rtos (- L2 400 565))) "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(command "_layer" "_m" "L-6" "_c" "6" "" "")
|
||||
(command "_insert" (strcat lw "/acadsst/layout/muffe") PT11 "" "" "0")
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "825002016" "MUFFE ANGESCHWEISST (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(setq MUFFE-ZAEHLER (+ MUFFE-ZAEHLER 1))
|
||||
)
|
||||
)
|
||||
(if (= m_BEMASSEN "1")
|
||||
(bemassung)
|
||||
)
|
||||
) ;---- Ende repeat
|
||||
) ;---- Ende geometrie
|
||||
|
||||
(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_BEM (- WINK_RAD3 (/ pi 2)))
|
||||
(setq WINK_BEM (+ WINK_RAD3 (/ pi 2)))
|
||||
)
|
||||
(command "_align" PT1 PT2 (polar PT1 WINK_BEM 200) "")
|
||||
(command "_exit")
|
||||
(command "_layer" "_m" "L-3" "_c" "3" "" "")
|
||||
)
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
(defun c:l_bg_kw ( / PT0 PT01 PT02 PT1 PT2 PT3 PT4 PT5 PT6 PT7
|
||||
PT8 PT9 PT10 PT11 PT12 PT13 WINK_RAD1 WINK_RAD2
|
||||
WINK_RAD3 WINK_GRA1 WINK_GRA2 WINK_GRA3 ZAEHLER
|
||||
ANZAHL)
|
||||
(setvar "limcheck" 0)
|
||||
(prompt "**** BG aus KW + STBL(s) - links oder rechts *******")
|
||||
(prompt "")
|
||||
(setq BEZ "** BG 1KW+STBL ")
|
||||
(if (null m_ANZ) (setq m_ANZ "ANZ_2")) ; mit 2 KW vordefinieren
|
||||
(if (null m_BEMASSEN) (setq m_BEMASSEN "1")) ; mit Bemaáung
|
||||
(dbox)
|
||||
(datain)
|
||||
(geometrie)
|
||||
(mach-block PT0 "0" auswahl-satz)
|
||||
(setq auswahl-satz nil)
|
||||
(setq BEZ (strcat BEZ " + " (rtos MUFFE-ZAEHLER) " MUFFE(N)"))
|
||||
(attribute-aendern "0" "2" "1" "" "" block-kennung "111111111" (strcat BEZ " [BG1]") "" "") ; in SSTBASE.LSP
|
||||
(setvar "osmode" ALTFANG)
|
||||
)
|
||||
;------------------------------------------------------------------------------
|
||||
@@ -0,0 +1,65 @@
|
||||
l_bg_w45 : dialog {
|
||||
label = "SCHONENBERGER Systeme GmbH";
|
||||
: text {
|
||||
label = "Group 45 degree W/STB (BG or Special)";
|
||||
}
|
||||
: row {
|
||||
: boxed_radio_column {
|
||||
label = "Radius";
|
||||
key = "RA";
|
||||
: radio_button {
|
||||
label = "R 650";
|
||||
key = "RA_1";
|
||||
}
|
||||
: radio_button {
|
||||
label = "R 400";
|
||||
key = "RA_2";
|
||||
}
|
||||
: radio_button {
|
||||
label = "R 175";
|
||||
key = "RA_3";
|
||||
}
|
||||
}
|
||||
: boxed_radio_column {
|
||||
label = "Direction";
|
||||
key = "RI";
|
||||
: radio_button {
|
||||
label = "Left";
|
||||
key = "RI_L";
|
||||
}
|
||||
: radio_button {
|
||||
label = "Right";
|
||||
key = "RI_R";
|
||||
}
|
||||
}
|
||||
}
|
||||
: row {
|
||||
: boxed_radio_column {
|
||||
label = "Component";
|
||||
key = "WB";
|
||||
: radio_button {
|
||||
label = "Switch";
|
||||
key = "WB_W";
|
||||
}
|
||||
: radio_button {
|
||||
label = "STB";
|
||||
key = "WB_B";
|
||||
}
|
||||
}
|
||||
: image {
|
||||
height = 5;
|
||||
width = 5;
|
||||
color = 0;
|
||||
key = "anzeige";
|
||||
}
|
||||
}
|
||||
: row {
|
||||
: toggle {
|
||||
label = "Dimensioning";
|
||||
mnemonic = "B";
|
||||
key = "BEMASSEN";
|
||||
}
|
||||
}
|
||||
ok_cancel;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,602 @@
|
||||
;------------------------------------------------------------------------;
|
||||
; Baugruppe oder Sonder aus 1 Weiche - links oder rechts (STAHL) ;
|
||||
;------------------------------------------------------------------------;
|
||||
; AW 12.05.93 ;
|
||||
;------------------------------------------------------------------------;
|
||||
|
||||
(defun Dbox (/ Dat)
|
||||
(setq Dat (load_dialog (strcat lw "/acadsst/layout/l_bg_w45.DCL")))
|
||||
(if (not (new_dialog "l_bg_w45" Dat)) (exit))
|
||||
(set_tile "RA" m_RA)
|
||||
(set_tile "RI" m_RI)
|
||||
(set_tile "WB" m_WB)
|
||||
(set_tile "BEMASSEN" m_BEMASSEN)
|
||||
(setq breite (dimx_tile "anzeige"))
|
||||
(setq hoehe (dimy_tile "anzeige"))
|
||||
(start_image "anzeige")
|
||||
(slide_image 0 0 breite hoehe "layout(l_bg_w45)")
|
||||
(end_image)
|
||||
(action_tile "accept" "(SetPara) (done_dialog)")
|
||||
(action_tile "cancel" "(exit) (done_dialog)")
|
||||
(start_dialog)
|
||||
(unload_dialog Dat)
|
||||
)
|
||||
|
||||
(defun SetPara ()
|
||||
(setq m_RA (get_tile "RA")
|
||||
m_RI (get_tile "RI")
|
||||
m_WB (get_tile "WB")
|
||||
m_BEMASSEN (get_tile "BEMASSEN")
|
||||
)
|
||||
(if (= m_RA "RA_1")
|
||||
(setq RADIUS 1)
|
||||
)
|
||||
(if (= m_RA "RA_2")
|
||||
(setq RADIUS 2)
|
||||
)
|
||||
(if (= m_RA "RA_3")
|
||||
(setq RADIUS 3)
|
||||
)
|
||||
(if (= m_RI "RI_L")
|
||||
(setq RICHTUNG "L")
|
||||
)
|
||||
(if (= m_RI "RI_R")
|
||||
(setq RICHTUNG "R")
|
||||
)
|
||||
(if (= m_WB "WB_W")
|
||||
(setq ABSCHLUSS "W")
|
||||
)
|
||||
(if (= m_WB "WB_B")
|
||||
(setq ABSCHLUSS "B")
|
||||
)
|
||||
)
|
||||
|
||||
(defun datain ()
|
||||
(setq ALTFANG (getvar "osmode"))
|
||||
(setq MUFFE-ZAEHLER 0)
|
||||
(setq auswahl-satz nil)
|
||||
|
||||
(if (= RADIUS 2) ; bei R=400 gibt es keine 45-Grad Weiche
|
||||
(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: "))
|
||||
(bl-name PT0) ;--> Block-Name definieren -> R�ckgabe: element-name
|
||||
|
||||
(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 "/acadsst/layout/muffe") PT01 "" "" "0")
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "825002016" "MUFFE ANGESCHWEISST (BG)" "" "")
|
||||
(setq auswahl-satz (ssget "_L"))
|
||||
(setq MUFFE-ZAEHLER (+ MUFFE-ZAEHLER 1))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/muffe") PT02 "" "" "0")
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "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 "/acadsst/layout/muffe") (polar PT0 WINK_RAD1 550) "" "" "0")
|
||||
(command "_insert" (strcat lw "/acadsst/layout/muffe") (polar PT0 WINK_RAD1 375) "" "" "0")
|
||||
)
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "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 "/acadsst/layout/w45650l3") PT0 "" "" (rtos WINK_GRA1))
|
||||
(attribute-aendern "0" "0" "" (rtos L1) "" block-kennung "824052012" " (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
(progn
|
||||
(command "_insert" (strcat lw "/acadsst/layout/w45650r3") PT0 "" "" (rtos WINK_GRA1))
|
||||
(attribute-aendern "0" "0" "" (rtos L1) "" block-kennung "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 "/acadsst/layout/w45650l4") PT0 "" "" (rtos WINK_GRA1))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/w45650r4") PT0 "" "" (rtos WINK_GRA1))
|
||||
)
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "" " (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 "/acadsst/layout/verbind") PT3 "0.5" "0.5" (rtos WINK_GRA1))
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/stbg") PT01 (- L1 425) "1" (rtos WINK_GRA1))
|
||||
(attribute-aendern "0" "0" "" (rtos (- L1 425)) "" block-kennung ""
|
||||
(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 "/acadsst/layout/s45650l3") PT0 "" "" (rtos WINK_GRA1))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s45650r3") PT0 "" "" (rtos WINK_GRA1))
|
||||
)
|
||||
(attribute-aendern "0" "0" "" (rtos L1) "" block-kennung "" " 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 "/acadsst/layout/s45650l4") PT0 "" "" (rtos WINK_GRA1))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s45650r4") PT0 "" "" (rtos WINK_GRA1))
|
||||
)
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "" " (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(if (> L1 426)
|
||||
(progn
|
||||
(setq PT3 (polar PT01 WINK_RAD1 (- L1 425)))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT3 "0.5" "0.5" (rtos WINK_GRA1))
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/stbg") PT01 (- L1 425) "1" (rtos WINK_GRA1))
|
||||
(attribute-aendern "0" "0" "" (rtos (- L1 425)) "" block-kennung ""
|
||||
(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 "/acadsst/layout/verbind") PT4 "0.5" "0.5" (rtos WINK_GRA2))
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/stbg") PT4 (- L2 565) "1" (rtos WINK_GRA2))
|
||||
(attribute-aendern "0" "0" "" (rtos (- L2 565)) "" block-kennung ""
|
||||
(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 "/acadsst/layout/s45400l5") PT0 "" "" (rtos WINK_GRA1))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s45400r5") PT0 "" "" (rtos WINK_GRA1))
|
||||
)
|
||||
(attribute-aendern "0" "0" "" (rtos L1) "" block-kennung "" " 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 "/acadsst/layout/s45400l5") PT0 "" "" (rtos WINK_GRA1))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s45400r5") PT0 "" "" (rtos WINK_GRA1))
|
||||
)
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "" " (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(if (> L1 270)
|
||||
(progn
|
||||
(setq PT3 (polar PT01 WINK_RAD1 (- L1 270)))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT3 "0.5" "0.5" (rtos WINK_GRA1))
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/stbg") PT01 (- L1 270) "1" (rtos WINK_GRA1))
|
||||
(attribute-aendern "0" "0" "" (rtos (- L1 270)) "" block-kennung ""
|
||||
(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 "/acadsst/layout/verbind") PT4 "0.5" "0.5" (rtos WINK_GRA2))
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/stbg") PT4 (- L2 565) "1" (rtos WINK_GRA2))
|
||||
(attribute-aendern "0" "0" "" (rtos (- L2 565)) "" block-kennung ""
|
||||
(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 "/acadsst/layout/w45175l3") PT0 "" "" (rtos WINK_GRA1))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/w45175r3") PT0 "" "" (rtos WINK_GRA1))
|
||||
)
|
||||
(attribute-aendern "0" "0" "" (rtos L1) "" block-kennung "" " (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 "/acadsst/layout/w45175l4") PT0 "" "" (rtos WINK_GRA1))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/w45175r4") PT0 "" "" (rtos WINK_GRA1))
|
||||
)
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "" " (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(if (> L1 250)
|
||||
(progn
|
||||
(setq PT3 (polar PT01 WINK_RAD1 (- L1 250)))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT3 "0.5" "0.5" (rtos WINK_GRA1))
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/stbg") PT01 (- L1 250) "1" (rtos WINK_GRA1))
|
||||
(attribute-aendern "0" "0" "" (rtos (- L1 250)) "" block-kennung ""
|
||||
(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 "/acadsst/layout/s45175l4") PT0 "" "" (rtos WINK_GRA1))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s45175r4") PT0 "" "" (rtos WINK_GRA1))
|
||||
)
|
||||
(attribute-aendern "0" "0" "" (rtos L1) "" block-kennung "" " 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 "/acadsst/layout/s45175l4") PT0 "" "" (rtos WINK_GRA1))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s45175r4") PT0 "" "" (rtos WINK_GRA1))
|
||||
)
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "" " (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(if (> L1 250)
|
||||
(progn
|
||||
(setq PT3 (polar PT01 WINK_RAD1 (- L1 250)))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT3 "0.5" "0.5" (rtos WINK_GRA1))
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/stbg") PT01 (- L1 250) "1" (rtos WINK_GRA1))
|
||||
(attribute-aendern "0" "0" "" (rtos (- L1 250)) "" block-kennung ""
|
||||
(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 "/acadsst/layout/verbind") PT4 "0.5" "0.5" (rtos WINK_GRA2))
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/stbg") PT4 (- L2 565) "1" (rtos WINK_GRA2))
|
||||
(attribute-aendern "0" "0" "" (rtos (- L2 565)) "" block-kennung ""
|
||||
(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 oder Sonder aus Weiche/STBL - links oder rechts *******")
|
||||
(prompt "")
|
||||
(if (null m_RA) (setq m_RA "RA_1")) ; Radius 650
|
||||
(if (null m_RI) (setq m_RI "RI_L")) ; Links
|
||||
(if (null m_WB) (setq m_WB "WB_W")) ; Weiche
|
||||
(if (null m_BEMASSEN) (setq m_BEMASSEN "1")) ; mit Bemaáung
|
||||
(dbox)
|
||||
(datain)
|
||||
|
||||
(if (= ABSCHLUSS "W")
|
||||
(setq ART "** BG W")
|
||||
(setq ART "** MG STBL")
|
||||
)
|
||||
|
||||
(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" "" "" block-kennung "111111111" (strcat BEZ " [BG1]") "" "") ; in SSTBASE.LSP
|
||||
(if (= m_BEMASSEN "1")
|
||||
(bemassung)
|
||||
)
|
||||
(setvar "osmode" ALTFANG)
|
||||
)
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
l_bg_w90 : dialog {
|
||||
label = "SCHONENBERGER Systeme GmbH";
|
||||
: text {
|
||||
label = "Group 90 degree W/STB (BG or Special)";
|
||||
}
|
||||
: row {
|
||||
: boxed_radio_column {
|
||||
label = "Radius";
|
||||
key = "RA";
|
||||
: radio_button {
|
||||
label = "R 650";
|
||||
key = "RA_1";
|
||||
}
|
||||
: radio_button {
|
||||
label = "R 400";
|
||||
key = "RA_2";
|
||||
}
|
||||
: radio_button {
|
||||
label = "R 175";
|
||||
key = "RA_3";
|
||||
}
|
||||
}
|
||||
: boxed_radio_column {
|
||||
label = "Direction";
|
||||
key = "RI";
|
||||
: radio_button {
|
||||
label = "Left";
|
||||
key = "RI_L";
|
||||
}
|
||||
: radio_button {
|
||||
label = "Right";
|
||||
key = "RI_R";
|
||||
}
|
||||
}
|
||||
}
|
||||
: row {
|
||||
: boxed_radio_column {
|
||||
label = "Component";
|
||||
key = "WB";
|
||||
: radio_button {
|
||||
label = "Switch";
|
||||
key = "WB_W";
|
||||
}
|
||||
: radio_button {
|
||||
label = "Curve(STB)";
|
||||
key = "WB_B";
|
||||
}
|
||||
}
|
||||
: image {
|
||||
height = 5;
|
||||
width = 5;
|
||||
color = 0;
|
||||
key = "anzeige";
|
||||
}
|
||||
}
|
||||
: row {
|
||||
: toggle {
|
||||
label = "Dimensioning";
|
||||
mnemonic = "D";
|
||||
key = "BEMASSEN";
|
||||
}
|
||||
}
|
||||
ok_cancel;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,604 @@
|
||||
|
||||
;------------------------------------------------------------------------;
|
||||
; Baugruppe oder Sonder aus 1 Weiche - links oder rechts (STAHL) ;
|
||||
;------------------------------------------------------------------------;
|
||||
; AW 12.05.93 ;
|
||||
;------------------------------------------------------------------------;
|
||||
|
||||
(defun Dbox (/ Dat)
|
||||
(setq Dat (load_dialog (strcat lw "/acadsst/layout/l_bg_w90.DCL")))
|
||||
(if (not (new_dialog "l_bg_w90" Dat)) (exit))
|
||||
(set_tile "RA" m_RA)
|
||||
(set_tile "RI" m_RI)
|
||||
(set_tile "WB" m_WB)
|
||||
(set_tile "BEMASSEN" m_BEMASSEN)
|
||||
(setq breite (dimx_tile "anzeige"))
|
||||
(setq hoehe (dimy_tile "anzeige"))
|
||||
(start_image "anzeige")
|
||||
(slide_image 0 0 breite hoehe "layout(l_bg_w90)")
|
||||
(end_image)
|
||||
(action_tile "accept" "(SetPara) (done_dialog)")
|
||||
(action_tile "cancel" "(exit) (done_dialog)")
|
||||
(start_dialog)
|
||||
(unload_dialog Dat)
|
||||
)
|
||||
|
||||
(defun SetPara ()
|
||||
(setq m_RA (get_tile "RA")
|
||||
m_RI (get_tile "RI")
|
||||
m_WB (get_tile "WB")
|
||||
m_BEMASSEN (get_tile "BEMASSEN")
|
||||
)
|
||||
(if (= m_RA "RA_1")
|
||||
(setq RADIUS 1)
|
||||
)
|
||||
(if (= m_RA "RA_2")
|
||||
(setq RADIUS 2)
|
||||
)
|
||||
(if (= m_RA "RA_3")
|
||||
(setq RADIUS 3)
|
||||
)
|
||||
(if (= m_RI "RI_L")
|
||||
(setq RICHTUNG "L")
|
||||
)
|
||||
(if (= m_RI "RI_R")
|
||||
(setq RICHTUNG "R")
|
||||
)
|
||||
(if (= m_WB "WB_W")
|
||||
(setq ABSCHLUSS "W")
|
||||
)
|
||||
(if (= m_WB "WB_B")
|
||||
(setq ABSCHLUSS "B")
|
||||
)
|
||||
)
|
||||
|
||||
(defun datain ()
|
||||
(setq ALTFANG (getvar "osmode"))
|
||||
(setq MUFFE-ZAEHLER 0)
|
||||
(setq auswahl-satz nil)
|
||||
;------------------------
|
||||
;>>>> Eingabeteil <<<<<<<
|
||||
;------------------------
|
||||
(initget (+ 1 2 4))
|
||||
|
||||
(setq PT01 (getpoint "\nAnfangspunkt antippen: "))
|
||||
(setq PT0 (getpoint PT01 "\nSchnittpunkt antippen: "))
|
||||
(setq PT02 (getpoint PT0 "\nEndpunkt antippen: "))
|
||||
(bl-name PT0) ;--> Block-Name definieren -> R�ckgabe: element-name
|
||||
|
||||
(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 2)))
|
||||
(setq WINK_RAD2 (- WINK_RAD1 (/ pi 2)))
|
||||
)
|
||||
(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))
|
||||
|
||||
(if (= RADIUS 1) ; Radius 650
|
||||
(progn
|
||||
(if (or (< L1 650) (> L1 1800) (< L2 650) (> L2 1800))
|
||||
(progn
|
||||
(alert "Abstand zu groá oder zu klein ...")
|
||||
(setvar "osmode" ALTFANG)
|
||||
(exit)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (= RADIUS 2) ; Radius 400
|
||||
(progn
|
||||
(if (or (< L1 400) (> L1 1800) (< L2 400) (> L2 1800))
|
||||
(progn
|
||||
(alert "Abstand zu groá oder zu klein ...")
|
||||
(setvar "osmode" ALTFANG)
|
||||
(exit)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (= RADIUS 3) ; Radius 175
|
||||
(progn
|
||||
(if (or (< L1 270) (> L1 1800) (< L2 270) (> 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 "/acadsst/layout/muffe") PT01 "" "" "0")
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "825002016" "MUFFE ANGESCHWEISST (BG)" "" "")
|
||||
(setq auswahl-satz (ssget "_L"))
|
||||
(setq MUFFE-ZAEHLER (+ MUFFE-ZAEHLER 1))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/muffe") PT02 "" "" "0")
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "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 "/acadsst/layout/muffe") (polar PT0 WINK_RAD1 400) "" "" "0")
|
||||
(command "_insert" (strcat lw "/acadsst/layout/muffe") PT0 "" "" "0")
|
||||
)
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "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 800)
|
||||
(command "_layer" "_m" "L-1" "_c" "1" "" "")
|
||||
(if (= RICHTUNG "L")
|
||||
(progn
|
||||
(command "_insert" (strcat lw "/acadsst/layout/w90650l7") PT0 "" "" (rtos WINK_GRA1))
|
||||
(attribute-aendern "0" "0" "" (rtos L1) "" block-kennung "824052002" " (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
(progn
|
||||
(command "_insert" (strcat lw "/acadsst/layout/w90650r7") PT0 "" "" (rtos WINK_GRA1))
|
||||
(attribute-aendern "0" "0" "" (rtos L1) "" block-kennung "824052001" " (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
)
|
||||
(if (> L1 650)
|
||||
(progn
|
||||
(setq PT3 (polar PT01 WINK_RAD1 (- L1 650)))
|
||||
(command "_line" PT01 PT3 "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(
|
||||
(and (>= L1 800) (<= L1 1800))
|
||||
(command "_layer" "_m" "L-3" "_c" "3" "" "")
|
||||
(if (= RICHTUNG "L")
|
||||
(command "_insert" (strcat lw "/acadsst/layout/w90650l8") PT0 "" "" (rtos WINK_GRA1))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/w90650r8") PT0 "" "" (rtos WINK_GRA1))
|
||||
)
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "" " (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(if (> L1 800)
|
||||
(progn
|
||||
(setq PT3 (polar PT01 WINK_RAD1 (- L1 800)))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT3 "0.5" "0.5" (rtos WINK_GRA1))
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/stbg") PT01 (- L1 800) "1" (rtos WINK_GRA1))
|
||||
(attribute-aendern "0" "0" "" (rtos (- L1 800)) "" block-kennung ""
|
||||
(strcat " L=" (rtos (- L1 800))) "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
)
|
||||
)
|
||||
) ; endcond
|
||||
) ;----end PROGN
|
||||
) ;---- endif ABSCHLUSS="W"
|
||||
|
||||
(if (= ABSCHLUSS "B")
|
||||
(progn
|
||||
(cond
|
||||
(
|
||||
(< L1 800)
|
||||
(command "_layer" "_m" "L-1" "_c" "1" "" "")
|
||||
(if (= RICHTUNG "L")
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s90650l8") PT0 "" "" (rtos WINK_GRA1))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s90650r8") PT0 "" "" (rtos WINK_GRA1))
|
||||
)
|
||||
(attribute-aendern "0" "0" "" (rtos L1) "" block-kennung "" " SONDER IN (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(if (> L1 650)
|
||||
(progn
|
||||
(setq PT3 (polar PT01 WINK_RAD1 (- L1 650)))
|
||||
(command "_line" PT01 PT3 "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(
|
||||
(and (>= L1 800) (<= L1 1800))
|
||||
(command "_layer" "_m" "L-3" "_c" "3" "" "")
|
||||
(if (= RICHTUNG "L")
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s90650l8") PT0 "" "" (rtos WINK_GRA1))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s90650r8") PT0 "" "" (rtos WINK_GRA1))
|
||||
)
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "" " (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(if (> L1 800)
|
||||
(progn
|
||||
(setq PT3 (polar PT01 WINK_RAD1 (- L1 800)))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT3 "0.5" "0.5" (rtos WINK_GRA1))
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/stbg") PT01 (- L1 800) "1" (rtos WINK_GRA1))
|
||||
(attribute-aendern "0" "0" "" (rtos (- L1 800)) "" block-kennung ""
|
||||
(strcat " L=" (rtos (- L1 800))) "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
)
|
||||
)
|
||||
) ; endcond
|
||||
) ;----end PROGN
|
||||
) ;---- endif ABSCHLUSS="B"
|
||||
|
||||
|
||||
;***************
|
||||
; L2 bearbeiten
|
||||
;***************
|
||||
(cond
|
||||
(
|
||||
(< L2 800)
|
||||
(command "_layer" "_m" "L-1" "_c" "1" "" "")
|
||||
(if (> L2 650)
|
||||
(progn
|
||||
(setq PT4 (polar PT0 WINK_RAD2 650))
|
||||
(command "_line" PT02 PT4 "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(
|
||||
(and (>= L2 800) (<= L2 1800))
|
||||
(command "_layer" "_m" "L-3" "_c" "3" "" "")
|
||||
(if (> L2 800)
|
||||
(progn
|
||||
(setq PT4 (polar PT0 WINK_RAD2 800))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT4 "0.5" "0.5" (rtos WINK_GRA2))
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/stbg") PT4 (- L2 800) "1" (rtos WINK_GRA2))
|
||||
(attribute-aendern "0" "0" "" (rtos (- L2 800)) "" block-kennung ""
|
||||
(strcat " L=" (rtos (- L2 800))) "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
)
|
||||
)
|
||||
) ; endcond
|
||||
)
|
||||
|
||||
(defun geometrie-400()
|
||||
;-----------------------------------------
|
||||
; Abst„nde analysieren und Elemente setzen
|
||||
;-----------------------------------------
|
||||
;***************
|
||||
; L1 bearbeiten
|
||||
;***************
|
||||
|
||||
(if (= ABSCHLUSS "W")
|
||||
(progn
|
||||
(cond
|
||||
(
|
||||
(and (>= L1 500) (<= L1 1800))
|
||||
(command "_layer" "_m" "L-3" "_c" "3" "" "")
|
||||
(if (= RICHTUNG "L")
|
||||
(command "_insert" (strcat lw "/acadsst/layout/w90400l5") PT0 "" "" (rtos WINK_GRA1))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/w90400r5") PT0 "" "" (rtos WINK_GRA1))
|
||||
)
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "" " (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(if (> L1 500)
|
||||
(progn
|
||||
(setq PT3 (polar PT01 WINK_RAD1 (- L1 500)))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT3 "0.5" "0.5" (rtos WINK_GRA1))
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/stbg") PT01 (- L1 500) "1" (rtos WINK_GRA1))
|
||||
(attribute-aendern "0" "0" "" (rtos (- L1 500)) "" block-kennung ""
|
||||
(strcat " L=" (rtos (- L1 500))) "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
)
|
||||
)
|
||||
) ; endcond
|
||||
) ;----end PROGN
|
||||
) ;---- endif ABSCHLUSS="W"
|
||||
|
||||
(if (= ABSCHLUSS "B")
|
||||
(progn
|
||||
(cond
|
||||
(
|
||||
(< L1 500)
|
||||
(command "_layer" "_m" "L-1" "_c" "1" "" "")
|
||||
(if (= RICHTUNG "L")
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s90400l5") PT0 "" "" (rtos WINK_GRA1))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s90400r5") PT0 "" "" (rtos WINK_GRA1))
|
||||
)
|
||||
(attribute-aendern "0" "0" "" (rtos L1) "" block-kennung "" " SONDER IN (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(if (> L1 400)
|
||||
(progn
|
||||
(setq PT3 (polar PT01 WINK_RAD1 (- L1 400)))
|
||||
(command "_line" PT01 PT3 "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(
|
||||
(and (>= L1 500) (<= L1 1800))
|
||||
(command "_layer" "_m" "L-3" "_c" "3" "" "")
|
||||
(if (= RICHTUNG "L")
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s90400l5") PT0 "" "" (rtos WINK_GRA1))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s90400r5") PT0 "" "" (rtos WINK_GRA1))
|
||||
)
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "" " (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(if (> L1 500)
|
||||
(progn
|
||||
(setq PT3 (polar PT01 WINK_RAD1 (- L1 500)))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT3 "0.5" "0.5" (rtos WINK_GRA1))
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/stbg") PT01 (- L1 500) "1" (rtos WINK_GRA1))
|
||||
(attribute-aendern "0" "0" "" (rtos (- L1 500)) "" block-kennung ""
|
||||
(strcat " L=" (rtos (- L1 500))) "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
)
|
||||
)
|
||||
) ; endcond
|
||||
) ;----end PROGN
|
||||
) ;---- endif ABSCHLUSS="B"
|
||||
|
||||
|
||||
;***************
|
||||
; L2 bearbeiten
|
||||
;***************
|
||||
(cond
|
||||
(
|
||||
(< L2 500)
|
||||
(command "_layer" "_m" "L-1" "_c" "1" "" "")
|
||||
(if (> L2 500)
|
||||
(progn
|
||||
(setq PT4 (polar PT0 WINK_RAD2 400))
|
||||
(command "_line" PT02 PT4 "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(
|
||||
(and (>= L2 500) (<= L2 1800))
|
||||
(command "_layer" "_m" "L-3" "_c" "3" "" "")
|
||||
(if (> L2 500)
|
||||
(progn
|
||||
(setq PT4 (polar PT0 WINK_RAD2 500))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT4 "0.5" "0.5" (rtos WINK_GRA2))
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/stbg") PT4 (- L2 500) "1" (rtos WINK_GRA2))
|
||||
(attribute-aendern "0" "0" "" (rtos (- L2 500)) "" block-kennung ""
|
||||
(strcat " L=" (rtos (- L2 500))) "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
)
|
||||
)
|
||||
) ; endcond
|
||||
)
|
||||
|
||||
(defun geometrie-175()
|
||||
;-----------------------------------------
|
||||
; Abst„nde analysieren und Elemente setzen
|
||||
;-----------------------------------------
|
||||
;***************
|
||||
; L1 bearbeiten
|
||||
;***************
|
||||
|
||||
(if (= ABSCHLUSS "W")
|
||||
(progn
|
||||
(cond
|
||||
(
|
||||
(and (>= L1 400) (<= L1 1800))
|
||||
(command "_layer" "_m" "L-3" "_c" "3" "" "")
|
||||
(if (= RICHTUNG "L")
|
||||
(command "_insert" (strcat lw "/acadsst/layout/w90175l4") PT0 "" "" (rtos WINK_GRA1))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/w90175r4") PT0 "" "" (rtos WINK_GRA1))
|
||||
)
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "" " (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(if (> L1 400)
|
||||
(progn
|
||||
(setq PT3 (polar PT01 WINK_RAD1 (- L1 400)))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT3 "0.5" "0.5" (rtos WINK_GRA1))
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/stbg") PT01 (- L1 400) "1" (rtos WINK_GRA1))
|
||||
(attribute-aendern "0" "0" "" (rtos (- L1 400)) "" block-kennung ""
|
||||
(strcat " L=" (rtos (- L1 400))) "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
)
|
||||
)
|
||||
) ; endcond
|
||||
) ;----end PROGN
|
||||
) ;---- endif ABSCHLUSS="W"
|
||||
|
||||
(if (= ABSCHLUSS "B")
|
||||
(progn
|
||||
(cond
|
||||
(
|
||||
(< L1 400)
|
||||
(command "_layer" "_m" "L-1" "_c" "1" "" "")
|
||||
(if (= RICHTUNG "L")
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s90175l4") PT0 "" "" (rtos WINK_GRA1))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s90175r4") PT0 "" "" (rtos WINK_GRA1))
|
||||
)
|
||||
(attribute-aendern "0" "0" "" (rtos L1) "" block-kennung "" " SONDER IN (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(if (> L1 270)
|
||||
(progn
|
||||
(setq PT3 (polar PT01 WINK_RAD1 (- L1 270)))
|
||||
(command "_line" PT01 PT3 "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(
|
||||
(and (>= L1 400) (<= L1 1800))
|
||||
(command "_layer" "_m" "L-3" "_c" "3" "" "")
|
||||
(if (= RICHTUNG "L")
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s90175l4") PT0 "" "" (rtos WINK_GRA1))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s90175r4") PT0 "" "" (rtos WINK_GRA1))
|
||||
)
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "" " (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(if (> L1 400)
|
||||
(progn
|
||||
(setq PT3 (polar PT01 WINK_RAD1 (- L1 400)))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT3 "0.5" "0.5" (rtos WINK_GRA1))
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/stbg") PT01 (- L1 400) "1" (rtos WINK_GRA1))
|
||||
(attribute-aendern "0" "0" "" (rtos (- L1 400)) "" block-kennung ""
|
||||
(strcat " L=" (rtos (- L1 400))) "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
)
|
||||
)
|
||||
) ; endcond
|
||||
) ;----end PROGN
|
||||
) ;---- endif ABSCHLUSS="B"
|
||||
|
||||
|
||||
;***************
|
||||
; L2 bearbeiten
|
||||
;***************
|
||||
(cond
|
||||
(
|
||||
(< L2 400)
|
||||
(command "_layer" "_m" "L-1" "_c" "1" "" "")
|
||||
(if (> L2 270)
|
||||
(progn
|
||||
(setq PT4 (polar PT0 WINK_RAD2 270))
|
||||
(command "_line" PT02 PT4 "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(
|
||||
(and (>= L2 400) (<= L2 1800))
|
||||
(command "_layer" "_m" "L-3" "_c" "3" "" "")
|
||||
(if (> L2 400)
|
||||
(progn
|
||||
(setq PT4 (polar PT0 WINK_RAD2 400))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT4 "0.5" "0.5" (rtos WINK_GRA2))
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/stbg") PT4 (- L2 400) "1" (rtos WINK_GRA2))
|
||||
(attribute-aendern "0" "0" "" (rtos (- L2 400)) "" block-kennung ""
|
||||
(strcat " L=" (rtos (- L2 400))) "" "")
|
||||
(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_w90 ( / PT0 PT01 PT02 PT3 PT4 RADIUS RICHTUNG
|
||||
ABSCHLUSS)
|
||||
(setvar "limcheck" 0)
|
||||
(prompt "**** BG aus 1 Weiche + ST - links oder rechts *******")
|
||||
(prompt "")
|
||||
(if (null m_RA) (setq m_RA "RA_1")) ; Radius 650
|
||||
(if (null m_RI) (setq m_RI "RI_L")) ; Links
|
||||
(if (null m_WB) (setq m_WB "WB_W")) ; Weiche
|
||||
(if (null m_BEMASSEN) (setq m_BEMASSEN "1")) ; mit Bemaáung
|
||||
(dbox)
|
||||
(datain)
|
||||
|
||||
(if (= ABSCHLUSS "W")
|
||||
(setq ART "** BG W")
|
||||
(setq ART "** BG STBL")
|
||||
)
|
||||
|
||||
(if (= RADIUS 1)
|
||||
(progn
|
||||
(geometrie-650)
|
||||
(setq RAD " R650")
|
||||
(if (or (< L1 800) (< L2 800))
|
||||
(setq BEZ (strcat ART " (SONDER)" RAD "/90-" RICHTUNG " L=" (rtos L1) "-" (rtos L2)))
|
||||
(setq BEZ (strcat ART "+ST" RAD "/90-" 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 "/90-" RICHTUNG " L=" (rtos L1) "-" (rtos L2)))
|
||||
(setq BEZ (strcat ART "+ST" RAD "/90-" 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 "/90-" RICHTUNG " L=" (rtos L1) "-" (rtos L2)))
|
||||
(setq BEZ (strcat ART "+ST" RAD "/90-" 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" "" "" block-kennung "111111111" (strcat BEZ " [BG1]") "" "") ; in SSTBASE.LSP
|
||||
(if (= m_BEMASSEN "1")
|
||||
(bemassung)
|
||||
)
|
||||
(setvar "osmode" ALTFANG)
|
||||
)
|
||||
;------------------------------------------------------------------------------
|
||||
@@ -0,0 +1,61 @@
|
||||
l_bg_wb : dialog {
|
||||
label = "SCHONENBERGER Systeme GmbH";
|
||||
: text {
|
||||
label = "Group of 90 degree switches";
|
||||
}
|
||||
: row {
|
||||
: boxed_radio_column {
|
||||
label = "Components";
|
||||
key = "ANZ_";
|
||||
: radio_button {
|
||||
label = "2";
|
||||
key = "ANZ_1";
|
||||
}
|
||||
: radio_button {
|
||||
label = "3";
|
||||
key = "ANZ_2";
|
||||
}
|
||||
}
|
||||
: boxed_radio_column {
|
||||
label = "Direction";
|
||||
key = "RI";
|
||||
: radio_button {
|
||||
label = "Left";
|
||||
key = "RI_L";
|
||||
}
|
||||
: radio_button {
|
||||
label = "Right";
|
||||
key = "RI_R";
|
||||
}
|
||||
}
|
||||
}
|
||||
: row {
|
||||
: boxed_radio_column {
|
||||
label = "Component";
|
||||
key = "WB";
|
||||
: radio_button {
|
||||
label = "Switch";
|
||||
key = "WB_W";
|
||||
}
|
||||
: radio_button {
|
||||
label = "Curve(STB)";
|
||||
key = "WB_B";
|
||||
}
|
||||
}
|
||||
}
|
||||
: row {
|
||||
: toggle {
|
||||
label = "Dimensioning";
|
||||
mnemonic = "D";
|
||||
key = "BEMASSEN";
|
||||
}
|
||||
: image {
|
||||
height = 5;
|
||||
width = 15;
|
||||
color = 0;
|
||||
key = "anzeige";
|
||||
}
|
||||
}
|
||||
ok_cancel;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,553 @@
|
||||
;------------------------------------------------------------------------;
|
||||
; Baugruppe aus 2 oder 3 Weichen - links oder rechts (STAHL) ;
|
||||
;------------------------------------------------------------------------;
|
||||
; AW 04.05.93/1.12.97 ;
|
||||
;------------------------------------------------------------------------;
|
||||
(defun Dbox (/ Dat)
|
||||
(setq Dat (load_dialog (strcat lw "/acadsst/layout/l_bg_wb.DCL")))
|
||||
(if (not (new_dialog "l_bg_wb" Dat)) (exit))
|
||||
(set_tile "ANZ_" m_ANZ)
|
||||
(set_tile "RI" m_RI)
|
||||
(set_tile "WB" m_WB)
|
||||
(set_tile "BEMASSEN" m_BEMASSEN)
|
||||
(SetDia)
|
||||
(ACTION_TILE "ANZ_" "(zeig_dia)")
|
||||
(ACTION_TILE "RI" "(zeig_dia)")
|
||||
(ACTION_TILE "WB" "(zeig_dia)")
|
||||
(ACTION_TILE "BEMASSEN" "(zeig_dia)")
|
||||
(action_tile "accept" "(SetPara) (done_dialog)")
|
||||
(action_tile "cancel" "(exit) (done_dialog)")
|
||||
(start_dialog)
|
||||
(unload_dialog Dat)
|
||||
)
|
||||
|
||||
(defun SetDia()
|
||||
(setq breite (dimx_tile "anzeige"))
|
||||
(setq hoehe (dimy_tile "anzeige"))
|
||||
(start_image "anzeige")
|
||||
(FILL_IMAGE 0 0 breite hoehe -18)
|
||||
(if (= m_BEMASSEN "1") ; mit Bemassung
|
||||
(progn
|
||||
(if (= m_ANZ "ANZ_1") ; mit 2 Elementen
|
||||
(progn
|
||||
(if (= m_RI "RI_L")
|
||||
(progn
|
||||
(if (= m_WB "WB_W")
|
||||
(slide_image 0 0 breite hoehe "layout(lwb2wdl)")
|
||||
(slide_image 0 0 breite hoehe "layout(lwb2bdl)")
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (= m_RI "RI_R")
|
||||
(progn
|
||||
(if (= m_WB "WB_W")
|
||||
(slide_image 0 0 breite hoehe "layout(lwb2wdr)")
|
||||
(slide_image 0 0 breite hoehe "layout(lwb2bdr)")
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(progn
|
||||
(if (= m_RI "RI_L")
|
||||
(progn
|
||||
(if (= m_WB "WB_W")
|
||||
(slide_image 0 0 breite hoehe "layout(lwb3wdl)")
|
||||
(slide_image 0 0 breite hoehe "layout(lwb3bdl)")
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (= m_RI "RI_R")
|
||||
(progn
|
||||
(if (= m_WB "WB_W")
|
||||
(slide_image 0 0 breite hoehe "layout(lwb3wdr)")
|
||||
(slide_image 0 0 breite hoehe "layout(lwb3bdr)")
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(progn
|
||||
(if (= m_ANZ "ANZ_1") ; mit 2 Elementen
|
||||
(progn
|
||||
(if (= m_RI "RI_L")
|
||||
(progn
|
||||
(if (= m_WB "WB_W")
|
||||
(slide_image 0 0 breite hoehe "layout(lwb2wl)")
|
||||
(slide_image 0 0 breite hoehe "layout(lwb2bl)")
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (= m_RI "RI_R")
|
||||
(progn
|
||||
(if (= m_WB "WB_W")
|
||||
(slide_image 0 0 breite hoehe "layout(lwb2wr)")
|
||||
(slide_image 0 0 breite hoehe "layout(lwb2br)")
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(progn
|
||||
(if (= m_RI "RI_L")
|
||||
(progn
|
||||
(if (= m_WB "WB_W")
|
||||
(slide_image 0 0 breite hoehe "layout(lwb3wl)")
|
||||
(slide_image 0 0 breite hoehe "layout(lwb3bl)")
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (= m_RI "RI_R")
|
||||
(progn
|
||||
(if (= m_WB "WB_W")
|
||||
(slide_image 0 0 breite hoehe "layout(lwb3wr)")
|
||||
(slide_image 0 0 breite hoehe "layout(lwb3br)")
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(end_image)
|
||||
)
|
||||
|
||||
(defun zeig_dia()
|
||||
(setq m_ANZ (get_tile "ANZ_"))
|
||||
(setq m_RI (get_tile "RI"))
|
||||
(setq m_WB (get_tile "WB"))
|
||||
(setq m_BEMASSEN (get_tile "BEMASSEN"))
|
||||
(SetDia)
|
||||
)
|
||||
|
||||
(defun SetPara ()
|
||||
(setq m_ANZ (get_tile "ANZ_")
|
||||
m_RI (get_tile "RI")
|
||||
m_WB (get_tile "WB")
|
||||
m_BEMASSEN (get_tile "BEMASSEN")
|
||||
)
|
||||
(if (= m_ANZ "ANZ_1")
|
||||
(setq ANZAHL 2)
|
||||
)
|
||||
(if (= m_ANZ "ANZ_2")
|
||||
(setq ANZAHL 3)
|
||||
)
|
||||
(if (= m_RI "RI_L")
|
||||
(setq RICHTUNG "L")
|
||||
)
|
||||
(if (= m_RI "RI_R")
|
||||
(setq RICHTUNG "R")
|
||||
)
|
||||
(if (= m_WB "WB_W")
|
||||
(setq ABSCHLUSS "W")
|
||||
)
|
||||
(if (= m_WB "WB_B")
|
||||
(setq ABSCHLUSS "B")
|
||||
)
|
||||
)
|
||||
|
||||
(defun datain ()
|
||||
(setq auswahl-satz nil)
|
||||
(setq MUFFE-ZAEHLER 0)
|
||||
(setq ALTFANG (getvar "osmode"))
|
||||
;------------------------
|
||||
;>>>> Eingabeteil <<<<<<<
|
||||
;------------------------
|
||||
(initget (+ 1 2 4))
|
||||
(setq PT0 (getpoint "\nAnfangspunkt antippen: "))
|
||||
(setq PT1 (getpoint PT0 "\n1. Schnittpunkt antippen: "))
|
||||
(setq PT2 (getpoint PT1 "\n2. Schnittpunkt antippen: "))
|
||||
(bl-name PT0) ;--> Block-Name definieren -> R�ckgabe: element-name
|
||||
(if (= ANZAHL 3)
|
||||
(setq PT3 (getpoint PT2 "\n3. Schnittpunkt antippen: "))
|
||||
)
|
||||
|
||||
(setvar "osmode" 0)
|
||||
|
||||
(setq WINK_RAD (angle PT0 PT2))
|
||||
(setq WINK_GRA (/ (* WINK_RAD 180) pi))
|
||||
;------------------;
|
||||
;Abst„nde berechnen;
|
||||
;------------------;
|
||||
(setq L1 (* (fix (/ (+ (distance PT0 PT1) 1) 2)) 2))
|
||||
(setq L2 (* (fix (/ (+ (distance PT1 PT2) 1)2)) 2))
|
||||
(if (= ANZAHL 3)
|
||||
(setq L3 (* (fix (/ (+ (distance PT2 PT3) 1) 2)) 2))
|
||||
)
|
||||
(if (or (< L1 650) (< L2 650) (> L1 1800) (> L2 1800))
|
||||
(progn
|
||||
(alert "Abstand zu groá oder zu klein ...")
|
||||
(setvar "osmode" ALTFANG)
|
||||
(exit)
|
||||
)
|
||||
)
|
||||
(cond (= ANZAHL 3)
|
||||
(if (or (< L3 650) (> L3 1800))
|
||||
(progn
|
||||
(alert "Abstand zu groá oder zu klein !...")
|
||||
(setvar "osmode" ALTFANG)
|
||||
(exit)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (= ANZAHL 3)
|
||||
(princ (strcat "\nL1= " (rtos L1) " | L2= " (rtos L2) " | L3= "
|
||||
(rtos L3) "\n"))
|
||||
(princ (strcat "\nL1= " (rtos L1) " | L2= " (rtos L2) "\n"))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defun geometrie()
|
||||
|
||||
;--------------------------------------------------------
|
||||
;<<<<< Konstruktionspunkte definieren >>>>>>>
|
||||
;--------------------------------------------------------
|
||||
(if (= RICHTUNG "L")
|
||||
(progn
|
||||
(setq PT12 (polar PT1 (+ WINK_RAD (/ pi 2)) 800))
|
||||
(setq PT22 (polar PT2 (+ WINK_RAD (/ pi 2)) 800))
|
||||
(if (= ANZAHL 3)
|
||||
(setq PT32 (polar PT3 (+ WINK_RAD (/ pi 2)) 800))
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (= RICHTUNG "R")
|
||||
(progn
|
||||
(setq PT12 (polar PT1 (- WINK_RAD (/ pi 2)) 800))
|
||||
(setq PT22 (polar PT2 (- WINK_RAD (/ pi 2)) 800))
|
||||
(if (= ANZAHL 3)
|
||||
(setq PT32 (polar PT3 (- WINK_RAD (/ pi 2)) 800))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;-----------------
|
||||
; Muffen dazugeben
|
||||
;------------------
|
||||
(command "_layer" "_m" "L-6" "_c" "6" "" "")
|
||||
|
||||
(command "_insert" (strcat lw "/acadsst/layout/muffe") PT12 "1" "1" (rtos WINK_GRA))
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "825002016" "MUFFE ANGESCHWEISST (BG)" "" "")
|
||||
(setq auswahl-satz (ssget "_L"))
|
||||
(setq MUFFE-ZAEHLER (+ MUFFE-ZAEHLER 1))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/muffe") PT22 "" "" (rtos WINK_GRA))
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "825002016" "MUFFE ANGESCHWEISST (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(setq MUFFE-ZAEHLER (+ MUFFE-ZAEHLER 1))
|
||||
(if (= ANZAHL 3)
|
||||
(progn
|
||||
(command "_insert" (strcat lw "/acadsst/layout/muffe") PT32 "" "" (rtos WINK_GRA))
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "825002016" "MUFFE ANGESCHWEISST (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(setq MUFFE-ZAEHLER (+ MUFFE-ZAEHLER 1))
|
||||
)
|
||||
)
|
||||
|
||||
(if (= ABSCHLUSS "W") ; ZIEREREI-Muffen setzen
|
||||
(progn
|
||||
(command "_layer" "_m" "L-7" "_c" "7" "" "")
|
||||
(if (= ANZAHL 3)
|
||||
(progn
|
||||
(command "_insert" (strcat lw "/acadsst/layout/muffe") PT3 "" "" (rtos WINK_GRA))
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "825004017" "DREIKANTLASCHE" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
(progn
|
||||
(command "_insert" (strcat lw "/acadsst/layout/muffe") PT2 "" "" (rtos WINK_GRA))
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "825004017" "DREIKANTLASCHE" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(command "_layer" "_m" "L-3" "_c" "3" "" "")
|
||||
|
||||
;-----------------------------------------
|
||||
; Abst„nde analysieren und Elemente setzen
|
||||
;-----------------------------------------
|
||||
;***********************
|
||||
; 1. Abstand bearbeiten
|
||||
;***********************
|
||||
|
||||
(cond
|
||||
((< L1 800)
|
||||
(if (= RICHTUNG "L")
|
||||
(command "_insert" (strcat lw "/acadsst/layout/w90650l7") PT1 "" "" (rtos WINK_GRA))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/w90650r7") PT1 "" "" (rtos WINK_GRA))
|
||||
)
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "" " (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(if (> L1 650)
|
||||
(progn
|
||||
(setq PT01 (polar PT0 WINK_RAD (- L1 650)))
|
||||
(command "_line" PT0 PT01 "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
))
|
||||
|
||||
((and (>= L1 800) (<= L1 1800))
|
||||
(if (= RICHTUNG "L")
|
||||
(command "_insert" (strcat lw "/acadsst/layout/w90650l8") PT1 "" "" (rtos WINK_GRA))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/w90650r8") PT1 "" "" (rtos WINK_GRA))
|
||||
)
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "" " (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(if (> L1 800)
|
||||
(progn
|
||||
(setq PT01 (polar PT0 WINK_RAD (- L1 800)))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT01 "0.5" "0.5" (rtos WINK_GRA))
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/stbg") PT0 (- L1 800) "1" (rtos WINK_GRA))
|
||||
(attribute-aendern "0" "0" "" (rtos (- L1 800)) "" block-kennung ""
|
||||
(strcat " L=" (rtos (- L1 800))) "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
))
|
||||
) ; endcond
|
||||
|
||||
;***********************
|
||||
; 2. Abstand bearbeiten
|
||||
;***********************
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT1 "0.5" "0.5" (rtos WINK_GRA))
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(cond
|
||||
((< L2 800)
|
||||
(if (= RICHTUNG "L")
|
||||
(progn
|
||||
(if (= ABSCHLUSS "B")
|
||||
(progn
|
||||
(if (= ANZAHL 3)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/w90650l7") PT2 "" "" (rtos WINK_GRA))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s90650l8") PT2 "" "" (rtos WINK_GRA))
|
||||
)
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
)
|
||||
(if (= ABSCHLUSS "W")
|
||||
(progn
|
||||
(command "_insert" (strcat lw "/acadsst/layout/w90650l7") PT2 "" "" (rtos WINK_GRA))
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (= RICHTUNG "R")
|
||||
(progn
|
||||
(if (= ABSCHLUSS "B")
|
||||
(progn
|
||||
(if (= ANZAHL 3)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/w90650r7") PT2 "" "" (rtos WINK_GRA))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s90650r8") PT2 "" "" (rtos WINK_GRA))
|
||||
)
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
)
|
||||
(if (= ABSCHLUSS "W")
|
||||
(progn
|
||||
(command "_insert" (strcat lw "/acadsst/layout/w90650r7") PT2 "" "" (rtos WINK_GRA))
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "" " (BG)" "" "")
|
||||
(if (> L2 650)
|
||||
(progn
|
||||
(setq PT11 (polar PT1 WINK_RAD (- L2 650)))
|
||||
(command "_line" PT1 PT11 "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
))
|
||||
|
||||
((and (>= L2 800) (<= L2 1800))
|
||||
(if (= RICHTUNG "L")
|
||||
(progn
|
||||
(if (= ABSCHLUSS "B")
|
||||
(progn
|
||||
(if (= ANZAHL 3)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/w90650l8") PT2 "" "" (rtos WINK_GRA))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s90650l8") PT2 "" "" (rtos WINK_GRA))
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (= ABSCHLUSS "W")
|
||||
(progn
|
||||
(command "_insert" (strcat lw "/acadsst/layout/w90650l8") PT2 "" "" (rtos WINK_GRA))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (= RICHTUNG "R")
|
||||
(progn
|
||||
(if (= ABSCHLUSS "B")
|
||||
(progn
|
||||
(if (= ANZAHL 3)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/w90650r8") PT2 "" "" (rtos WINK_GRA))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s90650r8") PT2 "" "" (rtos WINK_GRA))
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (= ABSCHLUSS "W")
|
||||
(progn
|
||||
(command "_insert" (strcat lw "/acadsst/layout/w90650r8") PT2 "" "" (rtos WINK_GRA))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "" " (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(if (> L2 800)
|
||||
(progn
|
||||
(setq PT11 (polar PT1 WINK_RAD (- L2 800)))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT11 "0.5" "0.5" (rtos WINK_GRA))
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/stbg") PT1 (- L2 800) "1" (rtos WINK_GRA))
|
||||
(attribute-aendern "0" "0" "" (rtos (- L2 800)) "" block-kennung ""
|
||||
(strcat " L=" (rtos (- L2 800))) "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
))
|
||||
) ; endcond
|
||||
;***********************
|
||||
; 3. Abstand bearbeiten
|
||||
;***********************
|
||||
(if (= ANZAHL 3)
|
||||
(progn
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT2 "0.5" "0.5" (rtos WINK_GRA))
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(cond
|
||||
((< L3 800)
|
||||
(if (= RICHTUNG "L")
|
||||
(progn
|
||||
(if (= ABSCHLUSS "W")
|
||||
(command "_insert" (strcat lw "/acadsst/layout/w90650l7") PT3 "" "" (rtos WINK_GRA))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s90650l8") PT3 "" "" (rtos WINK_GRA))
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (= RICHTUNG "R")
|
||||
(progn
|
||||
(if (= ABSCHLUSS "W")
|
||||
(command "_insert" (strcat lw "/acadsst/layout/w90650r7") PT3 "" "" (rtos WINK_GRA))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s90650r8") PT3 "" "" (rtos WINK_GRA))
|
||||
)
|
||||
)
|
||||
)
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "" " (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(if (> L3 650)
|
||||
(progn
|
||||
(setq PT21 (polar PT2 WINK_RAD (- L3 650)))
|
||||
(command "_line" PT2 PT21 "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
))
|
||||
|
||||
((and (>= L3 800) (<= L3 1800))
|
||||
(if (= RICHTUNG "L")
|
||||
(progn
|
||||
(if (= ABSCHLUSS "W")
|
||||
(command "_insert" (strcat lw "/acadsst/layout/w90650l8") PT3 "" "" (rtos WINK_GRA))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s90650l8") PT3 "" "" (rtos WINK_GRA))
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (= RICHTUNG "R")
|
||||
(progn
|
||||
(if (= ABSCHLUSS "W")
|
||||
(command "_insert" (strcat lw "/acadsst/layout/w90650r8") PT3 "" "" (rtos WINK_GRA))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s90650r8") PT3 "" "" (rtos WINK_GRA))
|
||||
)
|
||||
)
|
||||
)
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "" " (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(if (> L3 800)
|
||||
(progn
|
||||
(setq PT21 (polar PT2 WINK_RAD (- L3 800)))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT21 "0.5" "0.5" (rtos WINK_GRA))
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/stbg") PT2 (- L3 800) "1" (rtos WINK_GRA))
|
||||
(attribute-aendern "0" "0" "" (rtos (- L3 800)) "" block-kennung ""
|
||||
(strcat " L=" (rtos (- L3 800))) "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
))
|
||||
) ; endcond
|
||||
|
||||
) ;---endprogn
|
||||
|
||||
) ;--- endif
|
||||
)
|
||||
|
||||
(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_BEM (- WINK_RAD (/ pi 2)))
|
||||
(setq WINK_BEM (+ WINK_RAD (/ pi 2)))
|
||||
)
|
||||
(command "_align" PT0 PT1 (polar PT0 WINK_BEM 200) "")
|
||||
(command "_con" PT2 "")
|
||||
(if (= ANZAHL 3)
|
||||
(progn
|
||||
(command "_con" PT3 "")
|
||||
(command "_align" PT0 PT3 (polar PT0 WINK_BEM 400) "")
|
||||
)
|
||||
(command "_align" PT0 PT2 (polar PT0 WINK_BEM 400) "" )
|
||||
)
|
||||
(command "_exit")
|
||||
(command "_layer" "_m" "L-3" "_c" "3" "" "")
|
||||
)
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
(defun c:l_bg_wb ( / anzahl richtung abschluss wink_rad wink_gra pt0
|
||||
pt1 pt2 pt3 l1 l2 l3 pt12 pt13 pt22 pt32)
|
||||
(setvar "limcheck" 0)
|
||||
(prompt "**** Group from 2 or 3 switches - left or right *******")
|
||||
(prompt "")
|
||||
(if (null m_ANZ) (setq m_ANZ "ANZ_1")) ; Anzahl Elemente
|
||||
(if (null m_RI) (setq m_RI "RI_L")) ; Links
|
||||
(if (null m_WB) (setq m_WB "WB_W")) ; Weiche
|
||||
(if (null m_BEMASSEN) (setq m_BEMASSEN "1")) ; mit Bemassung
|
||||
(dbox)
|
||||
(datain)
|
||||
(geometrie)
|
||||
(mach-block PT0 "0" auswahl-satz)
|
||||
(setq auswahl-satz nil)
|
||||
(if (= ABSCHLUSS "W")
|
||||
(progn
|
||||
(if (= ANZAHL 3)
|
||||
(setq BEZ (strcat "** BG " (itoa ANZAHL) "W R650/90-" RICHTUNG "-" (itoa L1)
|
||||
"-" (itoa L2) "-" (itoa L3)))
|
||||
(setq BEZ (strcat "** BG "(itoa ANZAHL) "W R650/90-" RICHTUNG "-" (itoa L1)
|
||||
"-" (itoa L2)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (= ABSCHLUSS "B")
|
||||
(progn
|
||||
(if (= ANZAHL 3)
|
||||
(setq BEZ (strcat "** BG 2W+STBL R650/90-" RICHTUNG "-" (itoa L1)
|
||||
"-" (itoa L2) "-" (itoa L3)))
|
||||
(setq BEZ (strcat "** BG 1W+STBL R650/90-" RICHTUNG "-" (itoa L1)
|
||||
"-" (itoa L2)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(setq BEZ (strcat BEZ " + " (rtos MUFFE-ZAEHLER) " MUFFE(N)"))
|
||||
(attribute-aendern "0" "2" "1" "" "" block-kennung "111111111" (strcat BEZ " [BG1]") "" "") ; in SSTBASE.LSP
|
||||
(if (= m_BEMASSEN "1")
|
||||
(bemassung)
|
||||
)
|
||||
(setvar "osmode" ALTFANG)
|
||||
)
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
l_bg_wec : dialog {
|
||||
label = "SCHONENBERGER Systeme GmbH";
|
||||
: text {
|
||||
label = "Wechsel";
|
||||
}
|
||||
: row {
|
||||
: boxed_radio_column {
|
||||
label = "Direction";
|
||||
key = "RI";
|
||||
: radio_button {
|
||||
label = "Left";
|
||||
key = "RI_L";
|
||||
}
|
||||
: radio_button {
|
||||
label = "Right";
|
||||
key = "RI_R";
|
||||
}
|
||||
}
|
||||
: image {
|
||||
height = 5;
|
||||
width = 5;
|
||||
color = 0;
|
||||
key = "anzeige";
|
||||
}
|
||||
}
|
||||
: row {
|
||||
: boxed_radio_column {
|
||||
label = "1st component";
|
||||
key = "WB1";
|
||||
: radio_button {
|
||||
label = "Switch";
|
||||
key = "WB1_W";
|
||||
}
|
||||
: radio_button {
|
||||
label = "Curve(STB)";
|
||||
key = "WB1_B";
|
||||
}
|
||||
}
|
||||
: boxed_radio_column {
|
||||
label = "2nd component";
|
||||
key = "WB2";
|
||||
: radio_button {
|
||||
label = "Switch";
|
||||
key = "WB2_W";
|
||||
}
|
||||
: radio_button {
|
||||
label = "Curve(STB)";
|
||||
key = "WB2_B";
|
||||
}
|
||||
}
|
||||
}
|
||||
: row {
|
||||
: toggle {
|
||||
label = "Dimensioning";
|
||||
mnemonic = "D";
|
||||
key = "BEMASSEN";
|
||||
}
|
||||
}
|
||||
ok_cancel;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,304 @@
|
||||
;------------------------------------------------------------------------;
|
||||
; Wechsel - links oder rechts ;
|
||||
;------------------------------------------------------------------------;
|
||||
; AW 10.05.93 ;
|
||||
;------------------------------------------------------------------------;
|
||||
|
||||
(defun Dbox (/ Dat)
|
||||
(setq Dat (load_dialog (strcat lw "/acadsst/layout/l_bg_wec.DCL")))
|
||||
(if (not (new_dialog "l_bg_wec" Dat)) (exit))
|
||||
(set_tile "RI" m_RI)
|
||||
(set_tile "WB1" m_WB1)
|
||||
(set_tile "WB2" m_WB2)
|
||||
(set_tile "BEMASSEN" m_BEMASSEN)
|
||||
(setq breite (dimx_tile "anzeige"))
|
||||
(setq hoehe (dimy_tile "anzeige"))
|
||||
(start_image "anzeige")
|
||||
(slide_image 0 0 breite hoehe "layout(wewwdr)")
|
||||
(end_image)
|
||||
(action_tile "accept" "(SetPara) (done_dialog)")
|
||||
(action_tile "cancel" "(exit) (done_dialog)")
|
||||
(start_dialog)
|
||||
(unload_dialog Dat)
|
||||
)
|
||||
|
||||
(defun SetPara ()
|
||||
(setq m_RI (get_tile "RI")
|
||||
m_WB1 (get_tile "WB1")
|
||||
m_WB2 (get_tile "WB2")
|
||||
m_BEMASSEN (get_tile "BEMASSEN")
|
||||
)
|
||||
(if (= m_RI "RI_L")
|
||||
(setq RICHTUNG "L")
|
||||
)
|
||||
(if (= m_RI "RI_R")
|
||||
(setq RICHTUNG "R")
|
||||
)
|
||||
(if (= m_WB1 "WB1_W")
|
||||
(setq ANFANG "W1")
|
||||
)
|
||||
(if (= m_WB1 "WB1_B")
|
||||
(setq ANFANG "B1")
|
||||
)
|
||||
(if (= m_WB2 "WB2_W")
|
||||
(setq ABSCHLUSS "W2")
|
||||
)
|
||||
(if (= m_WB2 "WB2_B")
|
||||
(setq ABSCHLUSS "B2")
|
||||
)
|
||||
)
|
||||
|
||||
(defun datain ()
|
||||
(setq auswahl-satz nil)
|
||||
(setq MUFFE-ZAEHLER 0)
|
||||
(setq ALTFANG (getvar "osmode"))
|
||||
;------------------------
|
||||
;>>>> Eingabeteil <<<<<<<
|
||||
;------------------------
|
||||
(initget (+ 1 2 4))
|
||||
(setq PT0 (getpoint "\n1. Schnittpunkt antippen: "))
|
||||
(setq PT01 (getpoint PT0 "\n2. Schnittpunkt antippen: "))
|
||||
(bl-name PT0) ;--> Block-Name definieren -> R�ckgabe: element-name
|
||||
(setvar "osmode" 0)
|
||||
|
||||
(if (= RICHTUNG "L")
|
||||
(setq WINK_RAD (- (angle PT0 PT01) (/ pi 2)))
|
||||
(setq WINK_RAD (+ (angle PT0 PT01) (/ pi 2)))
|
||||
)
|
||||
(setq WINK_GRA (/ (* WINK_RAD 180) pi))
|
||||
|
||||
;------------------;
|
||||
;Abst„nde berechnen;
|
||||
;------------------;
|
||||
(setq L1 (* (fix (/ (+ (distance PT0 PT01) 1) 2)) 2))
|
||||
(if (or (< L1 700) (> L1 1800))
|
||||
(progn
|
||||
(alert "Abstand zu groá oder zu klein ...")
|
||||
(setvar "osmode" ALTFANG)
|
||||
(exit)
|
||||
)
|
||||
)
|
||||
(princ (strcat "\nL= " (rtos L1) "\n"))
|
||||
)
|
||||
|
||||
(defun geometrie()
|
||||
;--------------------------------------------------------
|
||||
;<<<<< Konstruktionspunkte definieren >>>>>>>
|
||||
;--------------------------------------------------------
|
||||
(if (= RICHTUNG "L")
|
||||
(setq PT1 (polar PT0 (+ WINK_RAD (/ pi 4)) (* (sqrt 2) L1)))
|
||||
(setq PT1 (polar PT0 (- WINK_RAD (/ pi 4)) (* (sqrt 2) L1)))
|
||||
)
|
||||
(setq PT3 (polar PT0 (- WINK_RAD pi) 425)
|
||||
PT4 (polar PT1 WINK_RAD 425)
|
||||
PT5 (polar PT0 WINK_RAD 375)
|
||||
PT8 (polar PT1 (- WINK_RAD pi) 375)
|
||||
PT9 (polar PT1 (- WINK_RAD pi) (+ L1 425))
|
||||
PT10 (polar PT0 WINK_RAD (+ L1 425))
|
||||
)
|
||||
|
||||
;-----------------
|
||||
; Muffen dazugeben
|
||||
;------------------
|
||||
(command "_layer" "_m" "L-6" "_c" "6" "" "")
|
||||
(command "_insert" (strcat lw "/acadsst/layout/muffe") PT3 "" "" (rtos WINK_GRA))
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "825002016" "MUFFE ANGESCHWEISST (BG)" "" "")
|
||||
(setq auswahl-satz (ssget "_L"))
|
||||
(setq MUFFE-ZAEHLER (+ MUFFE-ZAEHLER 1))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/muffe") PT4 "" "" (rtos WINK_GRA))
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "825002016" "MUFFE ANGESCHWEISST (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(setq MUFFE-ZAEHLER (+ MUFFE-ZAEHLER 1))
|
||||
(if (= ANFANG "W1")
|
||||
(progn
|
||||
(command "_layer" "_m" "L-3" "_c" "3" "" "")
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT5 "0.5" "0.5" (rtos WINK_GRA))
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/stbg") PT5 (+ L1 50) "1" (rtos WINK_GRA))
|
||||
(attribute-aendern "0" "0" "" (rtos (+ L1 50)) "" block-kennung "" (strcat " L=" (rtos (+ L1 50))) "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(command "_layer" "_m" "L-6" "_c" "6" "" "")
|
||||
(command "_insert" (strcat lw "/acadsst/layout/muffe") PT10 "" "" (rtos WINK_GRA))
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "825002016" "MUFFE ANGESCHWEISST (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(setq MUFFE-ZAEHLER (+ MUFFE-ZAEHLER 1))
|
||||
)
|
||||
)
|
||||
(if (= ABSCHLUSS "W2")
|
||||
(progn
|
||||
(command "_layer" "_m" "L-3" "_c" "3" "" "")
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT8 "0.5" "0.5" (rtos WINK_GRA))
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/stbg") PT8 (+ L1 50) "1" (rtos (+ WINK_GRA 180)))
|
||||
(attribute-aendern "0" "0" "" (rtos (+ L1 50)) "" block-kennung "" (strcat " L=" (rtos (+ L1 50))) "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(command "_layer" "_m" "L-6" "_c" "6" "" "")
|
||||
(command "_insert" (strcat lw "/acadsst/layout/muffe") PT9 "" "" (rtos WINK_GRA))
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "825002016" "MUFFE ANGESCHWEISST (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(setq MUFFE-ZAEHLER (+ MUFFE-ZAEHLER 1))
|
||||
)
|
||||
)
|
||||
|
||||
(command "_layer" "_m" "L-3" "_c" "3" "" "")
|
||||
|
||||
;-----------------------------------------
|
||||
; Abstand analysieren und Elemente setzen
|
||||
;-----------------------------------------
|
||||
(cond
|
||||
((< L1 800)
|
||||
(if (and (= ANFANG "W1") (= RICHTUNG "L"))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/w45650l3") PT0 "" "" (rtos WINK_GRA))
|
||||
)
|
||||
(if (and (= ANFANG "B1") (= RICHTUNG "L"))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s45650l3") PT0 "" "" (rtos WINK_GRA))
|
||||
)
|
||||
(if (and (= ANFANG "W1") (= RICHTUNG "R"))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/w45650r3") PT0 "" "" (rtos WINK_GRA))
|
||||
)
|
||||
(if (and (= ANFANG "B1") (= RICHTUNG "R"))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s45650r3") PT0 "" "" (rtos WINK_GRA))
|
||||
)
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "" " (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(if (= RICHTUNG "L")
|
||||
(setq PT6 (polar PT0 (+ WINK_RAD (/ pi 4)) (* (sqrt 2) 350))
|
||||
PT7 (polar PT1 (+ WINK_RAD (* 5 (/ pi 4))) (* (sqrt 2) 350))
|
||||
)
|
||||
)
|
||||
(if (= RICHTUNG "R")
|
||||
(setq PT6 (polar PT0 (- WINK_RAD (/ pi 4)) (* (sqrt 2) 350))
|
||||
PT7 (polar PT1 (- WINK_RAD pi ) (* (sqrt 2) 350))
|
||||
)
|
||||
)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT6 "0.5" "0.5" (rtos WINK_GRA))
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(if (> L1 700)
|
||||
(progn
|
||||
(command "_line" PT6 PT7 "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
)
|
||||
(if (and (= ABSCHLUSS "W2") (= RICHTUNG "L"))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/w45650l3") PT1 "" "" (rtos (+ WINK_GRA 180)))
|
||||
)
|
||||
(if (and (= ABSCHLUSS "B2") (= RICHTUNG "L"))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s45650l3") PT1 "" "" (rtos (+ WINK_GRA 180)))
|
||||
)
|
||||
(if (and (= ABSCHLUSS "W2") (= RICHTUNG "R"))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/w45650r3") PT1 "" "" (rtos (+ WINK_GRA 180)))
|
||||
)
|
||||
(if (and (= ABSCHLUSS "B2") (= RICHTUNG "R"))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s45650r3") PT1 "" "" (rtos (+ WINK_GRA 180)))
|
||||
)
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "" " (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
|
||||
((and (>= L1 800) (<= L1 1800))
|
||||
(if (and (= ANFANG "W1") (= RICHTUNG "L"))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/w45650l4") PT0 "" "" (rtos WINK_GRA))
|
||||
)
|
||||
(if (and (= ANFANG "B1") (= RICHTUNG "L"))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s45650l4") PT0 "" "" (rtos WINK_GRA))
|
||||
)
|
||||
(if (and (= ANFANG "W1") (= RICHTUNG "R"))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/w45650r4") PT0 "" "" (rtos WINK_GRA))
|
||||
)
|
||||
(if (and (= ANFANG "B1") (= RICHTUNG "R"))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s45650r4") PT0 "" "" (rtos WINK_GRA))
|
||||
)
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "" " (BG)" "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(if (= RICHTUNG "L")
|
||||
(setq PT6 (polar PT0 (+ WINK_RAD (/ pi 4)) (* (sqrt 2) 400))
|
||||
PT7 (polar PT1 (+ WINK_RAD (* 5 (/ pi 4))) (* (sqrt 2) 400))
|
||||
)
|
||||
)
|
||||
(if (= RICHTUNG "R")
|
||||
(setq PT6 (polar PT0 (- WINK_RAD (/ pi 4)) (* (sqrt 2) 400))
|
||||
PT7 (polar PT1 (- WINK_RAD (* 5 (/ pi 4))) (* (sqrt 2) 400))
|
||||
)
|
||||
)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT6 "0.5" "0.5" (rtos WINK_GRA))
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(if (> L1 800)
|
||||
(progn
|
||||
(command "_insert" (strcat lw "/acadsst/layout/verbind") PT7 "0.5" "0.5" (rtos WINK_GRA))
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
(if (= RICHTUNG "L")
|
||||
(command "_insert" (strcat lw "/acadsst/layout/stbg") PT6 (- (fix (sqrt (* (expt L1 2) 2))) 1130) "1" (rtos (+ WINK_GRA 45)))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/stbg") PT6 (- (fix (sqrt (* (expt L1 2) 2))) 1130) "1" (rtos (+ WINK_GRA 315)))
|
||||
)
|
||||
(attribute-aendern "0" "0" "" (itoa (- (fix (sqrt (* (expt L1 2) 2))) 1130)) "" block-kennung "" (strcat " L=" (itoa (- (fix (sqrt (* (expt L1 2) 2))) 1130))) "" "")
|
||||
(ssadd (entlast) auswahl-satz)
|
||||
)
|
||||
)
|
||||
(if (and (= ABSCHLUSS "W2") (= RICHTUNG "L"))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/w45650l4") PT1 "" "" (rtos (+ WINK_GRA 180)))
|
||||
)
|
||||
(if (and (= ABSCHLUSS "B2") (= RICHTUNG "L"))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s45650l4") PT1 "" "" (rtos (+ WINK_GRA 180)))
|
||||
)
|
||||
(if (and (= ABSCHLUSS "W2") (= RICHTUNG "R"))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/w45650r4") PT1 "" "" (rtos (+ WINK_GRA 180)))
|
||||
)
|
||||
(if (and (= ABSCHLUSS "B2") (= RICHTUNG "R"))
|
||||
(command "_insert" (strcat lw "/acadsst/layout/s45650r4") PT1 "" "" (rtos (+ WINK_GRA 180)))
|
||||
)
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "" " (BG)" "" "")
|
||||
(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_BEM (- WINK_RAD (/ pi 2)))
|
||||
(setq WINK_BEM (+ WINK_RAD (/ pi 2)))
|
||||
)
|
||||
(setvar "osmode" 0)
|
||||
(command "_align" (polar PT0 (+ WINK_RAD pi) 425) (polar PT0 WINK_RAD (+ L1 425)) (polar PT0 WINK_BEM 200) "")
|
||||
(command "_exit")
|
||||
(command "_layer" "_m" "L-3" "_c" "3" "" "")
|
||||
)
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
(defun c:l_bg_wec ()
|
||||
(setvar "limcheck" 0)
|
||||
(prompt "**** Wechsel aus W und/oder STBL - links oder rechts *******")
|
||||
(prompt "")
|
||||
(if (null m_RI) (setq m_RI "RI_L")) ; Links
|
||||
(if (null m_WB1) (setq m_WB1 "WB1_W")) ; Weiche o. Bogen
|
||||
(if (null m_WB2) (setq m_WB2 "WB2_B")) ; Weiche o. Bogen
|
||||
(if (null m_BEMASSEN) (setq m_BEMASSEN "1")) ; mit Bemaáung
|
||||
(dbox)
|
||||
(datain)
|
||||
(geometrie)
|
||||
(mach-block PT0 "0" auswahl-satz)
|
||||
(setq auswahl-satz nil)
|
||||
(if (= ANFANG "W1")
|
||||
(setq BEZ1 "** BG WECHSEL W/")
|
||||
(setq BEZ1 "** BG WECHSEL STBL/")
|
||||
)
|
||||
(if (= ABSCHLUSS "W2")
|
||||
(setq BEZ2 (strcat "W R650/45-" RICHTUNG "-" (itoa L1)))
|
||||
(setq BEZ2 (strcat "STBL R650/45-" RICHTUNG "-" (itoa L1)))
|
||||
)
|
||||
(setq BEZ (strcat BEZ1 BEZ2))
|
||||
(setq BEZ (strcat BEZ " + " (rtos MUFFE-ZAEHLER) " MUFFE(N)"))
|
||||
(attribute-aendern "0" "2" "1" "" "" block-kennung "111111111" (strcat BEZ " [BG1]") "" "") ; in SSTBASE.LSP
|
||||
(if (= m_BEMASSEN "1")
|
||||
(bemassung)
|
||||
)
|
||||
(setvar "osmode" ALTFANG)
|
||||
)
|
||||
;------------------------------------------------------------------------------
|
||||
@@ -0,0 +1,66 @@
|
||||
;------------------------------------------------------------------------;
|
||||
; MUFFEN ;
|
||||
;------------------------------------------------------------------------;
|
||||
; AW 14.05.93 ;
|
||||
;------------------------------------------------------------------------;
|
||||
|
||||
(defun datain ()
|
||||
(setq ALTFANG (getvar "osmode"))
|
||||
(setvar "osmode" 33)
|
||||
(initget (+ 2 4))
|
||||
(setq ANZAHL (getint "\n(1) an-BG / (2) an-ST / (3) DRK (lose MUFFE als RESERVE bestellen!) <1>: "))
|
||||
(if (or (= nil ANZAHL ) (and (< ANZAHL 1) (> ANZAHL 3)))
|
||||
(setq ANZAHL 1)
|
||||
)
|
||||
(initget (+ 1 2 4))
|
||||
(setq PT0 (getpoint "\nPunkt antippen: "))
|
||||
(setvar "osmode" 0)
|
||||
(bl-name PT0) ;--> Block-Name definieren -> R�ckgabe: element-name
|
||||
)
|
||||
|
||||
(defun geometrie()
|
||||
(if (= ANZAHL 1)
|
||||
(progn
|
||||
(command "_layer" "_m" "L-6" "_c" "6" "" "")
|
||||
(command "_insert" (strcat lw "/acadsst/layout/muffe")
|
||||
PT0 "" "" "0")
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "825002016"
|
||||
"MUFFE ANGESCHWEISST (BG)" "" "")
|
||||
)
|
||||
)
|
||||
(if (= ANZAHL 2)
|
||||
(progn
|
||||
(command "_layer" "_m" "L-1" "_c" "1" "" "")
|
||||
(command "_insert" (strcat lw "/acadsst/layout/muffe")
|
||||
PT0 "" "" "0")
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "825002017"
|
||||
"MUFFE ANGESCHWEISST (ST)" "" "")
|
||||
)
|
||||
)
|
||||
(if (= ANZAHL 3)
|
||||
(progn
|
||||
(command "_layer" "_m" "L-7" "_c" "7" "" "")
|
||||
(command "_insert" (strcat lw "/acadsst/layout/muffe")
|
||||
PT0 "" "" "0")
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "825004017" "DREIKANTLASCHE" "" "")
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;----------------------------------------------------
|
||||
(defun c:l_muffe ( / anzahl pt0 )
|
||||
(setvar "limcheck" 0)
|
||||
(prompt "******* MUFFE / DREIKANTLASCHE *******")
|
||||
(prompt "")
|
||||
(datain)
|
||||
(geometrie)
|
||||
; (if (= ANZAHL 2)
|
||||
; (progn
|
||||
; (setq e (entsel "\nAnschweiáen an: "))
|
||||
; (setq ref (cdr (assoc 5 (entget (car e)))))
|
||||
; (suchen-aendern ref "BESCHR" " +MUFFE ANGESCHW." 1)
|
||||
; )
|
||||
; )
|
||||
(setvar "osmode" ALTFANG)
|
||||
)
|
||||
;-----------------------------------------------------
|
||||
@@ -0,0 +1,191 @@
|
||||
;------------------------------------------------------------------------;
|
||||
; ST- zeichnen ;
|
||||
; -----------------------------------------------------------------------;
|
||||
; AW 26.5.93 ;
|
||||
;------------------------------------------------------------------------;
|
||||
|
||||
(defun datain ()
|
||||
;-------------------------------------------------------
|
||||
;>>>> Eingabeteil <<<<<<<
|
||||
;-------------------------------------------------------
|
||||
(setq ALTFANG (getvar "osmode"))
|
||||
(setq AUSWAHL-SATZ nil)
|
||||
(initget (+ 1 2 4))
|
||||
(setq P1 (getpoint "\n1. Punkt antippen: "))
|
||||
(setq P2 (getpoint P1 "\n2. Punkt antippen: "))
|
||||
(setvar "osmode" 0)
|
||||
(bl-name P1) ;--> Block-Name definieren -> R�ckgabe: element-name
|
||||
)
|
||||
|
||||
(defun berechne()
|
||||
;------------------------------------------------------
|
||||
;<<<<< Berechnungen durchf�hren >>>>>>>
|
||||
;------------------------------------------------------
|
||||
; (setq LAENGE (* (fix (/ (distance P1 P2) 5)) 5))
|
||||
(setq LAENGE (fix (distance P1 P2)))
|
||||
(setq WINKEL (/ (* (angle P1 P2) 180) PI))
|
||||
(setq P3 (polar P1 (angle P1 P2) (/ LAENGE 2)))
|
||||
(if (> LAENGE 6000)
|
||||
(progn
|
||||
(alert "Abstand �ber 6000 mm !")
|
||||
(setvar "osmode" ALTFANG)
|
||||
(exit)
|
||||
)
|
||||
)
|
||||
(initget (+ 2 4))
|
||||
(setq AUSFUEHRUNG (getint "\n(1)-OHNE oder (2)-MIT Leitblech <1> : "))
|
||||
(if (or (= nil AUSFUEHRUNG) (< AUSFUEHRUNG 1) (> AUSFUEHRUNG 2))
|
||||
(setq AUSFUEHRUNG 1)
|
||||
)
|
||||
|
||||
(if (= AUSFUEHRUNG 1)
|
||||
(setq NEV "ST ")
|
||||
(setq NEV "STL ")
|
||||
)
|
||||
(initget "J N")
|
||||
(setq ANTWORT (getkword "\nMuffe am 2.Endpunkt anschweiáen ? (J/N) <N>?: "))
|
||||
(if (not ANTWORT)
|
||||
(setq ANTWORT "N")
|
||||
)
|
||||
(setq ANTWORT (strcase ANTWORT))
|
||||
;--------------------
|
||||
; Endst�cke berechnen
|
||||
;--------------------
|
||||
(setq ENDST (- LAENGE (* (fix (/ LAENGE 500)) 500)))
|
||||
(if (and (>= ENDST 0) (< ENDST 160))
|
||||
(progn
|
||||
(setq M_END1 250)
|
||||
(setq M_END2 (- (+ ENDST 500) M_END1))
|
||||
)
|
||||
)
|
||||
(if (and (>= ENDST 160) (< ENDST 330))
|
||||
(progn
|
||||
(setq M_END1 (/ ENDST 2))
|
||||
(setq M_END2 M_END1)
|
||||
)
|
||||
)
|
||||
(if (and (>= ENDST 330) (<= ENDST 500))
|
||||
(progn
|
||||
(setq M_END1 250)
|
||||
(setq M_END2 (- ENDST M_END1))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defun geometrie()
|
||||
;----------------------------------------------------------
|
||||
;<<<<<< Bl”cke einf�gen >>>>>>
|
||||
;----------------------------------------------------------
|
||||
(if (= AUSFUEHRUNG 1)
|
||||
(command "_layer" "_m" "L-2" "_c" "2" "" "")
|
||||
(command "_layer" "_m" "L-7" "_c" "7" "" "")
|
||||
)
|
||||
(command "_line" P3 P1 "")
|
||||
(setq AUSWAHL-SATZ (ssget "_L"))
|
||||
(command "_line" P3 P2 "")
|
||||
(ssadd (entlast) AUSWAHL-SATZ)
|
||||
|
||||
(if (= AUSFUEHRUNG 1)
|
||||
(progn
|
||||
;--------------------------------------
|
||||
;Artikel-Nr. abh„ngig von der L„nge ST
|
||||
;--------------------------------------
|
||||
(if (and (> LAENGE 0) (<= LAENGE 1000))
|
||||
(setq M_ARTINR "821084001")
|
||||
)
|
||||
(if (and (> LAENGE 1000) (<= LAENGE 2000))
|
||||
(setq M_ARTINR "821084002")
|
||||
)
|
||||
(if (and (> LAENGE 2000) (<= LAENGE 3000))
|
||||
(setq M_ARTINR "821084003")
|
||||
)
|
||||
(if (and (> LAENGE 3000) (<= LAENGE 4000))
|
||||
(setq M_ARTINR "821084004")
|
||||
)
|
||||
(if (and (> LAENGE 4000) (<= LAENGE 5000))
|
||||
(setq M_ARTINR "821084005")
|
||||
)
|
||||
(if (and (> LAENGE 5000) (<= LAENGE 6000))
|
||||
(setq M_ARTINR "821084006")
|
||||
)
|
||||
)
|
||||
(progn
|
||||
;----------------------------------------
|
||||
;Artikel-Nr. abh„ngig von der L„nge STL
|
||||
;----------------------------------------
|
||||
(if (and (> LAENGE 0) (<= LAENGE 1000))
|
||||
(setq M_ARTINR "821084051")
|
||||
)
|
||||
(if (and (> LAENGE 1000) (<= LAENGE 2000))
|
||||
(setq M_ARTINR "821084052")
|
||||
)
|
||||
(if (and (> LAENGE 2000) (<= LAENGE 3000))
|
||||
(setq M_ARTINR "821084053")
|
||||
)
|
||||
(if (and (> LAENGE 3000) (<= LAENGE 4000))
|
||||
(setq M_ARTINR "821084054")
|
||||
)
|
||||
(if (and (> LAENGE 4000) (<= LAENGE 5000))
|
||||
(setq M_ARTINR "821084055")
|
||||
)
|
||||
(if (and (> LAENGE 5000) (<= LAENGE 6000))
|
||||
(setq M_ARTINR "821084056")
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defun BEMASSUNG ()
|
||||
;---------
|
||||
; Bemaáung
|
||||
;---------
|
||||
(command "_layer" "_m" "L-10" "_c" "10" "" "")
|
||||
(command "_dim")
|
||||
(command "_dimtad" "0")
|
||||
(command "_dimtxt" "125")
|
||||
(command "_dimasz" "40")
|
||||
(command "_align" P1 P2 (polar P1 (- (angle P1 P2) (/ pi 2)) 200) (itoa LAENGE))
|
||||
(command "_exit")
|
||||
(command "_layer" "_m" "L-2" "_c" "2" "" "")
|
||||
)
|
||||
|
||||
;-----------------------------------------------------------------
|
||||
(defun c:schraub ( / P1 P2 LAENGE WINKEL M_ARTINR ENDST M_END1 M_END2
|
||||
AUSFUEHRUNG)
|
||||
(setvar "limcheck" 0)
|
||||
(prompt "******* ST / STL (Schraubtr„ger OHNE oder MIT Leitblech) *******")
|
||||
(prompt "")
|
||||
(datain)
|
||||
(berechne)
|
||||
(geometrie)
|
||||
|
||||
(mach-block P3 "0" AUSWAHL-SATZ)
|
||||
(if (= ANTWORT "J")
|
||||
(attribute-aendern "0" "2" "1" (itoa LAENGE) (strcat (itoa M_END1) "-" (itoa M_END2))
|
||||
block-kennung M_ARTINR (strcat NEV "L= " (itoa LAENGE) " + 1 MUFFE") "" "")
|
||||
(attribute-aendern "0" "2" "1" (itoa LAENGE) (strcat (itoa M_END1) "-" (itoa M_END2))
|
||||
block-kennung M_ARTINR (strcat NEV "L= " (itoa LAENGE)) "" "")
|
||||
)
|
||||
(setq P3 (polar P1 (+ (angle P1 P2) (/ pi 6)) 100))
|
||||
(command "_text" P3 "100" WINKEL (strcat NEV "L=" (itoa LAENGE)))
|
||||
; (bemassung)
|
||||
(if (= ANTWORT "J")
|
||||
(progn
|
||||
(command "_layer" "_m" "L-1" "_c" "1" "" "")
|
||||
(command "_insert" (strcat lw "/acadsst/layout/muffe")
|
||||
P2 "" "" (rtos WINKEL))
|
||||
(attribute-aendern "0" "0" "" "" "" block-kennung "825002017"
|
||||
"MUFFE ANGESCHWEISST (ST)" "" "")
|
||||
(if (= AUSFUEHRUNG 1)
|
||||
(command "_layer" "_m" "L-2" "_c" "2" "" "")
|
||||
(command "_layer" "_m" "L-7" "_c" "7" "" "")
|
||||
)
|
||||
)
|
||||
)
|
||||
(setq AUSWAHL-SATZ nil)
|
||||
(setvar "osmode" ALTFANG)
|
||||
)
|
||||
;------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
;------------------------------------------------------------------------;
|
||||
; ST- zeichnen ;
|
||||
; - Block \prog\acad\layout\ST.DWG setzen und den Gegebenheiten ;
|
||||
; anpassen. ;
|
||||
; - Anschlieáend m�ssen die Atribute ge„ndert werden ;
|
||||
; -----------------------------------------------------------------------;
|
||||
; AW 02.4.93 ;
|
||||
;------------------------------------------------------------------------;
|
||||
|
||||
(defun datain ()
|
||||
;-------------------------------------------------------
|
||||
;>>>> Eingabeteil <<<<<<<
|
||||
;-------------------------------------------------------
|
||||
(setq ALTFANG (getvar "osmode"))
|
||||
(setq P1 (getpoint "\n1. Punkt antippen: "))
|
||||
(setq P2 (getpoint P1 "\n2. Punkt antippen: "))
|
||||
(setvar "osmode" 0)
|
||||
|
||||
)
|
||||
|
||||
(defun berechne()
|
||||
;------------------------------------------------------
|
||||
;<<<<< Berechnungen durchf�hren >>>>>>>
|
||||
;------------------------------------------------------
|
||||
(setq LAENGE (* (fix (/ (distance P1 P2) 5)) 5))
|
||||
(setq WINKEL (/ (* (angle P1 P2) 180) PI))
|
||||
(if (> LAENGE 6000)
|
||||
(exit)
|
||||
)
|
||||
;--------------------
|
||||
; Endst�cke berechnen
|
||||
;--------------------
|
||||
(setq ENDST (- LAENGE (* (fix (/ LAENGE 500)) 500)))
|
||||
(if (and (>= ENDST 0) (< ENDST 160))
|
||||
(progn
|
||||
(setq M_END1 250)
|
||||
(setq M_END2 (- (+ ENDST 500) M_END1))
|
||||
)
|
||||
)
|
||||
(if (and (>= ENDST 160) (< ENDST 330))
|
||||
(progn
|
||||
(setq M_END1 (/ ENDST 2))
|
||||
(setq M_END2 M_END1)
|
||||
)
|
||||
)
|
||||
(if (and (>= ENDST 330) (<= ENDST 500))
|
||||
(progn
|
||||
(setq M_END1 250)
|
||||
(setq M_END2 (- ENDST M_END1))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defun geometrie()
|
||||
;----------------------------------------------------------
|
||||
;<<<<<< Bl”cke einf�gen >>>>>>
|
||||
;----------------------------------------------------------
|
||||
(command "_layer" "_m" "L-7" "_c" "7" "" "")
|
||||
(command "_insert" (strcat lw "/acadsst/layout/st") P1 LAENGE "1" WINKEL)
|
||||
;-----------------------------------
|
||||
;Artikel-Nr. abh„ngig von der L„nge
|
||||
;-----------------------------------
|
||||
(if (and (> LAENGE 0) (<= LAENGE 1000))
|
||||
(setq M_ARTINR "821084051")
|
||||
)
|
||||
(if (and (> LAENGE 1000) (<= LAENGE 2000))
|
||||
(setq M_ARTINR "821084052")
|
||||
)
|
||||
(if (and (> LAENGE 2000) (<= LAENGE 3000))
|
||||
(setq M_ARTINR "821084053")
|
||||
)
|
||||
(if (and (> LAENGE 3000) (<= LAENGE 4000))
|
||||
(setq M_ARTINR "821084054")
|
||||
)
|
||||
(if (and (> LAENGE 4000) (<= LAENGE 5000))
|
||||
(setq M_ARTINR "821084055")
|
||||
)
|
||||
(if (and (> LAENGE 5000) (<= LAENGE 6000))
|
||||
(setq M_ARTINR "821084056")
|
||||
)
|
||||
)
|
||||
|
||||
(defun BEMASSUNG ()
|
||||
;---------
|
||||
; Bemaáung
|
||||
;---------
|
||||
(command "_layer" "_m" "L-10" "_c" "10" "" "")
|
||||
(command "_dim")
|
||||
(command "_dimtad" "0")
|
||||
(command "_dimtxt" "125")
|
||||
(command "_dimasz" "40")
|
||||
(command "_align" P1 P2 (polar P1 (- (angle P1 P2) (/ pi 2)) 200) "")
|
||||
(command "_exit")
|
||||
(command "_layer" "_m" "L-7" "_c" "7" "" "")
|
||||
)
|
||||
|
||||
;-----------------------------------------------------------------
|
||||
(defun c:stl ( / P1 P2 LAENGE WINKEL M_ARTINR ENDST M_END1 M_END2)
|
||||
(setvar "limcheck" 0)
|
||||
(prompt "******* ST (Schraubtr„ger MIT Leitblech) *******")
|
||||
(prompt "")
|
||||
(datain)
|
||||
(berechne)
|
||||
(geometrie)
|
||||
(attribute-aendern "0" "2" "1" (itoa LAENGE) (itoa M_END1) (itoa M_END2)
|
||||
M_ARTINR (strcat "STL L= " (itoa LAENGE)))
|
||||
(setq P3 (polar P1 (+ (angle P1 P2) (/ pi 6)) 100))
|
||||
(command "_text" P3 "100" WINKEL (strcat "ST L=" (itoa LAENGE)))
|
||||
(bemassung)
|
||||
(setvar "osmode" ALTFANG)
|
||||
)
|
||||
;------------------------------------------------------------------
|
||||
@@ -0,0 +1,180 @@
|
||||
;------------------------------------------------------------------------;
|
||||
; ST- zeichnen ;
|
||||
; - Block \prog\acad\layout\ST.DWG setzen und den Gegebenheiten ;
|
||||
; anpassen. ;
|
||||
; - Anschlieáend m�ssen die Atribute ge„ndert werden ;
|
||||
; -----------------------------------------------------------------------;
|
||||
; AW 02.4.93 ;
|
||||
;------------------------------------------------------------------------;
|
||||
|
||||
(defun datain ()
|
||||
;-------------------------------------------------------
|
||||
;>>>> Eingabeteil <<<<<<<
|
||||
;-------------------------------------------------------
|
||||
(setq ALTFANG (getvar "osmode"))
|
||||
(initget (+ 1 2 4))
|
||||
(setq P1 (getpoint "\n1. Punkt antippen: "))
|
||||
(setq P2 (getpoint P1 "\n2. Punkt antippen: "))
|
||||
(setvar "osmode" 0)
|
||||
|
||||
(initget "O M")
|
||||
(setq AUSFUEHRUNG (getkword "\n(O)hne oder (M)it Leitblech (O/M) <O> ?: "))
|
||||
(if (not AUSFUEHRUNG)
|
||||
(setq AUSFUEHRUNG "O")
|
||||
)
|
||||
(setq AUSFUEHRUNG (strcase AUSFUEHRUNG))
|
||||
(if (= AUSFUEHRUNG "O")
|
||||
(setq NEV "ST ")
|
||||
(setq NEV "STL ")
|
||||
)
|
||||
(initget "J N")
|
||||
(setq ANTWORT (getkword "\nMuffe am 2.Endpunkt anschweiáen ? (J/N) <N>?: "))
|
||||
(if (not ANTWORT)
|
||||
(setq ANTWORT "N")
|
||||
)
|
||||
(setq ANTWORT (strcase ANTWORT))
|
||||
)
|
||||
|
||||
(defun berechne()
|
||||
;------------------------------------------------------
|
||||
;<<<<< Berechnungen durchf�hren >>>>>>>
|
||||
;------------------------------------------------------
|
||||
(setq LAENGE (* (fix (/ (distance P1 P2) 5)) 5))
|
||||
(setq WINKEL (/ (* (angle P1 P2) 180) PI))
|
||||
(if (> LAENGE 6000)
|
||||
(exit)
|
||||
)
|
||||
;--------------------
|
||||
; Endst�cke berechnen
|
||||
;--------------------
|
||||
(setq ENDST (- LAENGE (* (fix (/ LAENGE 500)) 500)))
|
||||
(if (and (>= ENDST 0) (< ENDST 160))
|
||||
(progn
|
||||
(setq M_END1 250)
|
||||
(setq M_END2 (- (+ ENDST 500) M_END1))
|
||||
)
|
||||
)
|
||||
(if (and (>= ENDST 160) (< ENDST 330))
|
||||
(progn
|
||||
(setq M_END1 (/ ENDST 2))
|
||||
(setq M_END2 M_END1)
|
||||
)
|
||||
)
|
||||
(if (and (>= ENDST 330) (<= ENDST 500))
|
||||
(progn
|
||||
(setq M_END1 250)
|
||||
(setq M_END2 (- ENDST M_END1))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defun geometrie()
|
||||
;----------------------------------------------------------
|
||||
;<<<<<< Bl”cke einf�gen >>>>>>
|
||||
;----------------------------------------------------------
|
||||
(if (= AUSFUEHRUNG "O")
|
||||
(command "_layer" "_m" "L-2" "_c" "2" "" "")
|
||||
(command "_layer" "_m" "L-7" "_c" "7" "" "")
|
||||
)
|
||||
(command "_insert" (strcat lw "/acadsst/layout/st") P1 LAENGE "1" WINKEL)
|
||||
(if (= AUSFUEHRUNG "O")
|
||||
(progn
|
||||
;--------------------------------------
|
||||
;Artikel-Nr. abh„ngig von der L„nge ST
|
||||
;--------------------------------------
|
||||
(if (and (> LAENGE 0) (<= LAENGE 1000))
|
||||
(setq M_ARTINR "821084001")
|
||||
)
|
||||
(if (and (> LAENGE 1000) (<= LAENGE 2000))
|
||||
(setq M_ARTINR "821084002")
|
||||
)
|
||||
(if (and (> LAENGE 2000) (<= LAENGE 3000))
|
||||
(setq M_ARTINR "821084003")
|
||||
)
|
||||
(if (and (> LAENGE 3000) (<= LAENGE 4000))
|
||||
(setq M_ARTINR "821084004")
|
||||
)
|
||||
(if (and (> LAENGE 4000) (<= LAENGE 5000))
|
||||
(setq M_ARTINR "821084005")
|
||||
)
|
||||
(if (and (> LAENGE 5000) (<= LAENGE 6000))
|
||||
(setq M_ARTINR "821084006")
|
||||
)
|
||||
)
|
||||
(progn
|
||||
;----------------------------------------
|
||||
;Artikel-Nr. abh„ngig von der L„nge STL
|
||||
;----------------------------------------
|
||||
(if (and (> LAENGE 0) (<= LAENGE 1000))
|
||||
(setq M_ARTINR "821084051")
|
||||
)
|
||||
(if (and (> LAENGE 1000) (<= LAENGE 2000))
|
||||
(setq M_ARTINR "821084052")
|
||||
)
|
||||
(if (and (> LAENGE 2000) (<= LAENGE 3000))
|
||||
(setq M_ARTINR "821084053")
|
||||
)
|
||||
(if (and (> LAENGE 3000) (<= LAENGE 4000))
|
||||
(setq M_ARTINR "821084054")
|
||||
)
|
||||
(if (and (> LAENGE 4000) (<= LAENGE 5000))
|
||||
(setq M_ARTINR "821084055")
|
||||
)
|
||||
(if (and (> LAENGE 5000) (<= LAENGE 6000))
|
||||
(setq M_ARTINR "821084056")
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defun BEMASSUNG ()
|
||||
;---------
|
||||
; Bemaáung
|
||||
;---------
|
||||
(command "_layer" "_m" "L-10" "_c" "10" "" "")
|
||||
(command "_dim")
|
||||
(command "_dimtad" "0")
|
||||
(command "_dimtxt" "125")
|
||||
(command "_dimasz" "40")
|
||||
(command "_align" P1 P2 (polar P1 (- (angle P1 P2) (/ pi 2)) 200) (itoa LAENGE))
|
||||
(command "_exit")
|
||||
(command "_layer" "_m" "L-2" "_c" "2" "" "")
|
||||
)
|
||||
|
||||
;-----------------------------------------------------------------
|
||||
(defun c:stol ( / P1 P2 LAENGE WINKEL M_ARTINR ENDST M_END1 M_END2)
|
||||
(setvar "limcheck" 0)
|
||||
(prompt "******* ST / STL (Schraubtr„ger OHNE oder MIT Leitblech) *******")
|
||||
(prompt "")
|
||||
(datain)
|
||||
(berechne)
|
||||
(geometrie)
|
||||
|
||||
(if (= ANTWORT "J")
|
||||
(attribute-aendern "0" "2" "1" (itoa LAENGE) (itoa M_END1) (itoa M_END2)
|
||||
M_ARTINR (strcat NEV "L= " (itoa LAENGE) " + 1 MUFFE ANGESCHW."))
|
||||
(attribute-aendern "0" "2" "1" (itoa LAENGE) (itoa M_END1) (itoa M_END2)
|
||||
M_ARTINR (strcat NEV "L= " (itoa LAENGE)))
|
||||
)
|
||||
(setq P3 (polar P1 (+ (angle P1 P2) (/ pi 6)) 100))
|
||||
(command "_text" P3 "100" WINKEL (strcat NEV "L=" (itoa LAENGE)))
|
||||
(bemassung)
|
||||
(if (= ANTWORT "J")
|
||||
(progn
|
||||
(command "_layer" "_m" "L-1" "_c" "1" "" "")
|
||||
(command "_insert" (strcat lw "/acadsst/layout/muffe")
|
||||
P2 "" "" (rtos WINKEL))
|
||||
(attribute-aendern "0" "0" "" "" "" "" "825002017"
|
||||
"MUFFE ANGESCHWEISST (ST)")
|
||||
(if (= AUSFUEHRUNG "O")
|
||||
(command "_layer" "_m" "L-2" "_c" "2" "" "")
|
||||
(command "_layer" "_m" "L-7" "_c" "7" "" "")
|
||||
)
|
||||
)
|
||||
)
|
||||
(setvar "osmode" ALTFANG)
|
||||
)
|
||||
;------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user