;;------------------------------------------* ;; * ;; Copyright 2021/2023 Volker Burkert * ;; * ;; Setzt den Hintergrund WEmaintain * ;; Setzt den Hintergrund auf den Standard * ;; * ;;--------------------------------------------------------------------------* ;; Reference: https://ww3.cad.de/foren/ubb/Forum92/HTML/000994.shtml ;; helpful VP functions: ;; https://support.ptc.com/help/creo_elements_direct/r20.5.0.0/advanced_documentation/integration_kit/reference/inq_vp.html ;;--------------------------------------------------------------------------* ;; changes: ;; 17.04.2023 VPs not sychronzied any more. See IKIT docu & restriction by der_Wolfgang@forum@Cad.de ;; 15.04.2023 create new WHITE VP if needed by der_Wolfgang@forum@Cad.de ;; 14.04.2023 extract function for most VP properties by der_Wolfgang@forum@Cad.de ;;--------------------------------------------------------------------------* (in-package :vobu) (use-package :oli) ;; ob das sinn macht das umzustellen?? (defvar *ootb-anti-aliasing-enabled* (frame2::PRIM-VP-INQ-ANTI-ALIASING-ENABLED)) ; nil (defvar *ootb-anti-aliasing-quality* (frame2::PRIM-VP-INQ-ANTI-ALIASING-QUALITY)) ; :medium (format T "~&OOTB anti-aliasing settings: enabled: ~S with quality: ~S~&" *ootb-anti-aliasing-enabled* *ootb-anti-aliasing-quality*) (sd-defdialog 'SD_Hindergrundfarbe_WEmaintain ;; einfarbig weiss :toolbox-button t :dialog-control :sequential :dialog-title "SD_Hindergrundfarbe_WEmaintain" :ok-action '(let ((this-vp (sd-inq-current-vp)) (white-vp (sd-multi-lang-string "VP White" :german "Fenster Weiß")) ) (elan-ui::set_level_of_detail_factor 21) ;; 1..100 (elan-ui::enable-anti-aliasing t) ;, t/nil (elan-ui::set-anti-aliasing-quality 0) ;; 0|1|2 (unless (find white-vp (sd-inq-vp-names) :test 'equal) ;; mache JETZT den weissen VP mit der anderen anti-aliasing Einstellung (sd-call-cmds (create_vp :maximized :name white-vp)) ) (sd-set-current-vp white-vp) (setq this-vp white-vp) (sd-call-cmds (vp_background :vport this-vp :type :color :color1 :color 16777215 :done)) (set-vp-major-properties this-vp :with-wp nil) ;(sync-and-align-2vps) ) ) (sd-defdialog 'SD_Hindergrundfarbe_Farbverlauf :toolbox-button t :dialog-control :sequential :dialog-title "SD_Hindergrundfarbe_Farbverlauf" :ok-action '(let ((this-vp (sd-inq-current-vp))) (elan-ui::set_level_of_detail_factor 56) ;; 1..100 ;;(elan-ui::set-anti-aliasing-quality 1) ;; 0|1|2 ??? Macht doch keinen Sinn wenn wir es ausschalten!! (elan-ui::enable-anti-aliasing nil) ;, t/nil (sd-call-cmds (vp_background :vport this-vp :type :gradient :3colors :color1 :color 3758447 :done :color2 :color 6522268 :done :color3 :color 13294049 :done)) (set-vp-major-properties this-vp :with-wp T) ;(sync-and-align-2vps) ) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; sounds fine, .. but: ;; NOTE: Make sure to desynchronize the viewports using the function ;; sd-desynchronize-vp before one of them gets deleted. ;; Otherwise the system becomes unstable! ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun sync-and-align-2vps () ;; and sync the 1st two VPs (when (>= (length (sd-inq-vp-names)) 2) (sd-synchronize-vp (car (sd-inq-vp-names)) (cadr (sd-inq-vp-names))) (sd-call-win-command-by-sysid #xE134) ; "Tile &Vert" ) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun set-vp-major-properties (this-vp &key with-wp) (set_vp_capping this-vp :on this-vp :part-color) (SET_SHOW this-vp :3DGEO :ON :3DGEO_SHADED :ON :3DGEO_EDGED :ON :3DGEO_WIRE :OFF :3DGEO_HIDDEN :ON :3DGEO_HIDDEN_DIMMED :OFF :3DGEO_MIXED :OFF :3DGEO_VERTICES :OFF :3DGEO_PART_TRANSPARENCY :ON :3DGEO_FACE_TRANSPARENCY :OFF :3DGEO_FACE_COLOR :ON :3DGEO_PART_REFLECTANCE :ON :3DGEO_FACE_REFLECTANCE :OFF :3DGEO_EDGE_COLOR :OFF ;3DGEO_SHADED (if with-wp :ON :OFF) ;; test :3DGEO_LABEL (if with-wp :ON :OFF) :DOCU_PLANES (if with-wp :ON :OFF) :COORD_SYSTEM (if with-wp :ON :OFF) :CLIP_PLANES (if with-wp :ON :OFF) :CLIP_LINES (if with-wp :OFF :ON) ;; !!! :CLIP_HATCHES :ON :FEATURE_PTS :ON :WORKPLANES (if with-wp :ON :OFF) :WORKPLANES_BORDER (if with-wp :ON :OFF) :WORKPLANES_LOCAL_AXIS :OFF :WORKPLANES_LABEL :ON :WORKPLANES_DIM_INACTIVE :OFF :WORKPLANE_SETS_MATCH_LINES :ON :WORKPLANES_2DGEO :ON :WORKPLANES_2DCONSTRUCTION (if with-wp :ON :OFF) :WORKPLANES_2DGEO_VERTICES :OFF :WORKPLANES_2DGEO_LABEL (if with-wp :ON :OFF) :WORKPLANES_HIDDEN :ON :WORKPLANES_2DGEO_COLOR :ON :WORKPLANES_2DGEO_LINE_TYPE :ON ) ) ;; bis alles funktioniert : gucken was abgeht: (sd-show-console-window) (trace elan-ui::set_level_of_detail_factor elan-ui::enable-anti-aliasing elan-ui::set-anti-aliasing-quality) (trace SD_Hindergrundfarbe_WEmaintain SD_Hindergrundfarbe_Farbverlauf set-vp-major-properties SET_SHOW set_vp_capping OLI:SD-DISPLAY-ALERT)