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 to mate parts/assemblies to the origin
Hi
I'm new to Onshape and I'm already struggling with
the basics.
All I try to do is the following:
I start with an imported assembly
"A". Into that, I want to add a second imported assembly
"B" and mate it to the origin.
In order to do so, I defined a "Mate
Connector" in the assembly "A", located on its origin.
I then opened the assembly "B" and also
defined a "Mate Connector", again located on its origin.
Now, when I add assembly "B" to Assembly
"A" and move it to a random location, the mate connector of
"B" is not located in "B"s origin, but in the origin of
assembly "A". But when I open "B" alone, the mate connector
is located on the origin?! That doesn't make any sense to me. It seems as if
this mate connector is not fixed to the origin at all.
BTW: I know, when I don't click in the graphics
window when adding a part/assembly, it will be placed at the origin. But like
that is not really fixed. And if someone accidentally moves it around, there
also needs to be a way of putting it back to the origin too.
Thanks in advance
Roy
Best Answers
-
NeilCooke Moderator, Onshape Employees Posts: 5,688See 6th video here: https://forum.onshape.com/discussion/23971/improvements-to-onshape-may-17th-2024/p1Senior Director, Technical Services, EMEAI1
-
eric_pesty Member Posts: 1,887 PROroy_roffler said:Seems like my last comment got lost somewhere...
Again, thanks for the support. But looking at that script... This can't be a permanent solution for placing an assembly on the origin? Placing an assembly on the origin should be a few clicks, not scripting.
Yes, I can just not click in the graphics window and everything will be placed on the origin. But development work is hardly ever linear. What if I want to try something out and move an assembly to another location to do so, just to find out that this is no option. How do I get it back to the origin? Just by hopefully remembering how much I moved it?
Why can't I see the mate connectors inside the subassemblies when working in the top assembly (talking about the public model "OS_Tetris_ASM" here)? To my understanding, these mate connectors are used to define the locations.
One thing that might not be obvious is that sub-assemblies are not treated as "solid" (i.e. anything that can move around in a sub-assembly can also move around in a higher level assembly). I can see that your parts are not constrained in your sub-assembly so they will still move around in the higher level regardless of you mating the assembly origins together...
Also note that "fixing" a part in a sub-assembly is a "local" thing that you can use to locate other parts relative to that but doesn't translate to higher levels. If you constrain things relative to each other in a sub, you will need to mate at least one thing in the higher level to "lock" them all in place.
Basically the origin is a lot less "firm" in Onshape assemblies than other CAD systems and Onshape prefers to use geometry directly. It takes a bit of time to get used to it but it does cleanup the assembly tree (no bunch of planes or origins all over the place) but it means you do need to create a MC occasionally if you need a "fixed" reference that doesn't depend on geometry. The assembly structure is also a lot more "fuzzy" so mates are solved the same way regardless of what "level" they are at in the assembly tree.
I think you are on the right track though:
- Create a MC on the origin in your sub-assembly
- Constrain your parts relative to that MC in your sub (with mates and/or group features, not with "fixed")
- Insert these sub-assemblies in your higher level and mate the ref. MC (either to parts or each other or the origin, etc...)
1 -
nick_papageorge073 Member, csevp Posts: 828 PROI read half the replies and skimmed the rest, sorry for the short attn span!:)
1) make an explicit MC on the origin of sub1. I like to name it "sub1 mc"2) inside the part studio, make an explicit MC at the origin. Then use the FS multimateconnector to quickly give each part in that studio the same MC. This FS is a huge timesaver.
3) Go to sub1, and insert all the parts. Drag them each around so they are NOT on the origin in their ideal position. One at at a time, mate each part's MC to the sub1mc. By dragging the parts around, it's easier to pick each one's MC. This is the equivalent of ProE's defult constraint in asm mode. (but takes a few more steps). I personally like doing it this way rather than "group" and "fix", but we each have our own preference. Also, often times it's easier picking the MC from the tree, rather than the graphics, especially if there are a lot of them.
4) repeat steps 1-3 for each other sub.
5) make a top level asm. Put an explicit MC as its first feature. Name it "top-sub mc".
6) insert all the other subs inside. Mate sub1 mc to top-sub mc, then sub2 mc to top-sub mc. etc.
Of note, it makes a difference what order you pick MC's when you end up offsetting the parts. I make it a habit to always pick the MC of the part to be placed first, then pick the MC of the asm (or already mated part within the asm) second. The direction of the offsets follows the coordinate system of the first MC.0
Answers
File Name: OS_Tetris_ASM
Both subassemblies (os_tetris_asm1_asm and os_tetris_asm2_asm) have a mate connector on its origin. None of these mate connectors show up in the top assembly and therefore I can't mate "mate connector" to "mate connector". So how do I get both subassemblies to be placed on the origin? This can't be too hard? And since we regularly get whole assemblies from customers, this is an absolutely essential thing for us.
But I have to say, I don't understand it... It's one assembly that should be placed at the origin. I should not need to fix some parts, make mate connectors to others etc. just to place it on the origin? I mean it doesn't get more basic than that, or does it?
And the origins of the subassemblies as well as the mate connectors defined in them are not visible in the top assembly anyhow, so I can't use them to place anything even if I wanted to.
Also, yes, place it there and never move it again. But designs are often iterative. What If I decide to move it to try something out. And then I want to move it back to the origin, but don't remember how far it was moved? Then I need to delete it and place it again? Guess that would be catastrophic for any parts having references on that part/assembly.
Again, thanks for the support. But looking at that script... This can't be a permanent solution for placing an assembly on the origin? Placing an assembly on the origin should be a few clicks, not scripting.
Yes, I can just not click in the graphics window and everything will be placed on the origin. But development work is hardly ever linear. What if I want to try something out and move an assembly to another location to do so, just to find out that this is no option. How do I get it back to the origin? Just by hopefully remembering how much I moved it?
Why can't I see the mate connectors inside the subassemblies when working in the top assembly (talking about the public model "OS_Tetris_ASM" here)? To my understanding, these mate connectors are used to define the locations.
One thing that might not be obvious is that sub-assemblies are not treated as "solid" (i.e. anything that can move around in a sub-assembly can also move around in a higher level assembly). I can see that your parts are not constrained in your sub-assembly so they will still move around in the higher level regardless of you mating the assembly origins together...
Also note that "fixing" a part in a sub-assembly is a "local" thing that you can use to locate other parts relative to that but doesn't translate to higher levels. If you constrain things relative to each other in a sub, you will need to mate at least one thing in the higher level to "lock" them all in place.
Basically the origin is a lot less "firm" in Onshape assemblies than other CAD systems and Onshape prefers to use geometry directly. It takes a bit of time to get used to it but it does cleanup the assembly tree (no bunch of planes or origins all over the place) but it means you do need to create a MC occasionally if you need a "fixed" reference that doesn't depend on geometry. The assembly structure is also a lot more "fuzzy" so mates are solved the same way regardless of what "level" they are at in the assembly tree.
I think you are on the right track though:
- Create a MC on the origin in your sub-assembly
- Constrain your parts relative to that MC in your sub (with mates and/or group features, not with "fixed")
- Insert these sub-assemblies in your higher level and mate the ref. MC (either to parts or each other or the origin, etc...)
I found the button for updating versions, however, there are no parts or assemblies to update...
Even though it says "Versioned assembly from other document" Version V1
How and why is there a new version that I can't see in the home of onshape / in all my documents?
More versions not doing what I want won't help me a lot I'm afraid.
The problem is that these mate connectors are either not showing up in the top assembly, even though they are clearly defined and visible in the subassembly. Or they are just jumping around and are not located to the origin of the part they are assigned to.
Before it was mentioned that my "top level is referring to a version of them". How do I make my top level NOT referring to a version of them.
A bit off topic: Why does it take six hours for a comment (my last one) to show up here, but then I get answers just minutes later?
A bit off topic as well: Is there any company that offers telephone support or something similar for Onshape? I can't solve how to mate an imported assembly to the origin in 3 days, so I can't imagine how we as a company should productively switch to that software?
The only way you can have a sub-assembly not be a "version" is to have the assemblies in the same document. Anything inserted from a different document has to be a version by definition.
Otherwise any changes you make in one document will not be available in another document until you create a version in the history tree. Move the sub-assembly to the same document and you will be able to use the subassembly's workspace.
If this isn't clear I would suggest going through some of the training on Onshape version management, maybe staring here: https://learn.onshape.com/courses/fundamentals-document-history-and-versions.
1) make an explicit MC on the origin of sub1. I like to name it "sub1 mc"
3) Go to sub1, and insert all the parts. Drag them each around so they are NOT on the origin in their ideal position. One at at a time, mate each part's MC to the sub1mc. By dragging the parts around, it's easier to pick each one's MC. This is the equivalent of ProE's defult constraint in asm mode. (but takes a few more steps). I personally like doing it this way rather than "group" and "fix", but we each have our own preference. Also, often times it's easier picking the MC from the tree, rather than the graphics, especially if there are a lot of them.
4) repeat steps 1-3 for each other sub.
5) make a top level asm. Put an explicit MC as its first feature. Name it "top-sub mc".
6) insert all the other subs inside. Mate sub1 mc to top-sub mc, then sub2 mc to top-sub mc. etc.
Of note, it makes a difference what order you pick MC's when you end up offsetting the parts. I make it a habit to always pick the MC of the part to be placed first, then pick the MC of the asm (or already mated part within the asm) second. The direction of the offsets follows the coordinate system of the first MC.
I largely agree, but you don't really need to drag the parts around. You can select the MCs in the instance list and be more sure you have the right ones.
I usually select the origin MC first and then the part MC. This may be unnecessary/wrong. I would like to understand the offset value signs better so I don't have to guess.
I also try to name all the mates so that it's easier to debug later.
I think I figured it out!
I guess my main problem was the understanduing of the versions in Onshpe.
I assumed any changes in a part/model are automaticely reflected everywhere, where this part is used. Becaue everything is version 1 as long as I haven't made any other revisions/new versions.To my understanding now, any changes are only visible in other models, when a new version, including all the new changes have been made.
For a fasten the order doesn't matter but offsets make a lot mor sense when you pick your "movable" part first and "fixed" reference second:
See for a discussion of how offsets work (which isn't explained properly anywhere in the Onshape docs as far as I can tell...):
https://www.youtube.com/watch?v=8Pe-W-PV-zE
Pin slot mates will also give you different results based on the selection order: https://www.youtube.com/watch?v=9dAkfGNdgGU