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.

Custom Feature: Amalgam Tag and Amalgamate

Derek_Van_Allen_BDDerek_Van_Allen_BD Member Posts: 372 PRO

Are you like me and use Point Derive for everything? The ability to draw a part studio in one document and copy and paste functional geometry all over a different document is a huge force multiplier for quickly and precisely generating complex parts that adhere to centralized standards and document control schemes. For awhile I would tell people that they don't need a new custom featurescript for an operation, they just need a clever tool studio and Point Derive. There are 2 big downsides to Point Derive, however, and a relatively recent addition to the Onshape standard tools solves both. The first issue with Point Derive is that even though it allows for all the boolean operations right in the feature, sometimes I want to do additive and subtractive operations in the same feature. The other issue is that searching for my Point Derive tool documents in a shared workspace with my coworkers is like finding a needle in a haystack and I wish there were a way to just type in the name of the thing I'm looking for into the feature itself and have my tool geometry populate.

The Sheet Metal Form feature solves both of these problems. With the Form feature you can pre-determine a union body and a subtraction body for forming geometry and place complex details all over your sheet metal parts, adding and subtracting in the same step. It also carries with it the ability to start typing into the fields and filter to the relevant form studios due to a recent update. So I bootlegged the sheet metal feature to get it to work on non-sheet metal parts.

Introducing two new features: Amalgam Tag and Amalgamate

Amalgam Tag works in much the same way as the existing Tag feature, but I've stripped back some of the sheet metal specific functions in it to operate more generically as well as allowing the user to paint multiple bodies for subtraction or union operations. (Sheet Metal limits you to one each for largely logical reasons) You can even tag parts for an Insert→ New operation if you have objects that you want to place into locations in your downstream studios and don't want to merge them with either a union or a subtraction operation.

image.png

Amalgamate works in much the same way as the Point Derive or Form features work. You select seed locations to do your business with and the feature will draw new instances of geometry at your selected locations oriented by mate connector and then the script will execute the boolean operations you defined on each of the seed bodies at each of the locations. Different scopes are allowed for the union and subtraction operations for cases where you want to add material to one body but remove material from a different body.

image.png

Like puzzle piece or dovetail geometry. I'm adding material to the blue side and subtracting it from the gray side. These examples might not seem like the flashiest of case studies but they're simple tests to prove the concept. Your tool studios can be as complicated or configurable as you like (within general reason). The reason I got into developing this tool was that I wasn't satisfied with the existing featurescripts that generate printable threads and didn't want to maintain yet another branch of a custom feature, nor figure out how to generate modified Whitworth thread profiles with my preferred clearances in two incompatible featurescripts. So instead of trying to script it, I just built a configurable studio using whatever features worked best on an individual basis to generate my seed geometry and now I've got the ability to greeble it everywhere I need it.

image.png image.png

Now it's super easy to insert your printed 10mm Size 8 Chamlet Head Bolts. I'll follow up with some examples of the library being built but I need to debug some Form tools library validation stuff I broke in the last update.

Comments

  • eric_pestyeric_pesty Member, pcbaevp Posts: 2,463 PRO

    That looks really useful!

  • Derek_Van_Allen_BDDerek_Van_Allen_BD Member Posts: 372 PRO

    I genuinely think that this script can serve as a viable replacement for a large portion of custom features I've seen people make which ultimately amount to "draw this geometry in these places and do this flavor of Boolean to the bodies they're touching"

    Lot easier to draw a configured studio that behaves the way you want than to try to code all of the operations that build the tool geometry.

  • jelte_steur_infojelte_steur_info Member Posts: 582 PRO

    Seems like an awesome feature!

  • MichaelPascoeMichaelPascoe Member Posts: 2,671 PRO

    Nice!


    Learn more about the Gospel of Christ  ( Here )

    CADSharp  -  We make custom features and integrated Onshape apps!   Learn How to FeatureScript Here 🔴
  • Derek_Van_Allen_BDDerek_Van_Allen_BD Member Posts: 372 PRO
    edited November 25

    Okay turns out the native forms libraries will never validate parts unless the formedUtils come from the genuine formedUtils region of France. Even if I wholesale copy and paste the original formedUtils code into my custom features the library won't validate. That's a shame. @lana blink twice if there's an API hook that I can use on a folder to force it to update as a sheet metal forms library without checking if the part studios within are valid sheet metal forms.

  • EvanReeseEvanReese Member, Mentor Posts: 2,670 PRO

    @Derek_Van_Allen_BD This looks really cool! Can't wait to try it out on a project

    Evan Reese
    The Onsherpa | Reach peak Onshape productivity
    www.theonsherpa.com
  • Derek_Van_Allen_BDDerek_Van_Allen_BD Member Posts: 372 PRO

    Gonna try to implement support for multiple seed mate connectors in amalgam studios ala Point Derive and Frames too at some point. Would be EXTRA cool to do contextual stuff with the configurations too like Sheet Metal Form does with thickness. I'll have to see if there's a generic way to pass that info amalgamate that doesn't rely on sheet metal attributes.

    image.png
  • jason_ryan337jason_ryan337 Member Posts: 34

    @Derek_Van_Allen_BD This add on looks amazing and I agree that it could probably replace several of the custom features I've made or used. I am not sure how to start building a database of parts. Do I copy your file and start adding?

    Is there any chance you might consider to make a YouTube video to highlight some of it powerful (and simple) uses and how best to implement and grow a library? If you might not be up for it, maybe @EvanReese might consider to do a profile on it inside of his growing channel?

    I would greatly appreciate it, and I'm sure lots of other people would as well. God bless!

  • jason_ryan337jason_ryan337 Member Posts: 34

    Sorry another question. Can you please explain how the painting works and how to do it? The example in the file doesn't show how you paint it. I don't know how the script knows what to remove and what to add. Thank you!

  • Derek_Van_Allen_BDDerek_Van_Allen_BD Member Posts: 372 PRO
    edited November 26

    @jason_ryan337 Let me start by sprucing up the feature tree with some of @jelte_steur_info's notes first before I make my youtube debut. In the meantime if you read up on the Sheet Metal Form feature's tutorials this feature works in 90% the same way because it's a direct descendant of that feature. It turns out I jumped the gun with the library capability so you can't actually validate a library of amalgam features until Onshape's devs offer support for more flavors of library than just Form or Frame.

    Essentially you're pre-labeling your tool bodies as positive, negative, or new with Amalgam Tag and then when Amalgamate runs you're only defining the target bodies for those operations.

  • Derek_Van_Allen_BDDerek_Van_Allen_BD Member Posts: 372 PRO

    In related news, I just pushed an update to Poly-Mate Connectors that saves your selection of mate connectors as a query variable. Combining that feature with this one lets you quickly seed and generate complex and robust geometry in far fewer steps than before.

    image.png
  • jason_ryan337jason_ryan337 Member Posts: 34

    Thanks again. I've added the three feature scripts. If you have the patience for a little hand holding, I would appreciate it. I have 3 or 4 different parts that each are used in many of my documents to use for adding/subtracting material. Can you please let me know the best way to get them in position to use with the tag and amalgamate features? Should I create a "MyTools" document and import them into it as separate documents? From there do I use the tag/paint method to determine what is subtracted and what is added back?

    Thanks!

  • jason_ryan337jason_ryan337 Member Posts: 34

    Hi again. Still playing around with the FS. One thing I work on a lot are meshes and it doesn't seem that amalgamate plays well with meshes. It would be great if you could consider this. Since it won't let me even select the meshes, I can't seem to even use the FS to place groups of components. Even if boolean operations are not possible, being able to select and place objects using the tags would be great. Thanks, Jason

Sign In or Register to comment.