- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I need to remove faces from a body (completely; that is, SurfaceDeleteFaceFeature, not DeleteFaceFeature) while keeping track of all the fragment bodies this operation might create.
For example, if you start with a solid cube and remove any belt of four faces, you end up with two surface bodies. I just want to be able to say, "Here are all the bodies that were modified or created by this SurfaceDeleteFaceFeature."
In theory, SurfaceDeleteFaceFeature has a 'bodies' property that supplies this exact information. However, in practice it seems to always be an empty list, whether the body splits or not. The 'faces' property is always empty as well.
The deletion itself seems to work fine and shows the correct results in the UI. The feature returns True for isValid.
I've tried a couple of other approaches, but so far nothing has yielded results. There's a vague suggestion in the docs that searching for the body's original entityToken might return multiple fragment bodies after a split, but I'm only getting zero or one object back. I also tried manually labeling the body with an attribute, but only one fragment retains the attribute after the split. Actually, the docs seem pretty explicit that splits should copy attribute values, so this makes me wonder if this sort of implicit backdoor split is bypassing the modeling kernel's normal split processing.
I suppose I could apply an attribute to all of the body's faces and then trace the faces back to their resulting bodies, but that's kind of ugly. Also, in the context I'm targeting, bodies might have thousands of faces.
Any of this sound familiar?
(Some additional details: This is in Python. The body whose faces are being deleted is an input to the process; I do not create it or modify it before the face deletion. Neither the original body nor the face-deletion feature is associated with a base feature. However, there is a base feature created (and then closed out) in the timeline between the point at which the body is created and the point at which faces are deleted. There are additional operations that precede the face deletion.)
Solved! Go to Solution.