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.

Creating a feature script to mark bends

kyle_hofer465kyle_hofer465 Member Posts: 2
Hi,
Can someone please help me create a feature script to mark bends when the part is flattened? So basically what I want to do is select the points on each end of the bend lines and have it snap a circle sketch to each point selected. Also instead of having to define the diameter of every single one of them with the dimension tool, I need the circles to be equal to each other by default and control the diameter of the circle within the feature script.

Once done, my flat pattern will have a half-moon remove extruded on each end of my bend lines, Then those will help me show where my bend lines are after the laser cut process, generating less room for error when doing the bending process.

Any help on this would be greatly appreciated!

Kind Regards,
Kyle


Comments

  • Evan_ReeseEvan_Reese Member Posts: 2,064 PRO
    Can you share an image of the end goal? It's hard for me to follow along by text only
    Evan Reese / Principal and Industrial Designer with Ovyl
    Website: ovyl.io
  • bryan_lagrangebryan_lagrange Member, User Group Leader Posts: 793 ✭✭✭✭✭
    @Evan_Reese I believe @kyle_hofer465 is looking to have a script that puts a cut that shows where the bend line is on a part so you can use to line up with tooling at a brake to make a bend.

    https://cad.onshape.com/documents/073ee8501e1fab82fbe32b8e/w/5a9425f9ac5675c512e36202/e/158a842299199529b1bf6b22


    Bryan Lagrange
    Twitter: @BryanLAGdesign

  • Evan_ReeseEvan_Reese Member Posts: 2,064 PRO
    Ah I get it, thanks! I can definitely see the utility of it. I've not worked with sheet metal in Featurescript at all, but it does seem like a good candidate. @MBartlett21 would know better than me how hard or easy it might be, given all of the sheet metal specific features he's made.
    Evan Reese / Principal and Industrial Designer with Ovyl
    Website: ovyl.io
  • MBartlett21MBartlett21 Member, OS Professional, Developers Posts: 2,034 EDU
    edited February 2022
    @Evan_Reese

    If you can get selecting the endpoints or the lines to work, you should be able to just sketch on a face of the flat pattern (remembering that the sketch will be in the coordinates of that face with evPlane, not world coordinates), then there are two ways of cutting the flat.

    The simpler way would likely be to just call `extrude` from your FeatureScript and have it handle updating the flat pattern and everything (having a look at its precondition to see what you need to provide to it for operating on the flat.)

    The other way would be to look at the inner workings of extrude (calling opSMFlatOperation and whatnot) and copy that into your feature.


    Also, maybe a little bit unrelated, but wouldn't having a sharp wedge-shaped cut be a bit more accurate than a circle?
    mb - draftsman - also FS author: View FeatureScripts
    IR for AS/NZS 1100
  • Evan_ReeseEvan_Reese Member Posts: 2,064 PRO
    Thanks for the primer, Morgan. I doubt I'd get around to this any time soon, but it does seem like a good job for FS.
    Evan Reese / Principal and Industrial Designer with Ovyl
    Website: ovyl.io
  • emagdalenaC2iemagdalenaC2i Member, Developers, Channel partner Posts: 859 ✭✭✭✭✭
    Thanks for the primer, Morgan. I doubt I'd get around to this any time soon, but it does seem like a good job for FS.
    It would be even better if instead of a cut a mark was added
    Un saludo,

    Eduardo Magdalena                         C2i Change 2 improve                         ☑ ¿Por qué no organizamos una reunión online?  
                                                                         Partner de PTC - Onshape                                     Averigua a quién conocemos en común
  • dirk_van_der_vaartdirk_van_der_vaart Member Posts: 541 ✭✭✭

Sign In or Register to comment.