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.

FS Hole example

cory_isaacsoncory_isaacson Member, Developers Posts: 43 PRO
The documentation is incomplete for the hole feature, is there an example of how to drill a hole in a part? Looking at the hole.fs source, it's not obvious how to do it either.

Best Answer

  • cory_isaacsoncory_isaacson Posts: 43 PRO
    Accepted Answer
    I worked out how to do this, I just added the holes to the original sketch and ignored the nested areas during the extrude, then the holes were all there. Your suggestion would have worked too.

Answers

  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 3,113
    Are you wanting to add custom holes to the current hole tool or are you creating your own feature? Many times all you need to do is extrude a cylinder and subtract it from the solids. Every case and application is different. 

  • cory_isaacsoncory_isaacson Member, Developers Posts: 43 PRO
    I need holes in a custom feature I am building. I need a hole through several parts that are stacked, based on a sketch in the top part. Sounds like extruding a cylinder will be fine, I'll try that and let you know if issues.
  • cory_isaacsoncory_isaacson Member, Developers Posts: 43 PRO
    I ended up just adding circles to my initial sketch, and filtering those out during the extrude. I tried to create a new sketch and then make cylinders, but the query got very involved when I tried to do the boolean. I had a lot of parts to go through, and could not figure out how to make a query to penetrate all of them. Is there an easy way to chain queries together to incorporate multiple parts?

    Here are some of the things I tried (you can see options in comments).

    // Perform boolean operation to remove the cylinders, leaving the holes.


  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 3,113
    edited January 2017
    If you are subtracting all the bodies you made in the feature then you can just use qCreatedBy(id, EntityType.BODY). 

    If you are only subtracting some, then you can use qUnion and qSubtraction to build lists of bodies you need to use.
  • cory_isaacsoncory_isaacson Member, Developers Posts: 43 PRO
    Accepted Answer
    I worked out how to do this, I just added the holes to the original sketch and ignored the nested areas during the extrude, then the holes were all there. Your suggestion would have worked too.
Sign In or Register to comment.