Photonic3D icon indicating copy to clipboard operation
Photonic3D copied to clipboard

Ability to test calculators when certain printer functions are disabled

Open WesGilster opened this issue 9 years ago • 2 comments

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 avatar Feb 07 '16 18:02 WesGilster

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 avatar Feb 07 '16 18:02 WesGilster

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

WesGilster avatar Feb 07 '16 18:02 WesGilster