PDA

View Full Version : Cost estimation for laser cutting


papadam
02-05-2015, 01:49 AM
There is this great function in CED's (v17, soon migrating to v19) sheet metal tool for calculating cost. The parameters behind it are saved in sha_costmodel.lsp

But the tool does not calculate the laser cutting cost. Has anyone already modified the tool in order to do that?

What I intend: enter the cutting cost per mm in sha_costmodel.lsp and in the report you get the cost for the whole part.

papadam
03-04-2015, 12:33 AM
This is how I solved the problem now:


(partname (flat-statistics-sd-partname sta)) ; existing line in let
(pathname (marabou::flat-statistics-sd-pathname sta)) ;line added by me

Then somewhere below:
(setq area (sd-call-cmds (get_vol_prop :for_part :part (string-trim "\"" pathname) :area)))
(setq volume (sd-call-cmds (get_vol_prop :for_part :part (string-trim "\"" pathname) :volume)))
(setq laser-len (/ (- area (* 2 (/ volume thickness))) thickness))

The variable laser-len can then be used for further calculations or direct display in the document. Thanks Andy for the hint with get_vol_prop!