Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- 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.
Query parts by implicit mate connector
marci_van_dort
Member Posts: 14 ✭
Hey everyone,
I have a design for 3D printed parts with the parts designed in place. I want to create a feature that will easily let me reorient all the parts in the correct orientation for printing, to save myself the effort of manually reorienting them after exporting. The goal is to select a mate connector on each part, and then place the parts on a grid. I have a lot of parts, so I want to just select the mate connector, and automatically select the corresponding body in FS. This is exactly what for example the Mate Connector feature does when I select an origin entity.
My first thought was to try and use qOwnerBody to select the body that I placed my implicit made connector on, but apparently that just returns the implicit connector, and not the body. I don't understand what qOwnerBody is supposed to do if not give me the part?
So, I figured I'd take a look at the Mate Connector feature implementation instead. I copied the relevant parts of that implementation into my feature and it works, but only partly. I can select vertices, edges or faces and it will correctly query the corresponding part for me to use. But it does not allow me to place implicit mate connectors. If I manually add mate connectors to the filter in the query I can select them, but when I do select one the feature fails to resolve.
Does anyone have an idea on how to make this work?
she/her
Comments
can you share your doc here?
Sure, here's what I have so far: Grid Orient
I played a bit more with it, trying to see what properties of my implicit mate connector I could access. If I click to edit the implicit mate connector in the UI it shows me e.g. a plane for its origin entity. I was hoping to use that to possibly determine the corresponding body. But it seems I can only access the origin, x-axis and z-axis vectors unfortunately.
she/her