Suspect rounding issue while debugging preview render glitch

I observed a problem with the rendered preview, which lead me to a rounding error somewhere. Unsure if the preview glitch is related to the rounding problem.

It can be reproduced with these items on the scene, material thickness does not appear to matter And I also discovered that the unit doesn’t matter either.

  • 50mm x 50mm square, cut outline, no tabs, full depth, with left bottom corner at 10mm x 10mm.
  • 10mm x 10mm square, depth 0.5mm, with right bottom corner aligned at 60.0mm x 25.0mm.

The preview glitch is now visible: the 2nd item causes a rendering glitch that appears to affect the outline cut of the other item. The simulated path looks fine, so I won’t expect problems cutting it.

But being curious, I entered 59.9mm as X offset, and the glitch went away. Then I entered 59.99, and the glitch went away – but the value in the box is rendered as ‘60.0 mm’ (the value initially used when the rendering glitch occurred). Of course, when I enter ‘60’ to force-change that value, the render glitch re-appears.

The input field appears to round the 59.99 value to render 60.0, while the rest of the interface still seems to hang on to the un-rounded 59.99 value.

(BTW, regarding the preview glitch, when trying to replicate this with “inches” as the unit, I observed something interesting. I put a 5" by 5" with lower left corner at 1" x 1", with a smaller 2" x 2" item, with the right side aligned to its right side at 5.9999 inch. The glitch is visible. If you change to 5.998 the size of the glitch changes, at 5.9997 you still see a teensy thing that should not be there. So that’s… well… interesting. :slight_smile:)

Hi Hugo,

Do you have a picture of the “glitch” or a link to an Easel project that you can share?

Oh, PS, Easel will round metric fields to one decimal place for display, but will keep the exact number behind the scenes for use in calculations.

I did not know this… is there a reason it rounds in the display? Can it be changed to NOT round in the display?

The reason we round it is because hundredths of a millimeter are beyond the tolerance of the machine. We certainly could change how many decimals we round things to for display. How would you like to see it changed and what use cases do you have in mind that would benefit from that change?

This is the relevant project, currently showing the glitch:

Changing how many decimals are rounded to, does not fix the underlying problem at all. That’s a symptom you are suggesting to fix. I.e. a non-fix.

If it decides to round values, all good. But it must do so /right after/ the input has been received. Then internally, the value is the same for all components.

Remember, the graphical part is supposed to be a reflection of the internal state. Right now it simply is not.