Sorry, I was experimenting, to find a solution, and forgot to delete the code, it was difference.
adding this code to my code above modifying the subtract with difference :
I obtained this file:
Code: Select all
faces = [
It list the faces that survived to the difference operation. not many.
But why to use a mesh when you could define a proper solid?
Mesh is not well suited for operating on them, A Mesh only define the external surface of an object, it is a handy format to define complex structures, or to be more correct, it was a workaround to describe something in space, they are very popular, as graphic cards and graphics processor are built to deal with triangles, and a mesh is a bunch of connected triangles.
In fact in the page describing the Mesh module there is this warning.
However, in the field of engineering meshes present one big limitation: they are only made of surfaces, and have no mass information, so they don't behave as solids. This means that all solid-based operations, such as addition or subtraction, are difficult to perform on meshes.
I suspect that the boolean operation of difference is more tailored to subtract two coincident surfaces, eliminating the overlapping, when subtracting the cylinder to the sphere, the sphere mesh became not-manifold, although the visualization is completely wrong, so something in the algorithm is not correct.
What are you trying to achieve?