;http://osd.cad.de (use-package :OLI) (sd-defdialog 'hilfsbolzen_erzeugen :dialog-title (sd-multi-lang-string "3D Auxiliary Bolt" :german "3D Hilfsbolzen") :toolbox-button t :help-action '(sd-display-message (sd-multi-lang-string "The auxiliary bolt can help by setting parts into proper position." :german "Der Hilfsbolzen dient als Hilfe bei der Positionierung von kompliziert geformten Bauteilen. Zum Beispiel zur Ausrichtung von Gussteilen.")) :variables '( (PICTURE :value-type :image :image-file "D:/CAD/Lisps/hilfsbolzen.bmp" :image-width 135 :image-height 75 :image-alignment :center) ("-") (NULLPUNKT :toggle-type :boolean :title (sd-multi-lang-string "at origin" :german "im Nullpunkt") :push-action (nullpunkt)) ("-") (URSPRUNG :value-type :point-3d :title (sd-multi-lang-string "origin" :german "Ursprung")) (RICHTUNG :value-type :measure-direction :title (sd-multi-lang-string "direction" :german "Richtung")) ("-") (KEEP_WP :value-type :boolean :toggle-type :wide-toggle :title (sd-multi-lang-string "keep workplane" :german "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 (sd-multi-lang-string "/auxiliary" :german "/Hilfsbolzen") :distance 50 :keep_profile :no :KEEP_WP (if KEEP_WP :yes :no))) (sd-call-cmds (part_prop (sd-multi-lang-string "/auxiliary" :german "/Hilfsbolzen") :base_density 0.0001 :base_color 10276015 :done :base_trans :semi)) (sd-call-cmds (fit_vp (oli:sd-inq-current-vp) update_screen)) ) (nullpunkt () (setq URSPRUNG 0,0,0) (setq RICHTUNG (list 0,0,1)) ) ))