;********************************************************************************************* ; Dateiname : SD_SetPartProperties.lsp ; Autor : Stephan Wörz - SCHILLER AUTOMATION ; Erstellt : 19.10.2015 ; geändert : ;********************************************************************************************* ; Beschreibung : Weist Teileigenschaften zu ;********************************************************************************************* ; Änderungen ;********************************************************************************************* (in-package :SCHILLER) (use-package :oli) (sd-defdialog 'SD_SetPartProp_E-Chain :dialog-control :sequential :toolbox-button nil :variables '( (prt :value-type :part :multiple-items t :modifies nil :prompt-text "Kunststoff anthrazit - Teil(e) angeben" :next-variable 'prt ); end prt ); end variables :ok-action '(dolist (Teil prt) ;; SetPartProps (Teil Teilefarbe Teiledichte Teiletransparenz) (BASICTOOLS::SetPartProps Teil (sd-rgb-to-color 0.25490197539329529,0.25490197539329529,0.25490197539329529) 0.0014 0) );;dolist ) ;; sd-defdialog ;;---------------------------------------------------------------------- (sd-defdialog 'SD_SetPartProp_Edelstahl :dialog-control :sequential :toolbox-button nil :variables '( (prt :value-type :part :multiple-items t :modifies nil :prompt-text "Edelstahl - Teil(e) angeben" :next-variable 'prt ); end prt ); end variables :ok-action '(dolist (Teil prt) ;; SetPartProps (Teil Teilefarbe Teiledichte Teiletransparenz) (BASICTOOLS::SetPartProps Teil (sd-rgb-to-color 0.8,1,1) 0.0079 0) );;dolist ) ;; sd-defdialog ;;---------------------------------------------------------------------- (sd-defdialog 'SD_SetPartProp_PC :dialog-control :sequential :toolbox-button nil :variables '( (prt :value-type :part :multiple-items t :modifies nil :prompt-text "Polycarbonat - Teil(e) angeben" :next-variable 'prt ); end prt ); end variables :ok-action '(dolist (Teil prt) ;; SetPartProps (Teil Teilefarbe Teiledichte Teiletransparenz) (BASICTOOLS::SetPartProps Teil (sd-rgb-to-color 0.7,1,1) 0.00120 0.5) );;dolist ) ;; sd-defdialog ;;---------------------------------------------------------------------- (sd-defdialog 'SD_SetPartProp_Plastic :dialog-control :sequential :toolbox-button nil :variables '( (prt :value-type :part :multiple-items t :modifies nil :prompt-text "Kunststoff - Teil(e) angeben" :next-variable 'prt ); end prt ); end variables :ok-action '(dolist (Teil prt) ;; SetPartProps (Teil Teilefarbe Teiledichte Teiletransparenz) (BASICTOOLS::SetPartProps Teil (sd-rgb-to-color 1,0.8,0.6) 0.0014 0) );;dolist ) ;; sd-defdialog ;;---------------------------------------------------------------------- (sd-defdialog 'SD_SetPartProp_Baustahl :dialog-control :sequential :toolbox-button nil :variables '( (prt :value-type :part :multiple-items t :modifies nil :prompt-text "STAHL - Teil(e) angeben" :next-variable 'prt ); end prt ); end variables :ok-action '(dolist (Teil prt) ;; SetPartProps (Teil Teilefarbe Teiledichte Teiletransparenz) (BASICTOOLS::SetPartProps Teil (sd-rgb-to-color 0.7,0.9,1) 0.00785 0) );;dolist ) ;; sd-defdialog ;;---------------------------------------------------------------------- (sd-defdialog 'SD_SetPartProp_Alu :dialog-control :sequential :toolbox-button nil :variables '( (prt :value-type :part :multiple-items t :modifies nil :prompt-text "Alu - Teil(e) angeben" :next-variable 'prt ); end prt ); end variables :ok-action '(dolist (Teil prt) ;; SetPartProps (Teil Teilefarbe Teiledichte Teiletransparenz) (BASICTOOLS::SetPartProps Teil (sd-rgb-to-color 0.6,0.6,0.6) 0.00275 0) );;dolist ) ;; sd-defdialog ;;---------------------------------------------------------------------- (sd-defdialog 'SD_SetPartProp_RedEdges :dialog-control :sequential :toolbox-button nil :variables '( (prt :value-type :part :multiple-items t :modifies nil :prompt-text "Rote Kanten - Teil(e) angeben" :next-variable 'prt ); end prt ); end variables :ok-action '(dolist (Teil prt) (if (sd-inq-obj-parent-contents-read-only-p Teil) ;; wenn Besitzer schreibgeschützt ;;Then... (progn (part_prop :the_part Teil ;;:base_color Teilefarbe :done :BASE_EDGE_COLOR 16711680 :done ;;:base_trans Teiletransparenz ;;:base_density Teiledichte );;part_prop );;progn ;;Else.... (progn (part_prop :the_part Teil ;;:base_color Teilefarbe :done ;;:COLOR :OFF ;:done ;; Exemplarfarbe :OFF = KEINE >> setzt auch Exemplarkantenfarbe zurück!! :BASE_EDGE_COLOR 16711680 :done :EDGE_COLOR 16711680 :done ;;:base_trans Teiletransparenz ;;:trans :none ;;:base_density Teiledichte ;;:density :off );;part_prop );;progn );;if );;dolist ) ;; sd-defdialog ;;---------------------------------------------------------------------- (sd-defdialog 'SD_SetPartProp_BlueEdges :dialog-control :sequential :toolbox-button nil :variables '( (prt :value-type :part :multiple-items t :modifies nil :prompt-text "Blaue Kanten - Teil(e) angeben" :next-variable 'prt ); end prt ); end variables :ok-action '(dolist (Teil prt) (if (sd-inq-obj-parent-contents-read-only-p Teil) ;; wenn Besitzer schreibgeschützt ;;Then... (progn (part_prop :the_part Teil ;;:base_color Teilefarbe :done :BASE_EDGE_COLOR 255 :done ;;:base_trans Teiletransparenz ;;:base_density Teiledichte );;part_prop );;progn ;;Else.... (progn (part_prop :the_part Teil ;;:base_color Teilefarbe :done ;;:COLOR :OFF ;:done ;; Exemplarfarbe :OFF = KEINE >> setzt auch Exemplarkantenfarbe zurück!! :BASE_EDGE_COLOR 255 :done :EDGE_COLOR 255 :done ;;:base_trans Teiletransparenz ;;:trans :none ;;:base_density Teiledichte ;;:density :off );;part_prop );;progn );;if );;dolist ) ;; sd-defdialog ;;---------------------------------------------------------------------- (sd-defdialog 'SD_Exemplarfarbe_KEINE :dialog-control :sequential :toolbox-button nil :variables '( (part :value-type :part :multiple-items t :modifies :contents );; part ); end variables :ok-action '(dolist (Teil part) ;;Check Besitzer (if (sd-inq-parent-obj Teil) (part_prop :the_part (sd-inq-obj-pathname Teil) :COLOR :OFF :BASE_EDGE_COLOR 0 :done :TRANS :NONE :DENSITY :OFF );;part_prop );;if );;dolist ) ;; sd-defdialog ;;---------------------------------------------------------------------- (sd-defdialog 'SD_Exemplarfarbe_gruen :dialog-control :sequential :toolbox-button nil :variables '( (part :value-type :part :multiple-items t :modifies :contents );; part ); end variables :ok-action '(dolist (Teil part) ;;Check Besitzer (if (sd-inq-parent-obj Teil) (part_prop :the_part (sd-inq-obj-pathname Teil) :COLOR 65280 :done :EDGE_COLOR 0 :done ;;:EDGE_COLOR 0 );;part_prop );;if );;dolist ) ;; sd-defdialog ;;---------------------------------------------------------------------- (sd-defdialog 'SD_Exemplarfarbe_rot :dialog-control :sequential :toolbox-button nil :variables '( (part :value-type :part :multiple-items t :modifies :contents );; part ); end variables :ok-action '(dolist (Teil part) ;;Check Besitzer (if (sd-inq-parent-obj Teil) (part_prop :the_part (sd-inq-obj-pathname Teil) :COLOR 16711680 :done :EDGE_COLOR 0 :done ;;:EDGE_COLOR 0 );;part_prop );;if );;dolist ) ;; sd-defdialog ;;---------------------------------------------------------------------- (sd-defdialog 'SD_DeleteEdgeColor :dialog-control :sequential :dialog-type :interrupt :toolbox-button nil :variables '( (prt :value-type :part :initial-value :current-part :multiple-items t :prompt-text (sd-multi-lang-string "Specify part" :german "Kantenfarbe löschen - Teil angeben") :modifies nil ); end prt ); end variables :ok-action '(DeleteEdgeColor) :local-functions '( (DeleteEdgeColor () (edge_3d_prop :the_edge (sd-call-cmds (get_selection :focus_type *sd-edge-3d-seltype* :select :selected_part prt :all_3d)) :color :Off );; edge_3d_prop );; DeleteEdgeColor ) ;; local-functions ) ;; sd-defdialog ;;---------------------------------------------------------------------- (sd-defdialog 'SD_DeleteFaceColor :dialog-control :sequential :toolbox-button nil :variables '( (prt :value-type :part :multiple-items t :modifies nil :prompt-text (sd-multi-lang-string "Specify part(s)" :german "Alle FlÌchenfarben lÎschen - Teil(e) angeben") :next-variable 'prt ); end prt ); end variables :ok-action '(DelFaceColor) :local-functions '( (DelFaceColor () (dolist (Teil prt) (BASICTOOLS::DeleteFaceColor Teil) ;; Flächenfarben (außer reservierte) löschen );;dolist );; DelFaceColor ) ;; local-functions ) ;; sd-defdialog ;;---------------------------------------------------------------------- (sd-defdialog 'SD_BlackEdges :dialog-control :sequential :toolbox-button nil :variables '( (prt :value-type :part :multiple-items t :modifies nil :prompt-text (sd-multi-lang-string "Specify part(s)" :german "Alle Kanten schwarz - Teil(e) angeben") :next-variable 'prt ); end prt ); end variables :ok-action '(SetBlack) :local-functions '( (SetBlack () (dolist (Teil prt) (progn ;;Kantenfarbe löschen (edge_3d_prop :the_edge (sd-call-cmds (get_selection :focus_type *sd-edge-3d-seltype* :select :selected_part teil :all_3d)) :color :OFF; 4210752 );;edge_3d_prop ;;Kantenfarbe über die Teileeigenschaften setzen! (part_prop :the_part teil :BASE_EDGE_COLOR 0 :done :EDGE_COLOR 0 :done );;part_prop );;progn );;dolist );; SetBlack ) ;; local-functions ) ;; sd-defdialog ;;---------------------------------------------------------------------- (sd-defdialog 'SD_Transparency :dialog-control :sequential :toolbox-button nil :variables '( (prt :value-type :part :multiple-items t :modifies nil :prompt-text (sd-multi-lang-string "Specify part(s)" :german "Teil(e) angeben") :next-variable 'prt ); end prt ); end variables :ok-action '(SetTransparency) :local-functions '( (SetTransparency () (dolist (Teil prt) (progn (if (= 0.0 (sd-inq-part-transparency Teil)) ;;Then... (part_prop :the_part teil :BASE_TRANS :SEMI) ;;Else... (part_prop :the_part teil :BASE_TRANS :DEFAULT) );;IF );;progn );;dolist );;SetTransparency ) ;; local-functions ) ;; sd-defdialog ;;----------------------------------------------------------------------