;; =================================================================================================== ;; os_st_rchtr_59411.lsp (ohne sd-muli-lang-string) ;; os 09.09.2003 ;; M1 - Logical Table fuer quadratische und rechteckige Stahlrohre DIN 59411 ;; M2 - Extrudieren der Stahlrohe mit Zuordnung der Dichte und Farbe ;; =================================================================================================== (in-package :GD-package) (use-package :OLI) ;; =================================================================================================== ;; M1 - Logical Table fuer quadratische und rechteckige Stahlrohre DIN 59411 (sd-create-logical-table "DIN-59411-Tab" :columns '(:Benennung :a :b :s ) :columnNames '("Bezeichnung" "a" "b" "s" ) :types '(:string :length :length :length ) :units '(nil :mm :mm :mm ) :contents '( ("30x30x2" (30 :mm) (30 :mm) (2 :mm) ) ("30x30x3" (30 :mm) (30 :mm) (3 :mm) ) ("40x40x2,6" (40 :mm) (40 :mm) (2.6 :mm) ) ("40x40x3,2" (40 :mm) (40 :mm) (3.2 :mm) ) ("60x40x4" (60 :mm) (40 :mm) (4 :mm) ) ("120x60x3,2" (120 :mm) (60 :mm) (3.2 :mm) ) ("120x80x3,2" (120 :mm) (80 :mm) (3.2 :mm) ) ) );;sd-create-logical-table ;; ===================== (sd-create-display-table "DIN-59411-Tab" :tableTitle "DIN 59411" :logicalTable "DIN-59411-Tab" :columns '(:Benennung :a :b :s ) :applyColumns '(:a :b :s) :displayHeight 300 :filterStatusLine nil :selectionMode :single-row :applyAction :default-tokens );;sd-create-display-table ;; =================================================================================================== ;; M2 - Extrudieren der Stahlrohe mit Zuordnung der Dichte und Farbe (sd-defdialog 'os-st-rchtr-59411 :dialog-title "Rcht DIN 59411" ;:toolbox-button nil :variables '( (TEIL :value-type :part-incl-new :initial-value nil :title "Teil" :prompt-text "zu Ėnderndes Teil angeben.") (AKT_WP :value-type :wp :title "AE" :prompt-text "AE angeben.") (a :value-type :length :title "a" :show-input-tool (sd-show-display-table "DIN-59411-Tab" :position '("TOP-MENU-TOOLBOX-TB" :lefttop 570 50)) :hide-input-tool (sd-hide-display-table "DIN-59411-Tab" :ignorePin t) :prompt-text "SeitenlĖnge a angeben.") (b :value-type :length :title "b" :prompt-text "SeitenlĖnge b angeben.") (s :value-type :length :title "s" :prompt-text "WandstĖrke s angeben.") (LAENGE :value-type :length :title "LĖnge" :prompt-text "LĖnge angeben.") (RICHT :range ( (:+W :label "+W") (:-W :label "-W") (:both_sides :label "beidseitig") ) :title "Richtung" :prompt-text "Richtung angeben.") (PUNKT :value-type :point-3d :title "Punkt" :prompt-text "Einfuegepunkt auswaehlen.") (DIN :title "DIN" :value-type :grouped-boolean :initial-value t) (RCHT :title "RchtRohr" :value-type :grouped-boolean) ("Position") (WINKEL :value-type :angle :title "Winkel" :initial-value 0 :prompt-text "Winkel angeben.") (OL :title "OL":value-type :grouped-boolean) (OR :title "OR" :value-type :grouped-boolean :initial-value t) (M :title "Mitte" :value-type :boolean :toggle-type :left-toggle) (UL :title "UL" :value-type :grouped-boolean) (UR :title "UR" :value-type :grouped-boolean) (next :push-action (os-4kt-59411-st-erstellen) :after-input (progn (setf TEIL nil) (setf PUNKT nil)) :next-variable 'TEIL) );;variables :mutual-exclusion '((DIN RCHT) (OL OR M UL UR)) :local-functions '( (os-4kt-59411-st-erstellen () (sd-call-cmds (progn (let ( (P1 (make-gpnt2d :x 0 :y 0)) (P2 (make-gpnt2d :x a :y b)) (P3 (make-gpnt2d :x 0 :y b)) (P4 (make-gpnt2d :x a :y 0)) (P5 (make-gpnt2d :x s :y s)) (P6 (make-gpnt2d :x (- a s) :y (- b s))) (P7 (make-gpnt2d :x s :y (- b s))) (P8 (make-gpnt2d :x (- a s) :y s)) (PM (make-gpnt2d :x (/ a 2) :y (/ b 2))) (Ra (cond ((<= s 4) (* 2 s)) ((<= s 8) (* 2.5 s)) (t (* 3 s)) );;cond );;Ra Ri ) (setf Ri (- Ra s)) ;;Arbeitsebene erstellen (create_workplane :copy :source AKT_WP :name "AE_tmp" :owner "/" :translate :two_ptv (sd-inq-wp-origin AKT_WP) PUNKT) (sd-call-cmds (delete_2d :current_wp :edge_2d :all_2d) :failure nil) (geometry_mode :real) ;;Profil erstellen (rectangle P1 P2 P5 P6) ;;Rundung erstellen (cond (DIN ;; (fillet :create :fillet_radius Ra P1 P2 P3 P4) (fillet :create :fillet_radius Ri P5 P6 P7 P8) );;DIN );;cond ;;Positionierung (cond (UR ;;Unten Rechts (mirror_2d :select :edge_2d :all_2d :horizontal P1 :keep :off) );;UR (OL ;;Oben Links (mirror_2d :select :edge_2d :all_2d :vertical P1 :keep :off) );;OL (UL ;;Unten Links (mirror_2d :select :edge_2d :all_2d :center P1 :keep :off) );;UL (M ;;Mitte (move_2d :select :edge_2d :all_2d :direction PM P1 :keep :off :repeat_factor 1) );;M );;cond (if (/= WINKEL 0) (rotate_2d :select :edge_2d :all_2d :center_point P1 :angle WINKEL :repeat_factor 1 :keep :off) );;if ;;Profil extrudieren (extrude :sel_part TEIL :direction RICHT :keep_wp :no :distance LAENGE) ;;Teileproperties fuer Stahl (set_part_inst_density :parts TEIL :dens 0.00785) (set_part_inst_color :parts TEIL :color (sd-rgb-to-color 0.6,0.6,0.6)) ;;alte WP auf aktiv setzen (current_wp AKT_WP) ;(display (format nil "OL=~a ~%OR=~a ~%M=~a ~%UL=~a ~%UR=~a" OL OR M UL UR)) );;let );;progn );;sd-call-cmds );;os-4kt-59411-st-erstellen );;local-functions :ok-action '(os-4kt-59411-st-erstellen) );;sd-defdialog ;; ===================================================================================================