Explode Object component ignores blocks with invalid content

After reading this topic, I thought I should mention this problem I experienced just recently.

The file I was working with is a building which was converted from *.ifc
It contains blocks, meshes and breps. One mesh in a block is invalid.

Since I was just going to shrinkwrap all geometries in the file, I thought I would simply use the Eplode Object component. Unfortunately the component fails to output anything if a branch contains an invalid mesh.

This can be problematic on large files with a lot of geometries.

I cannot share my clients file. Here’s an example with another mesh:

block_invalid_explode_problem.gh (19.1 KB)

in this particular case you can check the mesh for degenerate faces and reconstruct the mesh

this is done by custom script (i think there’s a rhinocommon function that does that, but i forget)

double click on the c# script for details
block_invalid_explode_problem[partial_fix].gh (24.2 KB)

I think a more robust version is possible, like checking face degeneracy by tolerances, but for now, i think this stands as a proof of concept

alas, here it is
CullDegenerateFaces()

Thanks for the cull degenerate faces script.

Nevertheless I’m not sure if the current behavior of the explode component is on purpose and I’m hoping someone from McNeel can take a look.

@kike is this something for you?

one explanation i could find for that behaviour is that the meshsphere ex component create 6 different meshes


observe the seams

if you explode the baked mesh in rhino, it gives you 6 meshes


so even if you manually introduce a degenerate face in the meshsphere ex mesh, you still end up with the same seams

the real question is why the regular explode component in grasshopper doesn’t give you 6 meshes as manually exploding it in rhino

Adel, forget the mesh. Please. I’m not looking for a solution to fix the mesh.

@kike or @AndyPayne is this behaviour intended? Couldn’t the explode component output the invalid mesh?

I spoke with Kike and we both agree that it would not be the correct behavior to switch the explode component to return invalid objects. We feel that it is better to only return valid objects and make the user aware if there are invalid objects that were not exploded. To this end, the explode component will now return a warning if an invalid object is passed into the explode component with some additional information as to why that particular object was failing to return anything.

However, to ultimately get at a list of objects that represent what it is that you are after, it is possible to use a the Null Item component in tandem with a Pick N Choose component to reconstruct the list of objects. I’ve attached an example below.


block_invalid_explode_problem_AP.gh (16.8 KB)

1 Like

Thanks Andy I think this is a good solution.