;http://osd.cad.de (in-package :MN) (use-package :OLI) (sd-defdialog 'hilfsbolzen_erzeugen :dialog-title "3D Hilfsbolzen" :help-action '(sd-display-message "Der Hilfsbolzen dient als Hilfe bei der Positionierung von kompliziert geformten Bauteilen. Zum Beispiel zur Ausrichtung von Gussteilen.") :variables '( (NULLPUNKT :toggle-type :boolean :title "im Nullpunkt" :push-action (nullpunkt)) ("-") (URSPRUNG :value-type :point-3d :title "Ursprung") (RICHTUNG :value-type :measure-direction :title "Richtung") ("-") (KEEP_WP :value-type :boolean :toggle-type :wide-toggle :title "Arbeitsebene behalten" :initial-value t) ;wenn immer keine AE, dann t gegen nil tauschen ) :ok-action '(hilfsbolzen) :local-functions '( (hilfsbolzen () (sd-call-cmds (create_workplane :new :pt_dir :origin URSPRUNG :normal RICHTUNG)) (sd-call-cmds (uic_c_line_cross 0,0)) (sd-call-cmds (c_circle :cen_dia 0,0 30)) (sd-call-cmds (geometry_mode :real)) (sd-call-cmds (polygon 10,0 0,0 0,10)) (sd-call-cmds (arc :3_pos 0,10 10,0 -10,0)) (sd-call-cmds (extrude :part "/Hilfsbolzen" :distance 50 :keep_profile :no :KEEP_WP (if KEEP_WP :yes :no))) (sd-call-cmds (part_prop "/Hilfsbolzen" :base_density 0.0001 :base_color 10276015 :done :base_trans :semi)) ) (nullpunkt () (setq URSPRUNG 0,0,0) (setq RICHTUNG (list 0,0,1)) ) ))