PDA

View Full Version : LISP change hole in a sd-defdialog


Klaus Andersen
08-26-2002, 08:06 PM
I am trying to change radius in the same sd-defdialog, as I make thread in. But my change hole fail. Does anyone now the right syntax ? I want to change hole on the "xface" to dia/2 (in-package :your-package) (use-package :oli) (sd-defdialog 'udv_gevind :dialog-title "Udvendig gevind" :variables '((xface :value-type :face :title "xface" :prompt-text "vælg xface") (dia :value-type :number :title "Gevindstørrelse" :prompt-text "Gevindstørrelse") (stigning :value-type :number :title "GevindStigning") ) :ok-action '(sd-call-cmds (change_hole :check :keep_tangent :no :blend_auto :yes :update_rels :yes :faces xface :hole_radius (* dia .5)) (SD-DEFINE-THREAD xface :nominal-diameter dia :pitch stigning :core-diameter (- dia stigning) :thread-type :INNER :thread-unit :METRIC :thread-color 0.3,0.3,1 :include-chamfer T :thread-profile :M :thread-direction 0.0,0.0,-1.0)) )

Walter Geppert
08-27-2002, 07:36 PM
Hi Klaus, here is a way it should go. Since the formatting gets lost, i will send you the file as an email also. (in-package :your-package) (use-package :oli) (sd-defdialog 'udv_gevind :dialog-title "Udvendig gevind" :variables '( (xface :selection (*sd-cylinder-seltype*) :multiple-items nil :modifies :contents :title "xface" :prompt-text "vælg xface") (dia :value-type :number :title "Gevindstørrelse" :prompt-text "Gevindstørrelse") (stigning :value-type :number :title "GevindStigning") ) :ok-action '(progn (sd-call-cmds (change_hole :check :keep_tangent :no :blend_auto :yes :update_rels :yes :faces xface :hole_radius (* (- dia (* 1.22687 stigning)) .5))) (SD-DEFINE-THREAD xface :nominal-diameter dia :pitch stigning :thread-type :INNER :thread-unit :METRIC :thread-color 0.3,0.3,1 :include-chamfer T :thread-direction :CYL-AXIS) );;progn ) There are some additional remarks: According to our expirience, it is good practice to use the real theoretic core-diameter for threaded holes as specified in the integration kit instead of more coarse numbers as they are used in "classic" 2D-drawings. Anyway the 3D-hole has to get the core-diameter. If the thread does not go the whole lenght of the hole, there should be a minimal difference in diameter to get a clear topological structure like a cylindrical countersunk. In our company, the drilled hole is 0.999*core, which works well.

Klaus
09-02-2002, 08:32 PM
Thanx it work, i have putted it in face preselection dialog. great