Thanks @manthrax. I tried it using cylinderGeometry before I tried the bone stl. It worked. The bone did not. Now I tried a coarse stl of a cylinder. All my attempts result in a blank screen. I also tried mergeVertices.
This works using the cylindergeometry instead of the stl…
<mesh>
<Geometry useGroups showOperations>
<Base>
<cylinderGeometry args={[10, 10, 100, 64, 64]} />
<meshPhysicalMaterial color={`green`} />
</Base>
<Subtraction position={[10, 0, 0]}>
<sphereGeometry args={[20, 10, 10]} />
<meshPhysicalMaterial color={`red`} />
</Subtraction>
</Geometry>
</mesh>
This does not. getGeometry() returns the buffer geometry.
<mesh>
<Geometry useGroups showOperations>
<Base geometry={getGeometry()}>
<meshPhysicalMaterial color={`green`} />
</Base>
<Subtraction position={[10, 0, 0]}>
<sphereGeometry args={[20, 10, 10]} />
<meshPhysicalMaterial color={`red`} />
</Subtraction>
</Geometry>
</mesh>
This also does not. group was loaded using the stl loader.
<mesh>
<Geometry useGroups showOperations>
<Base>
<primitive object={group} />
<meshPhysicalMaterial color={`green`} />
</Base>
<Subtraction position={[10, 0, 0]}>
<sphereGeometry args={[20, 10, 10]} />
<meshPhysicalMaterial color={`red`} />
</Subtraction>
</Geometry>
</mesh>
I also tried replacing the primitive with…
<bufferGeometry>
<bufferAttribute
attach="attributes-position"
array={bufferGeometry.attributes.position.array}
count={bufferGeometry.attributes.position.array.length / 3}
itemSize={3}
/>
<bufferAttribute
attach="attributes-normal"
array={bufferGeometry.attributes.normal.array}
count={bufferGeometry.attributes.normal.array.length / 3}
itemSize={3}
/>
</bufferGeometry>
And…
<bufferGeometry attach={`geometry`} {...getGeometry()} />
And this is the image with showOperations. It is the same for all of the above variations.