New Custom Feature: Center Mate

joshtargo
joshtargo Member Posts: 695 EDU
Creates a Mate Connector at the center of an object's bounding box.

https://cad.onshape.com/documents/d57ab129ace0b2436049095c/w/bb8f5d1770f7c22ad70c7906/e/a199adf0f34542c09f8a1678

let me know how I can improve this.

Comments

  • martin_kopplow
    martin_kopplow Member Posts: 1,645 PRO
    Maybe put it at te center of gravity as an option?
  • joshtargo
    joshtargo Member Posts: 695 EDU
    I think there's a function for that. I'll try! Im Really slow because I'm not a programmer.
  • S1mon
    S1mon Member Posts: 4,636 PRO
    edited January 2024
    Adding an option to create mate connectors at the center of a face's bounding box could be pretty interesting. Right now the fact that by default Onshape uses the centroid of the face can be deceptive, or at least frustrating. If you have a rectangular plate with some holes in it, if those holes aren't symmetric around the center, they will influence the centroid in a way that isn't always obvious to the user. I don't have as much use for the object bounding box, but if I could, I would change the default MC to give you the centroid of a face's bounding box.


    Simon Gatrall | Product Development, Engineering, Design, Onshape | Ex- IDEO, PCH, Unagi, Carbon | LinkedIn

  • joshtargo
    joshtargo Member Posts: 695 EDU
    S1mon said:
    Adding an option to create mate connectors at the center of a face's bounding box could be pretty interesting. Right now the fact that by default Onshape uses the centroid of the face can be deceptive, or at least frustrating. If you have a rectangular plate with some holes in it, if those holes aren't symmetric around the center, they will influence the centroid in a way that isn't always obvious to the user. I don't have as much use for the object bounding box, but if I could, I would change the default MC to give you the centroid of a face's bounding box.


    the fact that i am a really bad programmer is making it difficult to change the internal behavior depending on the type of object selected, but I will see what happens.

    do you happen you know how to determine the type of object selected?
  • CouldUseASkittleHelp
    CouldUseASkittleHelp Member Posts: 4 ✭

    https://cad.onshape.com/documents/3b958f55fc47a556201cb076/w/b568dcd3ac862edd2605d128/e/3f32cb404e955c87ab34b0a8

    Heads up, the original one you posted seemed to not be public/allow it to be used in other documents. Therefore, I just made a copy that should be able to be used.