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.

Options

How to Quickly Affix Assemblies with Offsets Between Components?

dave_mankoffdave_mankoff Member Posts: 11 ✭✭
edited July 2023 in Using Onshape
I have a bunch of individually modeled buttons and knobs and gauges, etc. that I am trying to lay out. Once laid out, I want to use them in another context to create a faceplate that they fit into.

The simplest way would seem to be to lay out all the parts with a "planar" mate, drag them around until they look good, then change that planar mate into a "fastened" mate.

Is there way to do this, or anything like it? Every time I create a fastened mate, it snaps the two parts together, and then I have to go back and manually type in some offsets to restore them to where they approximately were before. If "fix" the parts, then I get some sort of warning about "other part(s) fastened to the origin".

How can I tell Onshape to turn the current position of an object into a fixed mate without moving it?

Comments

  • Options
    S1monS1mon Member Posts: 2,383 PRO
    There's not really a great workflow that I've found for this. You can set up planar and/or parallel mates which will allow the part to be dragged around with some constraints, but when you find the "right" location, there's no good way to convert that to the current offsets. This is also annoyingly true of imported files.

    You can right-click on a part and fix it or you can group a bunch of parts. In general you really only want to fix one part per assembly as a way of locating the parts with respect to the origin. Fix mates are ignored at the next level assembly. 

    I would love to have a way to convert a mate into a set of offsets without moving the parts. See this improvement request.
  • Options
    eric_pestyeric_pesty Member Posts: 1,523 PRO
    You can't convert it automatically but you can see the current "offset" from the base position when you select the mate. This also allows positioning accurately (ex using a round number!) by typing in a value. All you have to do after that is type the two values into the offset when you convert to a fastened mate.

    Or you could just fix all the knobs and delete the mates, then create you context. You don't even have to fix anything really, as long as they are where you want them when you create the context, you'd want to mate them to the holes you created in the context afterwards anyway. If you need to update the position later, just suppress the mate and move the knob with the triad to keep in the correct plane, it also allows precise positioning by typing value instead of just random drag, then once the context is updated just un-suppress the mate and you are good to go!.

    Something like this (I first convert the mate to fixed but then I blow it away and use the "fix" option, only realized later the "fix" isn't required):


  • Options
    nick_papageorge073nick_papageorge073 Member, csevp Posts: 672 PRO
    You could make the assy twice. The first time do it like you are saying with a planer mate and drag things around. Then copy/paste all the parts in one shot, and assemble each with a fastened mate to the origin, and eyeball each so they are right on top of the planer mated parts. Then, delete all the planer mated parts.

    One thing I'd recommend is editing the implicit MC of each part (before you finish the mate) so its xyz is pointed in a logical direction, and all parts move the same. This is an extra step, but so worth it. If you want to move part 3 to the right 5mm, you would edit its X direction mate to +5mm, and you will have confidence it will move in the expected direction.
  • Options
    nick_papageorge073nick_papageorge073 Member, csevp Posts: 672 PRO
    ...snip...

    you'd want to mate them to the holes you created in the context afterwards anyway.

    ...snip...
    You do it like that? Doesn't that create a circular reference? I keep my components mated to the MC at the origin, and then the sheetmetal they attach to is edited in-context with the mounting features. But I keep the original mate scheme.
  • Options
    eric_pestyeric_pesty Member Posts: 1,523 PRO
    ...snip...

    you'd want to mate them to the holes you created in the context afterwards anyway.

    ...snip...
    You do it like that? Doesn't that create a circular reference? I keep my components mated to the MC at the origin, and then the sheetmetal they attach to is edited in-context with the mounting features. But I keep the original mate scheme.
    Why not? That's the beauty of Onshape's in context system, it doesn't matter that it's a "circular" reference, it handles it just fine. This avoids requiring a weird mating scheme from the origin that you describe and ensures things are mated properly.

    The only thing you need to do if you need to update a context that is defined that way is to suppress the mate(s) to allow you to move the part(s) as I have shown above (assuming you want to move the part(s) from the assembly), if you are going to do this a bunch of times you can setup a configuration to toggle the mates (if you throw them in a folder it's really easy), then it becomes a super simple workflow: switch configuration, move your things, update context, switch configuration back, no risk of mis-alignment an no "manual" mating.

    This also allows you to do small tweaks from the part end as well without ending up with parts in the wrong place at the assembly level. For example if you need to move a part .25" to the right, do a move face (the part will move in the assembly) update the context, delete the move face. You do have to be careful here as that's is where the circular nature can get you, if you leave a blind move face like  this your part will end up moving by .25" every time you update the context (it's analogous to temporarily suppressing the mate). Of course if you move it to reference another context entity (eg. "up to" with offset), then it will be fine.

    So I find it's the best of both worlds and gives you a lot of flexibility.
  • Options
    JPMJPM Member, csevp Posts: 9 PRO
    I've used Group in similar situations. If I need to move an item, I suppress the group, make a move manually and unsurppress the group. I really appreciate how much control Onshape gives in manually moving parts.
Sign In or Register to comment.