#| ******************************************************************************************************************************* ** Ändern der Dichte und Farbe von Teilen ** ******************************************************************************************************************************* *-----------------------------------------------------------------------------------------------------------------------------* * Copyright 2003 Michael Mueller, PTB Braunschweig * * * *-----------------------------------------------------------------------------------------------------------------------------* * Dateiname: dichte-farbe-neu.lsp * Version : 1.2 * Datum : 12.08.2003 * Author : MM |# (set-part-default-density 7.85e-6) (use-package :OLI) ;; Logical Table (sd-create-logical-table "Teile_Dichte" :columns '(:werkstoff :beschreibung :spez_dichte :h :s :l) :columnNames '("Werkstoff" "Beschreibung" "spez-Dichte" "h" "s" "l") :types '(:string :string :number :number :number :number) :contents '(("Baustahl" "S235JR - 1.0037" 0.0078 0.636 0.484 0.663) ("Edelstahl" "X5CrNi18-10 - 1.4301" 0.0079 0.0 0.0 0.4) ("Dural" "ALMgCuPb - 3.1645" 0.00271 0.0 0.0 0.72) ("Invar" "Ni36 - 1.3912" 0.008 0.444 1.0 0.616) ("Messing" "CuZn 40 Pb 2 - 2.0402" 0.0086 0.1 0.75 1.0) ("Kupfer" "E-Cu - 2.0060" 0.0089 0.02 0.8 1.0) ("Blei" "Hartblei PbSb - 2.3208" 0.01134 0.6 0.4 0.5) ("Plexiglas" "weiss" 0.0012 0.9 0.1 0.9) ("Trovidur" "hell-rot" 0.0012 1.0 0.7 1.0) ("Densimet" "bzw. Triamet - Dichte 18" 0.018 0.3 0.4 0.5) ("Keramik" "z.B. Marcor" 0.00252 0.5 0.2 0.8) ("PTFE" "Teflon" 0.0022 0.131 0.132 0.921) ("Roofmate" "Hartstyropor hell-blau" 0.000035 0.608 0.758 1.0) ("Normteile" "Farbe Magenta" 0.0078 0.833 1.0 1.0) )) ;; Display Table (sd-create-display-table "DICHTE_TAB" :tableTitle "spezifische Dichte" :logicalTable "Teile_Dichte" :columns '(:werkstoff :beschreibung :spez_dichte :h :s :l) :applyColumns '(:spez_dichte :h :s :l) :selectionMode :single-row :applyAction :default ) ;; Dialog (sd-defdialog 'NEUE_DICHTE_Farbe :dialog-title "Neue Dichte-Farbe" :variables '((ND_PART :value-type :part :multiple-items t :title "Teil/e" :prompt-text "Teile angeben" ) (Auswahl :value-type :list :prompt-text "Dichte spezifizieren" :show-input-tool (sd-show-display-table "DICHTE_TAB" :position '("NEUE_DICHTE-OPTIONS-OPT-CONT-DICHTE-TB" :bottomleft 0 0) ) :hide-input-tool (sd-hide-display-table "DICHTE_TAB") ) (Farbe2 :value-type :string :toggle-type :invisible :after-input (progn (sd-set-variable-status "FARBE" :value (sd-rgb-to-color (read-from-string HSL))) (setq FARBE (sd-rgb-to-color (read-from-string HSL))) ) ) (FARBE :value-type :rgb-color :title "Farbe" ) ) :ok-action '(los-gehts) :local-functions '( (los-gehts () (sd-call-cmds (set_part_density nd_part (first Auswahl)) ) (sd-call-cmds (SET_PART_INST_COLOR :PARTS nd_part :COLOR :HSL (make-gpnt3d :x (second Auswahl) :y (third auswahl) :z (fourth auswahl)))) ) ) )