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.

Serialization

tyler_popetyler_pope Member, Developers Posts: 21 PRO
We have a request to 3D print up to 4000 parts that require serialization. Is it possible to write a script that will change the text on a extrude cut and export a stl file so they don't have to be edited and saved individually? 

Best Answers

Answers

  • 3dcad3dcad Member, OS Professional, Mentor Posts: 2,470 PRO
    Not knowing that much about printing I would expect such feature from printing software?
    //rami
  • philip_thomasphilip_thomas Member, Moderator, Onshape Employees, Developers Posts: 1,381
    Hmm - technically doable! :)

    We cannot currenetly drive text directly from a variable (we will at some point @ilya_baran) so we will need a different method.
    No doubt someone what has thought about this more than me will come up with a better solution, but until then . . . .
    You will need to model or derive into your part studio solid representations of the numerals 0-9 in each of 4 positions (allowing for serialization of up to 10,000 parts).

    Through the API, you would drive the suppression state of the 40 parts representing the numerals (36 suppressed at any one time).
    The program/web-service would then perform the boolean subtract between the parts and the unsuppressed numerals and then output the STL. Repeat.

    is this the best way - I don't know! Lots of smart people here :)

    Philip Thomas - Onshape
  • ilya_baranilya_baran Onshape Employees, Developers, HDM Posts: 1,173
    We can certainly drive text from FS (e.g. Dave Cowden's curved text feature).  What the script won't be able to do is export the files individually, but if you export a combined stl (maybe do it in batches since 4000 is a lot of parts in a single part studio) there may be 3rd party software that can break it up into components.
    Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc
  • philip_thomasphilip_thomas Member, Moderator, Onshape Employees, Developers Posts: 1,381
    I just saw Kevin working on his solution - it's awesome!!!
    Stand by :)
    P
    Philip Thomas - Onshape
  • tyler_popetyler_pope Member, Developers Posts: 21 PRO
    Yep. Since your request involves exporting, FeatureScript can't do it. Custom features are have no side effects outside the Part Studio they are in.

    For a task the best and most correct approach is to use the API to make the appropriate modifications.

    However, here's a hackish workaround using Onshape's (very powerful) feature pattern. This solution creates many parts in the same Part Studio (which can be downloaded as one zip file with a bunch of STLs). This will likely run into the performance limits of a single Part Studio, meaning if it works at all, you'll need to break it up into several batches. However, if you're willing to deal with that, that process may be much less work than writing an app to do this work.

    https://cad.onshape.com/documents/0ca7d59b7b8e1a3b9b43c377/w/313802fcead77ad82c7ddc7a/e/3c9dd7a22828473b91624b24

    This sounds like a great option but I wasn't able to access the file. Can you share it with tpope@3dprintingally.com?

    Thanks
  • tyler_popetyler_pope Member, Developers Posts: 21 PRO
    That's awesome Kevin. Thanks for the help. 
  • laird_broadfieldlaird_broadfield Member Posts: 42 ✭✭
    edited March 11
    @kevin_o_toole_1 This doesn't seem to be working in the current update of OnShape.  Depending on the new Linear Pattern setting Reapply Features, either the base part doesn't replicate, or the math doesn't get incrementally executed.  TIA for help?

    Edit: Okay, it does, as long as I set the Linear Pattern offset to zero.  This feels like a misfeature, but I get the results, so okay and thanks.
Sign In or Register to comment.