Open WesGilster opened 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
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
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.