Closed Theyiot closed 5 months ago
The solution was to modify the function handle_mesh()
, defined in the function load_kwargs()
in the file "exchange/load.py" to return Trimesh(**kwargs, process=False)
. By default, process is set to True
and the overlaping vertices are merged together. Setting this parameter to False
prevent Trimesh to do so.
In my case, the default behaviour seems strange. But there are probably a good reason to do so.
Hey, I am using Trimesh to compute the boolean union of a mesh containing multiple closed volumes that intersect. First, I had some issue when some edges were overlapping and the mesh would become not watertight. I solved this issue using the code proposed by @mikedh in the issue #145 opened by @Marviel, namely:
This code works well and the meshes with overlapping vertices are watertight, as expected. However, I have an example (see archive below) for which two sheared cylinders are watertight but the
split()
function returns an empty array. In the zip file, you have the overlapping mesh (Failing.obj) and a slightly shifted one (Working.obj).For completeness, I tried a minimal example where two parallelepiped intersect on one end (also in the archive). At first it failed as well, because the mesh was not considered watertight. But with the modification of the script, this example now works fine and can be split as expected.
Why does that happen ? Ideally there should be no constraints on the input volume. Thanks !
Examples.zip