(in-package :EXAMPLES) (use-package :OLI) ;;============================= (sd-defdialog 'sas_Formkompensator_horizontal :dialog-title "Formkompensator horizontal" :variables '( (WP :value-type :wp :title "Arbeitsebene" :prompt-text "AE angeben" :initial-value (sd-inq-curr-wp) :after-input (progn (sd-set-variable-status 'Form_X :enable nil) (sd-set-variable-status 'Form_Y :enable nil)) ) (MPKT :value-type :point-2d :Title "Mittelpunkt" :Prompt-text "Mittelpunkt angeben" ) ("Abstände") (Arbhoehe :value-type :length :title "Arbeitshöhe (mm)" :initial-value 116 :prompt-text "Arbeitshöhe in (mm)" ) (versatz_Therm_X :value-type :length :title "Versatz in X(mm)" :initial-value 50.0 :prompt-text "Versatz in der Breite (mm)" ) (versatz_Therm_Y :value-type :length :title "Versatz in Y(mm)" :initial-value 50.0 :prompt-text "Versatz in der Tiefe (mm)" ) (Abstand_Therm :value-type :length :title "Umlauf. Abstand Therm.(mm)" :initial-value 5.0 :prompt-text "Umlaufender Abstand um Thermobarriere in (mm)" ) (Abstand_WB :value-type :length :title "Umlauf. Abstand WB.(mm)" :initial-value 1.0 :prompt-text "Umlaufender Abstand um Ausschnitt Wechselboden in (mm)" ) ("Thermobarriere") (therm_X :value-type :length :title "Breite Thermob. (mm)" :prompt-text "Breite der Thermobarriere in (mm)" ) (therm_Y :value-type :length :title "tiefe Thermob. (mm)" :prompt-text "Tiefe der Thermobarriere in (mm)" ) ("Ausschnitt Wechselboden") (Form_X :value-type :length :title "breite Ausschnitt WB. (mm)" :prompt-text "Breite Ausschnitt Wechselboden in (mm)" ) (Form_Y :value-type :length :title "tiefe Ausschnitt WB. (mm)" :prompt-text "Tiefe Ausschnitt Wechselboden in (mm)" ) ("") (Formkomp-erzeugen :Title "erzeugen" :push-action (sas_Formkomp) ) ) :local-functions '( (sas_Formkomp () (sd-call-cmds (create_wpset :name "Formkompensator" :owner "/")) (sd-call-cmds (CREATE_WORKPLANE :copy :name "Formkompensator_Thermo" :owner "/Formkompensator" :source WP)) (sd-call-cmds ;; pseudolinie damit Delete_2d nicht in Fehler laeuft (progn (line :two_points (make-gpnt2d :x 0 :y 0) (make-gpnt2d :x 100 :y 0)) )) (sd-call-cmds (slide_wp_origin "/Formkompensator/Formkompensator_Thermo" MPKT)) (sd-call-cmds (CREATE_WORKPLANE ; Vorhandene AE kopieren :copy :name "Formkompensator_WB" :owner "/Formkompensator" :source WP)) (sd-call-cmds (position_wp "/Formkompensator/Formkompensator_WB" :PAR_WP :REF_WP WP :OFFSET (+ Arbhoehe) :done )) (sd-call-cmds (slide_wp_origin "/Formkompensator/Formkompensator_WB" MPKT)) (sd-call-cmds (DELETE_2D :all_2d)) (sd-call-cmds (current_wp "/Formkompensator/Formkompensator_Thermo")) (sd-call-cmds (DELETE_2D :all_2d)) (sd-call-cmds (progn (let ( X1 X2 Y1 Y2 ) (setq X1 (- Abstand_Therm )) (setq Y1 (- Abstand_Therm )) (setq X2 (+ therm_X Abstand_Therm )) (setq Y2 (+ therm_Y Abstand_Therm)) (line :two_points (make-gpnt2d :x X1 :y Y1) (make-gpnt2d :x X2 :y Y1)) (line :two_points (make-gpnt2d :x X1 :y Y2) (make-gpnt2d :x X2 :y Y2)) (line :two_points (make-gpnt2d :x X1 :y Y1) (make-gpnt2d :x X1 :y Y2)) (line :two_points (make-gpnt2d :x X2 :y Y1) (make-gpnt2d :x X2 :y Y2)) );;let );; progn );;sd-call-cmds Ende Zeichnen Rechteck um Thermobarriere (sd-call-cmds (current_wp "/Formkompensator/Formkompensator_WB")) (sd-call-cmds (progn (let ( X3 X4 Y3 Y4 ) (setq X3 (- versatz_Therm_X)) (setq Y3 (- versatz_Therm_Y )) (setq X4 (+ therm_X versatz_Therm_X)) (setq Y4 (+ therm_Y versatz_Therm_Y)) (line :two_points (make-gpnt2d :x X3 :y Y3) (make-gpnt2d :x X4 :y Y3)) (line :two_points (make-gpnt2d :x X3 :y Y4) (make-gpnt2d :x X4 :y Y4)) (line :two_points (make-gpnt2d :x X3 :y Y3) (make-gpnt2d :x X3 :y Y4)) (line :two_points (make-gpnt2d :x X4 :y Y3) (make-gpnt2d :x X4 :y Y4)) );;let );; progn );; sd-call-cmds Ende Zeichnen Rechteck um Ausschnitt Wechselboden (sd-call-cmds (CREATE_MATCH_LINE)) );; ende sas_Formkomp );;ende local-functions :ok-action '() ) ;; ende dialog