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.

Does extrude() have a hidden definition.symmetric option?

As per the title - if passing '.symmetric' and the other things such as 'hasSecondDirection', 'secondDirectionBound' etc, will this create a symmetric extrude?

I've added a symmetric option to a tool I've been writing but have seen curious behaviour where I didn't even need to halve my depths as expected. The creating feature happened to have a symmetric option, and was passed downstream, and I feel like I have just accidentally added the symmetry option that way (despite not seeing it documented).

Answers

  • Stormi_BackusStormi_Backus Member Posts: 49
    In my experience, adding .symmetric parameters to an extrusion automatically splits your chosen extrude depth in either direction. So you'll want to give it full depth rather than half. 

    As for hasSecondDirection and secondDirectionBound, I haven't used them but these parameters meant for non-symmetric extrusions so you will have to manually enter the desired distance to extrude in either direction. 

    Hopefully that helps!
  • Jonathan_HutchinsonJonathan_Hutchinson Member Posts: 91 PRO
    Thank you! Yeah so I added a boolean parameter called definition.symmetric, which was then passed in later to an extrude command. I had initially thought specifying those other parts were doing what I wanted, until I started getting half distances for the symmetrics. But I've searched again and again, it's totally undocumented?
  • EvanReeseEvanReese Member, Mentor Posts: 2,135 ✭✭✭✭✭
    I may not understand what's hanging you up, but you can look here at the actual extrude feature code, and see what's available on the definition. Just think of it as using the native feature, but using your own UI and automations to control it, so the behavior should be the same. In this case, the behavior of the native feature is to make the total depth equal to your distance when "symmetrical". It also ignores anything you feed it about the "secondDirection" when it's "symmetrical".
    Evan Reese
  • Jonathan_HutchinsonJonathan_Hutchinson Member Posts: 91 PRO
    edited September 2023
    Wasn't so much a hang up - more that I stumbled upon it by accident, and then wondered why my 'half' distances were becoming quartered. Kept on checking and double checking that the map to feed to extrude() didn't have an option for symmetric in it. Thankfully the penny dropped eventually that it was purely coincidence because my feature using extrude had symmetric in the definition.

    Is it odd that I would've expected 'definition > symmetric > type:boolean' to be here? To me it just seems inconsistent to be required to dig into extrude.fs and there are twice as many places options could be, although that's ultimately the lesson learnt. What other useful stuff is hiding?
Sign In or Register to comment.