area515 / Photonic3D

Control software for resin 3D printers
http://photonic3d.com
GNU General Public License v3.0
133 stars 115 forks source link

Ability to test calculators when certain printer functions are disabled #132

Open WesGilster opened 8 years ago

WesGilster commented 8 years ago

I just tried to setup the printer in a situation where the $buildAreaMM isn't supported by the print processor. This is kindof tough because you have to explicitly set the $buildAreaMM to NaN to simulate this that happening in your test. A perfect time to fix this will be with bug#125.

WesGilster commented 8 years ago

Here is an example of what I did: var value = 0.25;

if ($CURSLICE > $NumFirstLayers && $buildAreaMM != java.util.Double.NaN) { if ($buildAreaMM > 1000) { value = 1.0; } else { value = 4.6666666666666705e+000 * Math.pow($buildAreaMM,0) + -7.0000000000000184e-003 * Math.pow($buildAreaMM,1) + 3.3333333333333490e-006 * Math.pow($buildAreaMM,2); } } value

WesGilster commented 8 years ago

to test, $buildAreaMM you currently have to hack this like this: var value = 0.25; $buildAreaMM = java.util.Double.NaN; if ($CURSLICE > $NumFirstLayers && $buildAreaMM != java.util.Double.NaN) { if ($buildAreaMM > 1000) { value = 1.0; } else { value = 4.6666666666666705e+000 * Math.pow($buildAreaMM,0) + -7.0000000000000184e-003 * Math.pow($buildAreaMM,1) + 3.3333333333333490e-006 * Math.pow($buildAreaMM,2); } } value