getEntityName empty string for multibody parts
Hello,
I appreciate your time and effort reading my issue.
I save a step file of a solidworks assembly consisting of subassemblies, parts with a single body, and parts with multiple bodies. The part name (string) is whats important. Ultimately, my goal is to load in a step file with gmsh python and occ.fuse together volume entities that belong to the same part (thus converting multibody parts into single body parts), and be able to identify which part string corresponds to each volume entity. The function getEntityName is able to identify the part string for each volume entity (i.e. for each body) except for the bodies belonging to a multibody part. For those volume entities, it returns an empty string ('').
In the provided example, the step file 'cubepivotassm4.STEP' contains parts including two multibody parts, each with two bodies, that are touching each other. getEntityName produces:
['cube3', 'SphereIndent', 'cube_translated', 'cube_translated', 'cube3', 'SphereIndent', 'cube_translated', '', '','','']
which correctly identifies the non-multibody parts, but not the multibody parts, for which it returns four empty strings ('') for each volume entity. So now its impossible to identify which body belongs to which part. (I am of course using this step file in a general sense to demonstrate the problem.)
If I manually select the volume entity tags to fuse the multibodies together, I get this:
['cube3', 'SphereIndent', 'cube_translated', 'cube_translated', 'cube3', 'SphereIndent', 'cube_translated', 'cubeMultiBody', 'cubeMultiBody']
which correctly grabs the part names of the two multibody parts ('cubeMultiBody'). So it seems getEntityName can only return the part string if the volume entity entirely composes the part.
This is a problem for me because I have no other way of identifying which volume entity belongs to the original part hierarchy besides the part string. The part string in particular is important due to some post processing step where I basically need to have a table of each volume entity and its corresponding part string to match up to another file.
Its clear that the OCCImportLabel is stored somewhere (it displays at the terminal as labels), but its just not being output in getEntityName. Would you have any ideas for how to fix this issue? Thank you very much.