#| *--------------------------------------------------------------------------* * Copyright 2007 Michael Mueller, PTB Braunschweig * * * *--------------------------------------------------------------------------* * Dateiname: AEinSchwerpunkt.lsp * Version : 1.1, Name vergeben * Datum : 29.11.2007 * Author : MM * Programm zum Erstellen einer AE mit Ursprung im Schwerpunkt von wählbaren Teilen ;;-------------------------------------------------------------------------- ;; Aenderung: ; der_Wolfgang - forum - cad.de ;; Version: ; 1.2 (mar2008) ;; messages EN/DE ;; create c lines made optional ;;-------------------------------------------------------------------------- ;;-------------------------------------------------------------------------- ;; Aenderung: ; Walter Geppert - forum - cad.de ;; Version: ; 1.3 (nov2014) ;; optional tolerance added ;;-------------------------------------------------------------------------- |# (in-package :my-package) (use-package :oli) (sd-defdialog 'ae_in_SP :dialog-title '(sd-multi-lang-string "WP at Centroid" :german "AE in Schwerpunkt") :toolbox-button t :variables '( (Teile :value-type :part-assembly :multiple-items t :title (sd-multi-lang-string "Parts" :german "Teile") :prompt-text (sd-multi-lang-string "Specify parts to get centroid of." :german "Teile angeben") :modifies nil ) (Normale :title (sd-multi-lang-string "Normal" :german "Normale") :value-type :measure-direction :initial-value nil ) (Lines :value-type :boolean :toggle-type :wide-toggle :title (sd-multi-lang-string "C lines at axes" :german "Linien auf Achsen zeichnen") :initial-value T ) (Rough :value-type :boolean :toggle-type :wide-toggle :title (sd-multi-lang-string "rough" :german "Grob") :initial-value T ) (Tol :value-type :number :toggle-type :indicator-toggle-data :title (sd-multi-lang-string "percent" :german "Prozent") ) ) ;end Variables :mutual-exclusion '((Rough Tol)) :ok-action '(los-gehts) :local-functions '( (los-gehts () ;(display Normale) ;(dolist (teil Teile) ;(display (sd-inq-obj-pathname teil)) ;) (progn (sd-call-cmds (create_workplane :new :NAME (sd-gen-obj-basename :workplane :prefix (sd-multi-lang-string "WP-Centroid" :german "AE-Schwerpunkt")) :pt_dir :origin (if Tol (sd-call-cmds(get_vol_prop :for_part :tol :percent_tol Tol :part Teile :select_done :centroid)) (sd-call-cmds(get_vol_prop :for_part :part Teile :select_done :centroid)) ) :normal (first Normale))) (when Lines (sd-call-cmds (c_line_inf :horizontal 0)) (sd-call-cmds (c_line_inf :vertical 0)) (sd-call-cmds (GEOMETRY_MODE :CONSTRUCTION)) ) ) ) ;end los-gehts ) ;end local functions ) ;end sd-defdialog