Repository navigation
Replies: 1 comment 1 reply
|
Hi,
BooleanResultMapper mapper;
auto res = boolean( blue, white, BooleanOperation::DifferenceAB, { .mapper = &mapper } );
FaceBitSet redInResult = mapper.map( red, BooleanResultMapper::MapObject::A );In your picture, though, the cube overlaps the red region. auto [redHit, whiteHit] = findCollidingTriangleBitsets( { blue, &red }, white );
// redHit.any() == true -> the operation will change the protected areaIf what you want is "subtract the white model everywhere except near the protected area", cut the protected zone out of the white model first: Mesh redPatch = blue.cloneRegion( red );
Mesh guard = makeThickMesh( redPatch, { .outsideOffset = 0.1f, .insideOffset = depth } );
Mesh whiteTrimmed = *boolean( white, guard, BooleanOperation::DifferenceAB );
auto res = boolean( blue, whiteTrimmed, BooleanOperation::DifferenceAB, { .mapper = &mapper } );Then the red surface, and the material up to If your intended result is different, could you describe or sketch it? |

Hi,
booleanonly re-triangulates the triangles crossed by the surface of the other mesh. Every other triangle of mesh A goes into the result unchanged; it only gets a new FaceId. So the red triangles stay exactly as they are as long as the white model does not cross them. To find them in the result, pass aBooleanResultMapper:In your picture, though, the cube overlaps the red region.
blue - whiteremoves everything inside the cube, so the red triangles under the cube have to be cut. No boolean …