08-27-2025, 03:56 PM
(This post was last modified: 08-27-2025, 03:57 PM by Dragos Pal.)
Good day.
I would like to know what would the best practices for the following scenario:
I have an object with a size bigger than 10k units (basically far away).
I want to subtract from it a few smaller objects using boolean operations.
The mesh of the big object gets corrupted.
Example: A big cube, from which we subtract a few smaller cylinders. The cylinders pass fully through the cube.
My Approach on fixing this: Downscaling the objects, performing the subtraction, upscaling back.
Questions:
1. Is AB4D optimised more for smaller numbers ( smaller than 1 ) when making boolean operations?
2. Are boolean operations the best way of subtracting one object from another in AB4D ?
Thanks a lot!
I would like to know what would the best practices for the following scenario:
I have an object with a size bigger than 10k units (basically far away).
I want to subtract from it a few smaller objects using boolean operations.
The mesh of the big object gets corrupted.
Example: A big cube, from which we subtract a few smaller cylinders. The cylinders pass fully through the cube.
My Approach on fixing this: Downscaling the objects, performing the subtraction, upscaling back.
Questions:
1. Is AB4D optimised more for smaller numbers ( smaller than 1 ) when making boolean operations?
2. Are boolean operations the best way of subtracting one object from another in AB4D ?
Thanks a lot!
Code:
var downScale = new StandardTransform(scale: MeshCalculatorConstants.ScalingFactor);
mesh = MeshUtils.TransformMesh(mesh, downScale);
var holesMeshes = _holeMeshCalculator.CalculateHolesMeshes(piece, pieceXDirection);
holesMeshes = MeshUtils.TransformMesh(holesMeshes, downScale);
mesh = MeshBooleanOperations.Subtract(mesh, holesMeshes, true, true);
var upScale = new StandardTransform(scale: 1 / MeshCalculatorConstants.ScalingFactor);
mesh = MeshUtils.TransformMesh(mesh, upScale);
