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.

Boolean face FeatureScript

matthew_vilimmatthew_vilim Member Posts: 12 EDU
A very common thing I do with FeatureScript is use a tool solid body to cut a hole in the face of a surface or solid body. However, the two robust methods I can think of are awkward.

1) Use opSplitFace to cut the face, qSplitBy to find the new faces, evCollision to find which faces intersect the tool body, and opDeleteFace to remove them.
2) Use opExtractSurface to copy faces of interest to a new surface body, opBoolean to make the cuts, opDeleteFace to delete the original faces, and opBoolean to merge everything back together.

Both are quite awkward (am I missing something?), and the second option breaks the parametric history since the faces are copied and stitched back to the body. I could wrap this in my own script, but it seems Onshape should support this natively by allowing faces as the target of opBoolean instead of just solid and surface bodies.

Comments

  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,686
    Can’t this just be done with Boolean in the UI or am I missing something? Sounds like you are creating a feature that already exists?
    Senior Director, Technical Services, EMEAI
  • matthew_vilimmatthew_vilim Member Posts: 12 EDU
    NeilCooke said:
    Can’t this just be done with Boolean in the UI or am I missing something? Sounds like you are creating a feature that already exists?
    The case I'm considering is like this: https://cad.onshape.com/documents/b3d78f51b053d725b723c7a6/w/55ebdc265c80080cd96a6682/e/7c698a037f12ef69f75d53ef

    I want to cut a hole through one face without going through the second face; for many designs with thin walls and organic geometry, it isn't feasible to reshape the tool body to avoid cutting the second wall. Also, Boolean's can't delete faces if the target is a solid.

    It isn't a big deal since I have workarounds, but I was surprised there doesn't seem to be a simple way to do this by default.
Sign In or Register to comment.