Fix mirror modeling counting meshes with 1e-15 X origin as off-center

This commit is contained in:
JannisX11 2024-03-20 20:31:13 +01:00
parent 4fb7bec299
commit 3ddf9c8c2f

View File

@ -2,8 +2,8 @@ const MirrorModeling = {
initial_transformer_position: 0,
isCentered(element) {
let center = Format.centered_grid ? 0 : 8;
if (!element.to && element.origin[0] != center) return false;
if (element.rotation[1] || element.rotation[2]) return false;
if (!element.to && Math.roundTo(element.origin[0], 3) != center) return false;
if (Math.roundTo(element.rotation[1], 3) || Math.roundTo(element.rotation[2], 3)) return false;
if (element instanceof Cube && !Math.epsilon(element.to[0], MirrorModeling.flipCoord(element.from[0]), 0.01)) return false;
let checkParent = (parent) => {