Currently, I am working in a .Stl editor on Three.js and I am facing the challenge of aligning my imported .Stl files to the grid properly. The issue is that they are ending up either partially above or below the grid, instead of sticking right onto it. I need a way to determine if the lowest part of the object is touching the grid.
The problem lies in the fact that the only position information I have from the files is their origin point, which is usually located at the center but not always. As a result, when I place this origin point at Y = 0 (the grid's y position), sometimes part of the object ends up lower than the grid (taking into account rotation and resizing options).
Does anyone have any suggestions or solutions for this issue?