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:
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 '())