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.
How do I place a Part at an arbitrary position inside an Assembly?
Javier_López_del_Pueyo
Member Posts: 74 PRO
I'm facing an issue regarding Part placement inside an Assembly, and it really strikes me not to find the tools to overcome it.
I'm trying to place a Part relative to another one. This Part ishould be placed through a displacement (XYZ cartesian coordinates) and three rotations.
In other CAD softwares I would have simply created some guiding geometry inside the assembly as a reference for placing the Part. But in OnShape, Assemblies seem to be very limited in this regard. I cannot create sketches inside an Assembly, nor visualize sketches created in the Part Studio environment. There is no Transform tool either.
The next logical option was to use mates. I can create a mate from a reference entity and displace it in the XYZ directions. I can also perform one rotation. But the problem comes when I want to perform multiple rotations. I cannot find this option.
So then a tried to place a second mate, taking the first one a created as the origin, in order to perform the second rotation I was seeking. To my surprise, I cannot use a mate as a reference for creating another mate. Which seems simply illogical. Why shouldn't I be able to use a mate as a reference frame when mates are, precisely, reference frames themselves?
I created an IR in order to set and get mates' relative positions.
https://forum.onshape.com/discussion/20536
Meanwhile, has anyone found a workaround to this?
I'm trying to place a Part relative to another one. This Part ishould be placed through a displacement (XYZ cartesian coordinates) and three rotations.
In other CAD softwares I would have simply created some guiding geometry inside the assembly as a reference for placing the Part. But in OnShape, Assemblies seem to be very limited in this regard. I cannot create sketches inside an Assembly, nor visualize sketches created in the Part Studio environment. There is no Transform tool either.
The next logical option was to use mates. I can create a mate from a reference entity and displace it in the XYZ directions. I can also perform one rotation. But the problem comes when I want to perform multiple rotations. I cannot find this option.
So then a tried to place a second mate, taking the first one a created as the origin, in order to perform the second rotation I was seeking. To my surprise, I cannot use a mate as a reference for creating another mate. Which seems simply illogical. Why shouldn't I be able to use a mate as a reference frame when mates are, precisely, reference frames themselves?
I created an IR in order to set and get mates' relative positions.
https://forum.onshape.com/discussion/20536
Meanwhile, has anyone found a workaround to this?
0
Best Answers
-
eric_pesty Member Posts: 1,887 PROCreating a mate connector offset using an other mate connector as a reference would be useful sometimes (also not sure why it's not allowed...).
@javl0p_2, it's hard to tell what the best option might be without seeing exactly what you are trying to achieve but there are several ways to deal with what you are describing.
- You can use the triad manipulator to precisely more things around an assembly: relocate its origin and then with any drag/rotate you can type values, this is basically a transform tool and once you get it where you want you can use a group relation to lock them together.
- You can also create a mate between the two parts with some offsets, and then edit each of the two mate connectors (expand the mate feature in the tree) to add additional offsets and rotations, it might take a couple iterations to get the result you want but that should allow any combination of offsets and rotations.
- When dealing with weird geometry I typically prefer creating mate connector(s) in one or both of the parts to get the necessary reference(s) and then do a simple mate in the assembly.
- You could also create a sketch (or sketches) in a part studio (including doing it in context with the first part if that helps) and then insert and mate the sketch(es) in the assembly to provide all references you might need.
- You could also insert one or more "dummy" part (like a small surface or sketch, even using the "fake mate connector feature") and mate it with some of the offsets/rotations with the first part and then mate the second part to that with further offsets/rotations.0 -
Javier_López_del_Pueyo Member Posts: 74 PROOk, I finally manage to find a clean way to do what I want to do.
I select my reference Part, edit in Context, then create the reference geometry and I create a Mate connector using base on that geometry.
Then i Insert and go to Assembly, where I can see and select the mate connector as a reference for placing my Standard Part.
Thanks a lot for the help and advice!
0
Answers
@javl0p_2, it's hard to tell what the best option might be without seeing exactly what you are trying to achieve but there are several ways to deal with what you are describing.
- You can use the triad manipulator to precisely more things around an assembly: relocate its origin and then with any drag/rotate you can type values, this is basically a transform tool and once you get it where you want you can use a group relation to lock them together.
- You can also create a mate between the two parts with some offsets, and then edit each of the two mate connectors (expand the mate feature in the tree) to add additional offsets and rotations, it might take a couple iterations to get the result you want but that should allow any combination of offsets and rotations.
- When dealing with weird geometry I typically prefer creating mate connector(s) in one or both of the parts to get the necessary reference(s) and then do a simple mate in the assembly.
- You could also create a sketch (or sketches) in a part studio (including doing it in context with the first part if that helps) and then insert and mate the sketch(es) in the assembly to provide all references you might need.
- You could also insert one or more "dummy" part (like a small surface or sketch, even using the "fake mate connector feature") and mate it with some of the offsets/rotations with the first part and then mate the second part to that with further offsets/rotations.
I cannot share the document I'm working on due to company policy, but I can show an illustrative example.
Lets suposse I want to place a Standard Part (i.e. a DIN 912 screw) at a certain position relative to a Part 1, that I created.
That position is defined by two angles, 30º and 120º. I create the geometry inside a Part Studio to illustrate this.
The axis position of the Screw inside the Assembly would be defined by the line within the inclined angle. However, I cannot use Part Studio geometry within an Assembly to place my Standard Part.
I can use a Fastened Mate but only set one of the angles. I can not achieve the second rotation.
And yes, I could use the triad to get the second angle in place, but I can't do it in a parametric way. What if in the future I want to change this angle? There would be no reference dimension to do it.
Also, I don't think this request is that unusual. In a very early stage of design, it's common practice to place the commercial elements first inside an Assembly (at least the most relevant components such as motors, batteries, cameras...) and then create the Parts that serve as support structure or interface. In my case, the exact position of such elements is a design constrain I must comply with.
- The triad manipulator works fine, the problem is I cannot use parametrically. Once the transformation is done, I cannot change the rotation or displacement in a parametric way.
- I'm not sure I follow you with the mate connector solution. You mean creating a mate using two mate connectors and the editing both mate connector to get to the required position? I will give it a try but It seems a rather cumbersome workaround.
- Creating geometry inside a Part Studio would be the cleanest way to achieve this. However, that only works If you are creating a second Part in the same Part Studio, not if you want to insert a Part inside an Assembly.
- Since I'm working in Assembly, I cannot rely on FeatureScripts (not sure the reason why we can't access FS within an Assembly). I guess I could create extra Parts that serve as reference geometry, but it isn't ideal.
Thanks!
https://learn.onshape.com/catalog?labels=["Videos"]&values=["Configurations"]
I have a simple example for you.
https://cad.onshape.com/documents/cab879beb5915616fb8bc500/w/73ff49efddd89eb8a59a9776/e/42bef08f32d2f910f7a4c5a4
I can create a Part Studio in context to build the required reference geometry and then insert it directly into my Assembly.
However, whenever I click on Insert and go to Assembly, It won't let me select the sketches I just created. It should, since the Select Items to Insert window pops up and accepts parts/surfaces/sketches. However, it doesn't let me pick the sketch. Is that a bug or is it something I'm missing?
Thanks for the pacience!
I select my reference Part, edit in Context, then create the reference geometry and I create a Mate connector using base on that geometry.
Then i Insert and go to Assembly, where I can see and select the mate connector as a reference for placing my Standard Part.
Thanks a lot for the help and advice!
https://cad.onshape.com/documents/cab879beb5915616fb8bc500/w/73ff49efddd89eb8a59a9776/e/42bef08f32d2f910f7a4c5a4
I have encountered the problem of performing consecutive transformations for assembly and part studio placing and this is how I resolved it.
I know this is kind of tricky, and would be much easier it you could use a MC as reference for another MC. Here is the corresponding IR in case you want to vote for it:
https://forum.onshape.com/discussion/9877/mate-connector-definition-from-another-mate-connector
If you want to perform a transform directly to a MC via traslation vector and rotation matrix, you can use the custom feature Get/Set Pose that I created a while ago:
https://forum.onshape.com/discussion/21955/new-featurescript-get-pose#latest
https://cad.onshape.com/documents/bc1fb0c811098f2433a4b5d3/w/15d257b38b39c4198efa6df9/e/efd7ebddf865b074a31e089a?renderMode=0&rightPanel=variableTablePanel&uiState=667bc5439542fa068cabfb18
There you have a master Part Studio with a variable table that controls the transformation (translation and rotation) of a MC.
When imported into the assembly, the MC comes along.