View Single Post
  #2  
Old 08-27-2002, 07:36 PM
Walter Geppert
Guest
 
Posts: n/a
re: LISP change hole in a sd-defdialog

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.