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.

New Feature: Poly-Mate Connectors

Derek_Van_Allen_BDDerek_Van_Allen_BD Member Posts: 630 PRO
edited June 2025 in General

My drafting team have run into situations where they've needed to define multiple explicit mate connectors in one operation for ease of organization and later reference in features. Naturally after searching for an existing tool that does multiple connectors in one operation and not finding one they requested that I develop a quality of life script that does this multi mate connector operation.

Introducing: Multi-Mate Connectors wait that's taken

Introducing: Poly-Mate Connectors

image.png

It places multiple explicit mate connectors in one go, so if you need to re-reference them multiple times it's easy to hide and show them all at once by changing the visibility of the feature itself. This makes it simple to drag select the whole window to grab all the explicit mate connectors in frame to quick select locations for hole operations or things not easily defined by sketch geometry.

image.png

Comments

  • roman_jurt190roman_jurt190 Member Posts: 46 EDU

    wow! very cool! i also did't know the the polyhedra FS!

  • Derek_Van_Allen_BDDerek_Van_Allen_BD Member Posts: 630 PRO

    Someone on the Onshape discord clued me on to the polyhedra script. I'm definitely gonna get some mileage out of it for laser cutting projects.

  • Derek_Van_Allen_BDDerek_Van_Allen_BD Member Posts: 630 PRO

    That's not even the other one I was using before, that's a step up from what I was originally working with but the polyhedron script I used in the demo of this feature takes the cake for me for sheer absurd volume of options. It was apparently based off the mathematic structures on this website.

    I haven't exhaustively checked that they're all in the script but it certainly looks like the author took someone's joke of "Oh, you're a fan of shapes? Name every shape" as a personal attack and delivered.

  • RhettRobinsonRhettRobinson Member Posts: 184 ✭✭✭
    edited June 2025

    This is awesome! Can you add the ability to select an owner body? Excited to add this to my workflow.

    EDIT: I gave it a shot myself.

    I run into an error when the owner for the mate connectors is not a body such as a sketch or curve.

    image.png image.png image.png image.png
  • Derek_Van_Allen_BDDerek_Van_Allen_BD Member Posts: 630 PRO

    V2 added support for sketch entities and curves. Your version doesn't have those bodies allowed in the owner body filter.

  • RhettRobinsonRhettRobinson Member Posts: 184 ✭✭✭

    Oof, rookie mistake. 😂 Thanks!

  • Derek_Van_Allen_BDDerek_Van_Allen_BD Member Posts: 630 PRO

    Latest update brings baked in Query Variable functionality to group the collective of the selected mate connectors for easy dynamic selection in other features. Combine this with my new Amalgamate feature and you can quickly seed and generate complex and robust geometry in far fewer steps than before.

    image.png
  • Derek_Van_Allen_BDDerek_Van_Allen_BD Member Posts: 630 PRO

    New update brings more mate connector stability courtesy of some contributions from @MichaelPascoe. Moving or reassigning mate connectors should now maintain references in later features and assemblies due to this improvement. We only had to sacrifice the stability of any documents that were referencing this feature prior to now. If you have a document from version 3 or before, you might find yourself needing to reapply those features if you update. Not universally though, I only found a few cases that actually broke.

  • Derek_Van_Allen_BDDerek_Van_Allen_BD Member Posts: 630 PRO

    2 more new updates, now sketch vertices are supported as an input which should allow you to do more power select stuff and window drag stuff than before, as well as allowing query reordering which should make it easier to shuffle instances in cases where you might have mistakenly applied your mates in a different order than other configurations in something like a standard component library driven from configured and versioned import geometry and your assembly mates are shifting around on you when you change part configurations.

  • eric_pestyeric_pesty Member, pcbaevp Posts: 2,526 PRO

    @Derek_Van_Allen_BD,
    I recently was experimenting with using query variable to generate a selection set for polymate.

    I was hoping I'd be able to provide a bunch of circular edges but that doesn't seem to work…

    I was able to achieve what I needed using the Query pattern FS with a bunch of intermediate steps:

    • Create fill feature from a seed edge
    • Use the CT point at 0.5, 0.5 on the fill face (using "created by" QV)
    • Create a sketch point on the face using coincident to the point in the middle of the face
    • Use that sketch point to locate a hole feature
    • Pattern all of this in the query pattern

    Works but was quite cumbersome! If I had been able to create MCs on all these edges at once with poly mate, I could have just skipped to the hole feature!

  • Derek_Van_Allen_BDDerek_Van_Allen_BD Member Posts: 630 PRO

    @eric_pesty yeah the way mate connector selection works is a little goofy compared to most other query types but it kind of makes sense why. I have thought about making a reverse engineering hole query for finding cylinder faces and applying mate connectors to the right spots on the cylinders to be able to delete those holes and reapply them to get hole tables and attributes to populate or change standards or something but that's in a deep pile of other scripts that are unprioritized.

  • eric_pestyeric_pesty Member, pcbaevp Posts: 2,526 PRO

    Makes sense that selecting/auto-generating mate connectors is a bit of an odd thing as it's usually the other way around where you pick mate connectors to generate things from them!

    I just thought I'd drop a comment as I was surprised how convoluted it was to get from finding all the edges of the holes (easy with QV) to applying a hole feature to all of these locations! Poly-Mate seemed like it was going to help but I found out that it didn't.

  • Derek_Van_Allen_BDDerek_Van_Allen_BD Member Posts: 630 PRO

    @eric_pesty there is a centroid mate connector script floating around somewhere that probably could have saved you a few steps using the query pattern feature that I'm pretty sure works with edges or curves. Not sure if it would find the right orientation though.

    One of my coworkers has been routinely surprising me with new inventive uses for Poly-Mates that I never imagined or intended when I first whipped it up but it's kind of becoming foundational to a lot of workflows at our company. It's now the backbone for getting import parts with configurations to work with stable assembly mates so you can swap them around like they're standard content items without breaking stuff.

    Or I guess you could argue that applied @MichaelPascoe is the backbone, but Poly-Mates is at least like a femur or something important.

Sign In or Register to comment.