Best way to delete lots of temporary geometry?

traveler_hauptman
traveler_hauptman Member, OS Professional, Mentor, Developers Posts: 423 PRO
I'm creating a lot of solid bodies for sensing, which I intersect with the surrounding geometry to test how thick nearby parts are, or whether there are voids in the interior, or whatever. After all my tests I need to clean up all this temporary geometry.

What's the most efficient way to do this? Push the id's onto a stack and delete them one-by-one? Maybe assign an attribute to the ones that are temporary and query for the attribute? Ideas?
Tagged:

Comments

  • ilya_baran
    ilya_baran Onshape Employees, Developers, HDM Posts: 1,278 image
    Not sure without profiling what the most efficient way is.  opDeleteBodies with a query that resolves to a number of bodies should work well.  Another (advanced) alternative if you're just using the bodies for sensing is to use the internal rollback mechanism by starting and aborting a subfeature -- see addDebugPoint in debug.fs .  I don't know which one is faster.  Attributes are likely to be a little slower than accumulating ids in FS I think.
    Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc