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.

Options

How to pattern a revolve remove feature within featurescript?

Stormi_BackusStormi_Backus Member Posts: 49
Hi All, 

I've been tasked to create a bunch of bolt circle patterns using featurescript and am looking for a way to minimize the number of bolt hole sketches I have to make. 

My desired workflow:
1. Create a single sketch profile and revolve cut that
2. Then use some circular pattern function to replicate the revolved cut at required locations along the OD of my part

What I've tried:
1. Patterning just the sketch instead - I got this to work but applying a revolve operation after that is a whole can of worms 
2. Adapting @Evan_Reese's suggestion for linear patterns (Here) using circularPattern and querying the faces created by my initial revolve. The console returns "precondition failed" with every variation I try.

Please see below for screenshot of my circularPattern attempt and the public document is linked here.

I'm going to have to do this for the entirety of my company's bushing/hub product lines and would like to optimize the process how ever possible so I'm open to any suggestions here! 

Thanks in advance!

p.s., I already tried selling them on configurations - my coworkers hate the workflow and want the easy toolbar access provided by FS so here we are.


Best Answer

  • Options
    NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,466
    Answer ✓
    function Store_BushingSize(Bushing_Choice) returns number
    {
        return stringToNumber(replace(Bushing_Choice, "Size_", ""));
    }
    Senior Director, Technical Services, EMEAI

Answers

  • Options
    NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,466
    Answer ✓
    function Store_BushingSize(Bushing_Choice) returns number
    {
        return stringToNumber(replace(Bushing_Choice, "Size_", ""));
    }
    Senior Director, Technical Services, EMEAI
  • Options
    NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,466
    There's a lot going on in this feature which could be programmatically simplified like calling a function to create the sketch and using skPolyline. You should also stick to using just opExtude, opRevolve, calculating the transforms and using opPattern, then opBoolean the results.
    Senior Director, Technical Services, EMEAI
  • Options
    Stormi_BackusStormi_Backus Member Posts: 49
    Thanks @NeilCooke! I've been sort of brute forcing stuff and simplifying as I go. Will definitely implement these suggestions!
Sign In or Register to comment.