;;--------------------------------------------------------------------------* ;; Copyright 2004 DC4 Technisches Büro GmbH * ;; * ;;--------------------------------------------------------------------------* ;; Dateiname: flanalyse.lsp ;; Version : 1.0 ;; Datum : 27.01.2004 ;; Author : Gt ;;--------------------------------------------------------------------------* (in-package :custom) (use-package :OLI) ;;--------------------------------------------------------------------------* (sd-defdialog 'dc4-teil-flaechen-faerben-dialog :dialog-title "Analyse Flaechen" ;;:dialog-control :sequential :variables '( ;;local (back-state :initial-value (sd-set-model-checkpoint)) ;;dialog (teil :selection (*sd-part-seltype*) ;;:multiple-items t ;;:show-select-menu t :face-part-allowed t :prompt-text "Teil fÏr Analyse angeben" :title "Teil" ;;:initial-value nil ) (c_plane :value-type :rgb-color :prompt-text "Farbe fuer ebene Flaechen festlegen" :title "Ebene" :initial-value 4243417 ;;hellblau ) (c_cyl :value-type :rgb-color :prompt-text "Farbe fuer zylindrische Flaechen festlegen" :title "Zylinder" :initial-value 65280 ;;gruen ) (c_cone :value-type :rgb-color :prompt-text "Farbe fuer kegelige Flaechen festlegen" :title "Kegel" :initial-value 16776960 ;;gelb ) (c_sphere :value-type :rgb-color :prompt-text "Farbe fuer kugelige Flaechen festlegen" :title "Kugel" :initial-value 16776960 ;;gelb ) (c_torus :value-type :rgb-color :prompt-text "Farbe fuer toroide Flaechen festlegen" :title "Torus" :initial-value 16776960 ;;gelb ) (c_spline :value-type :rgb-color :prompt-text "Farbe fuer Freiform-Flaechen festlegen" :title "Freiform" :initial-value 16711680 ;;rot ) (c_blend :value-type :rgb-color :prompt-text "Farbe fuer Verrungungen festlegen" :title "Verrundung" :initial-value 65280 ;;gruen ) (c_chamfer :value-type :rgb-color :prompt-text "Farbe fuer Fasen festlegen" :title "Fase" :initial-value 4243417 ;;hellblau ) (keep :value-type :boolean :toggle-type :wide-toggle :title "Farben behalten" :initial-value nil ) (next :title "Analysieren" :toggle-type :wide-toggle :push-action (next-action) ) ) :local-functions '( (plane-action () (let (fl fll) (setf fll (sd-call-cmds (get_selection :focus_type *sd-plane-seltype* :allow_face_part :select :in_part teil))) (dolist (fl fll) (sd-call-cmds (set_face_color fl c_plane)) );;dolist );;let ) (cyl-action () (let (fl fll) (setf fll (sd-call-cmds (get_selection :focus_type *sd-cylinder-seltype* :allow_face_part :select :in_part teil))) (dolist (fl fll) (sd-call-cmds (set_face_color fl c_cyl)) );;dolist );;let ) (cone-action () (let (fl fll) (setf fll (sd-call-cmds (get_selection :focus_type *sd-cone-seltype* :allow_face_part :select :in_part teil))) (dolist (fl fll) (sd-call-cmds (set_face_color fl c_cone)) );;dolist );;let ) (sphere-action () (let (fl fll) (setf fll (sd-call-cmds (get_selection :focus_type *sd-sphere-seltype* :allow_face_part :select :in_part teil))) (dolist (fl fll) (sd-call-cmds (set_face_color fl c_sphere)) );;dolist );;let ) (torus-action () (let (fl fll) (setf fll (sd-call-cmds (get_selection :focus_type *sd-torus-seltype* :allow_face_part :select :in_part teil))) (dolist (fl fll) (sd-call-cmds (set_face_color fl c_torus)) );;dolist );;let ) (spline-action () (let (fl fll) (setf fll (sd-call-cmds (get_selection :focus_type *sd-spline-face-seltype* :allow_face_part :select :in_part teil))) (dolist (fl fll) (sd-call-cmds (set_face_color fl c_spline)) );;dolist );;let ) (blend-action () (let (fl fll) (setf fll (sd-call-cmds (get_selection :focus_type *sd-blend-3d-seltype* :allow_face_part :select :in_part teil))) (dolist (fl fll) (sd-call-cmds (set_face_color fl c_blend)) );;dolist );;let ) (chamfer-action () (let (fl fll) (setf fll (sd-call-cmds (get_selection :focus_type *sd-chamfer-3d-seltype* :allow_face_part :select :in_part teil))) (dolist (fl fll) (sd-call-cmds (set_face_color fl c_chamfer)) );;dolist );;let ) (next-action () (when (and back-state (not keep)) (progn (sd-return-to-model-checkpoint back-state) (setf back-state (sd-set-model-checkpoint)) );;progn );;when (if (and teil c_plane c_cyl c_cone c_sphere c_torus c_spline c_blend c_chamfer) (progn (setf back-state (sd-set-model-checkpoint)) (plane-action) (cyl-action) (cone-action) (sphere-action) (torus-action) (spline-action) (blend-action) (chamfer-action) );;progn (sd-display-error "Es wurden nicht alle erforderlichen Eingaben gemacht!") );;if ) ) :cleanup-action '(when (and back-state (not keep)) (sd-return-to-model-checkpoint back-state)) :ok-action '() )