Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

Best way to delete lots of temporary geometry?

traveler_hauptmantraveler_hauptman Member, OS Professional, Mentor, Developers Posts: 419 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_baranilya_baran Onshape Employees, Developers, HDM Posts: 1,215
    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
Sign In or Register to comment.