• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

change angle faces

Gino4732984723ç°

Guest
hello to all, I made a macro that exports a part in different formats, including step, iges, sat and among them also in stl.
only that on the part of the stl, the macro should copy the part and in the copied object adjust the angle of the faces to 2 and then export the file with the stl extension.
does everything, only that does not change the angle of the faces and leaves that set by default.. .
I leave you the code of the lisp:
Code:
(in-package :salva)
(use-package :oli)

(setq cam (format nil "~a/salvataggi automatici annotation/cam" oli::*bizzotto-temp*))

(sd-defdialog 'salva_file_cam
:dialog-title "salva file per cam"
:toolbox-button t
:variables '(   
    (particolare :selection (*sd-assembly-seltype* *sd-part-seltype*)
                 :multiple-items t
                 :show-select-menu t
                 :title "parte/gruppo"
                 :after-input
(progn (setf lista (list))
(dolist (x particolare)
(if (string= "nil" (write-to-string (sd-inq-obj-contents-name x)))
(progn (sd-display-error "una delle parti selezionate non e' codificata!")
(clear_vp (oli::sd-inq-current-vp))
(add_to_vp_drawlist (oli::sd-inq-current-vp) x)
(fit_vp (oli::sd-inq-current-vp) update_screen)
(sd-display-error "questa e' la parte non codificata!
n.b: questa parte non sara' esportata!"))
(progn(push x lista))))))

    ("formato")

    (step :toggle-type :wide-toggle
          :title "step"
          :push-action (dolist (nome lista)
(step_export :select nome :filename (format nil "~a/~a.step" cam (sd-inq-obj-contents-name nome)) :overwrite)))

    (iges :toggle-type :wide-toggle
          :title "iges"
          :push-action (dolist (nome lista)
(native_cad_out :cad_system :igesdek :parts nome :filename (format nil "~a/~a.igs" cam (sd-inq-obj-contents-name nome)) :overwrite)))

    (sat  :toggle-type :wide-toggle
          :title "sat"
          :push-action (dolist (nome lista)
(save_sat :select nome :filename (format nil "~a/~a.sat" cam (sd-inq-obj-contents-name nome)) :overwrite)))

;07/09/2022 - toniolo s. - aggiunta export in formato .stl

    (stl :toggle-type :wide-toggle
         :title "stl"
         :push-action (dolist (nome lista)
         (sd-call-cmds    (create_multiple_pa    :copy
                                            :onelevel :on
                                            :source particolare
                                            :owner /)
                        )
:the_part :start (sd-inq-curr-part) :select_done
:ang_err 2       
;(stl :parts_assemblies(sd-inq-curr-part) :yes :file (format nil "~a/~a.stl" cam (sd-inq-obj-contents-name nome)) :overwrite)))
)))
:local-functions '()
:ok-action '()
:help-action '())
 
Given that I feel great admiration for those who can create lisp, I can not even change those I find online, I must say that on the definition of stl format can not be indispensable the number of faces or its angle (the old surftab variables of autocad); I try to explain myself better: in fact I used the stl format only to generate files compatible with the 3d printer though varying the setting of the stl file at the time of export and also obtaining size of the file considerably different depending on the greater or less definition, when they were switched in the format of the 3d sharebot printer with software support simplify3d the proprietary file had the same size and also the result of the print was quite analogous though born from stl of different.
So I believe that in the end, if stl export serves for 3d printing, the failure of that lisp part is not fundamental.
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top