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.

Why does this assembly fail when I add one more revolute mate?

RChilcoatRChilcoat Member Posts: 12
https://cad.onshape.com/documents/e2d35ac2d1e44f27c77bde9d/w/f44093b73f72fad5f29e6417/e/695d6496d4cb17d554c17eb7
This is a test assembly of one part six times that is a simplification of what I was trying to do originally.  If I add one of the two possible remaining revolute mates, that should finally close it into a complete hollow assembly, some other mate fails and the almost-closed assembly opens somewhere else.  Is there a better way of assembling this?  Thanks.  Still learning...
Tagged:

Comments

  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 1,564 PRO
    edited August 2020
    @RChilcoat I think you're just starting out and I don't know what other CAD systems you have used. Onshape's assemblies are different, very powerful and require a little more understanding.

    This is not a lesson on assemblies, but a teaser to get you to learn assemblies, it's not that hard.

    You have nothing fixed and your parts aren't located in the assembly:


    So please locate your parts:


    Fix one of the parts:


    These mates are over defining (more later):

    This is mostly due to the fact you have stuff stacked on top of other stuff.


    4 parts & 3 mates (You have parts inside parts, I didn't fix that):





    I think you're setting up an inverse kinematics problem where you want Onshape to solve for the angles that'll close the box up. It'll do this by over constraining (the way you're doing it). Onshape's inverse kinematic solutions are the best I've seen. But give it chance. Build the model without over constraining. Then add one over constraint at a time and let it figure it out. 

    Here's an example of what I'm talking about, a simpler solution:


    Goto position 1:


    Goto position 2:



    I'm fixing the gripper at different locations and Onshape is computing robot angles to make this happen. I'm working with a friend to output these angles in order to program the robot. Training robots with a teach pendant is a pain.  

    This is inverse kinematics or solving the transformation stack backwards. I guess I can't describe it.

    This gives me goosebumps and it's exciting.

    I'm certain Onshape will solve your problem, just feed it a little bit at a time.


  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 1,564 PRO
    edited August 2020
    What I did above isn't an answer; "I know it'll do keep trying"; sorry about that.


    I cleaned your model up and got the 6 parts showing:


    It's still not correct though, look at the part closest in the image above. It's attached to the bottom edge vs. the top edge.

    Now for the hard part. Solve for the angle that makes this all true:


    I believe the answer is 26.565°.

    This is a great little problem but I don't think it's a real assembly thing. I invite you to explore Onshape you're definitely ready.

    Most assemblies are simple. One thing to note about Onshape that other CAD systems messed up, 2 parts & 1 mate connector. Think of the mate as describing the relationship between 2 parts. Others systems use 3 mates to describe this relationship which is so 1990's.

    I'm going to stick my neck out here and state whenever you fix parts using more than one mate, you'll invoke inverse kinematics. Tomorrow I might think that's a wrong statement, so at least today, this is true.

    I like your model because it's involving an inverse kinematic solution which gets me excited. But it's a little more complicated.

    Please keep going, I like where your mind is at.


  • RChilcoatRChilcoat Member Posts: 12
    I'm still learning this program.  I used to own a seat of SRDC Ideas when I had my own company (yeah, I'm that old).  I now teach part time, and I would like to use Onshape as my platform.  This was supposed to be a cabin in the woods I designed years ago in cardboard.  It rests on one of the bottom points where three of the pentagon panels meet and the roof is a mirror image of that. There is a floor inside that I haven't included in this test piece.  I couldn't get the original attempt Onshape assembly to assemble properly so I made just one part with a clearly marked inside and outside and tried to assemble 6 instances of that.  Several of you have suggested I need to place it in space before I start the assembly, but I'm not sure how to do that.  I guess I need to go back and try to understand the basics again.  
  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 1,564 PRO
    edited August 2020
    SDRC omg! Really?

    Onshape would say you don't have to locate your parts, because you don't have to. Their assemblies work fine without locating. Billy says you do have to do it, let's just leave it at that.

    Onshape's tutorials are really good, here's my attempt at explaining re-positioning parts in an assembly:
    https://rustyshed.com/?quill=5e3ed6c6bc6ac00891a70114

    Your model is somewhat complex and I just wanted to point that out. Maybe try and assemble a bolt to a plate with a hole in it. It just builds from there.

    You're good at this and I hope you continue. 

    Good luck,


  • RChilcoatRChilcoat Member Posts: 12
    Billy, the instances you've put above are not what I'm trying to do.  None of these 6 identical parts are a floor.  The assembly will rest on the ground at the point where the 3 panels meet.  The other three will form the roof.  A vertical line could be drawn from the peak of the roof (the point where the three upper panels meet) down to the point where lower three panels meet.  I can't figure out how to fix the first of the lower panels at the correct angle.  Perhaps I should focus on that, first.  

  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 1,564 PRO
    Ok so let's cover branching. Same design just a different idea:


    I deleted all mates, starting over
    Unfixed bottom plate, re-located & re-fixed
    built bottom
    built top
    stuck'm both together



    I switched to a ball mate to stick'm, because it's more forgiving since it's only fixing translations. Rotations are nasty (order dependant) and harder to figure out. It's still solving using inverse kinematics and it's impressive that it does.

    Hopefully this is your want.


  • steve_shubinsteve_shubin Member Posts: 522 ✭✭✭
    edited August 2020
    @RChilcoat

    Here’s an alternative solution. Maybe not as elegant as other ways of doing it

    In this one, everything is a revolute mate

    But instead of using one last revolute mate to close things up, I use LIMITS on one of the revolute mates to lock it in place





  • steve_shubinsteve_shubin Member Posts: 522 ✭✭✭
    edited August 2020
    @RChilcoat

    again not the most elegant solution because if other parts were to move this would be locked into position by whatever degree you set it at.

    But, you can figure out the exact angle if you use in context editing




  • romeograhamromeograham Member Posts: 557 PRO
    Here's another approach to this problem - that requires a little setup in the part studio to establish a vertical axis of the finished assembly...I know this doesn't address the original question ("why can't Onshape solve this purely with revolute mates?") but it does allow you to find the solution without explicitly setting an angle (which can always lead to rounding errors and over-definition).

    https://cad.onshape.com/documents/88614e8e16c6c0a4c0c7258d/w/0d6f6f92a011e362436a4891/e/2acf816910e78215aaa96d74


    A simple bit of geometry in the Part Studio for the panel establishes the angle of the main axis Mate Connector:

    By using the length of the equilateral floor panel, the Measure Custom Feature (just in case the overall size changes in the future), and some math to define the "height" of the floor. By luck (not luck: geometry) the axis lies 1/3 of the way along the "height" of the triangular floor. This allows us to find the angle of the floor relative to the pentagonal panels...we set our Axis Mate Connector to be coincident with that 1/3 point, and voila: we run a couple of check features (the floor triangle and the circular pattern).  Seems to work, right?

    Back in the assembly:

    The assembly uses a Mate Connector along the Z at the Origin, our Mate Connector axis from the Part Studio, a Slider mate (to establish the "roof" at the correct angle) and a revolute (to connect the first roof panel to the first floor panel), and then a simple Circular Pattern to complete the building.

    Seems to produce the correct final building, but in a different way. I think it's valid, because (just like using all revolute mates) you don't need to know the precise angles to do it (particularly the angle of the "floor" panels relative to the "ground".

    This is an interesting one - and I'm sure there are more interesting solutions out there!

    (by doing some of this layout work in the Part Studio, we also have the opportunity to finish up the windows and other components without "in-context" modelling).
  • steve_shubinsteve_shubin Member Posts: 522 ✭✭✭
    edited August 2020
    @RChilcoat
    @billy2

    When I first read about the ball mates that Billy talked about, I thought, I’ll have to use 2 ball mates at a number of the revolute mate locations, and I was lazy to try that.

    Later the thought came to mind — how about I just use ball mates on that last panel, with revolute mates on everything else. And BINGO. That worked like a champ.

    Thanks for the great lesson Billy about the freedom of those ball mates being the solution. That never crossed my mind



  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 1,564 PRO
    edited August 2020
    @romeograham thanks for showing the design.

    Branch for a 3rd try:


    3rd time's a charm.

    I switched to surfaces because the 2 edges so close together makes it to hard to pick the correct one. 
    Same technique insert one surface into assembly, position and fix.
    Copy 5 more surfaces
    Assemble

    Assembly of 6 surfaces; 4 on the base and 2 above:


    It'll do it. The solution is deterministic. None of these surfaces move.

    I believe the problem when assembling using only revolutions is tolerances .

    Math is perfect, computer math is only a good approximation.

    My solution to this problem; the last mate is really just a coincident mate between these 2 vertices:


    The best mate, the one mate that behaves like a coincident mate is the ball mate.

    You can argue that the solution should remove the ball mate and be replaced with 2 revolves. If computers generated perfect math then I'd agree. Unfortunately they don't.

    The assembly can solve this problem with a little help. I've worked with many kinematic software packages and this happens often. This isn't unique to onshape.

    You could loosen up the tolerances and get an answer with all revolutions, but this isn't a better solution. 


  • dave_cdave_c Onshape Employees Posts: 42
    Not for this problem but a similar trick is to use a cylindrical mate when a revolute won't work in a system of mates where you know it should work but the system says overdefined.  It gives the solver one more degree of freedom to work with.  Ball mate gives 2 - and that is needed in this case.  Sometimes when the last mate removes all remaining degrees of freedom in a complex network, the solver can't figure it out.  These are things that should work but these tricks can be a helpful workaround when they don't.  Other cases where cylindrical can help if all rotational locks up are when there are a number of redundant mates (think of a scissor lift).

  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 1,564 PRO
    @dave_c

    I didn't think about cylindrical, just loosening one degree of freedom; could have done it.

    I was thinking you could do it all with ball joints, more of them of course. Not sure if it'd solve faster or would be more robust? 

    It's rare that you have to think in terms of degrees of freedom, but in this case, it helps.


  • dave_cdave_c Onshape Employees Posts: 42
    @billy2 given they are both workarounds for things that in theory should work, it is hard to predict robustness.   I find cylindrical is helpful in cases where the systems has a lot of revolutes that are parallel to each other, sometimes giving one a little extra freedom to slide along the axis lets the system figure it out - even though once it figures it out there is no sliding motion available.   Effectively the cylindrical adds one fewer constraint than a revolute - and even though the extra constraint the revolute adds is effectively redundant, the solver can't figure it out.   I think in your case you are right that the ball mate is effectively a point to point coincident mate - which is the minimum you need to get it the assembly to close.
  • steve_shubinsteve_shubin Member Posts: 522 ✭✭✭
    edited August 2020
    dave_c said:
    ... even though once it figures it out there is no sliding motion available.
    This might be even weirder than the fact that the revolute mate doesn’t work where it should

    Because why wouldn’t the slider portion of the cylindrical mate continue to work ?

    Kind of makes you wonder if whoever coded the solver said — well we got a weird situation here. The revolute mate should work, but it doesn’t. So we’re gonna throw a little weird on top of weird by allowing the cylindrical mate to work in its place. But we’re gonna stop the slider portion of that cylindrical mate from working whenever you throw it into this particular type of mix

    Thanks Dave for more insight into how these mates work


  • dave_cdave_c Onshape Employees Posts: 42
     Basically a solver like this works by trying to figure out what degrees of freedom are still available in the system and then solving to put the system in a valid position with valid motion remaining.  In rare cases, when there is a lot of interconnectedness (think like a closed N-bar mechanism with a rotational mate at each joint) you are actually over-specifying the system putting a rotational mate on each joint, but because the mates are consistent - the system figures it out.  This happens all the time and the system is designed to figure it out.  But in reality in this case you really only need a a ball mate or a cylindrical mate on the last joint.  The solver should figure it out - so when it doesn't it is a bug.  If you get into a case where you think it should work and it doesn't, specifying a mate with fewer degrees of freedom can give the solver a little more leeway to work it out.  It is also a good debugging strategy when it really shouldn't work but you can't figure out why.  Often specifying the less restrictive mate will make it solve and put things is a position where it will become more obvious why the more restrictive mate can't work.
  • steve_shubinsteve_shubin Member Posts: 522 ✭✭✭
    @dave_c

    Quirk was probably a better word to use than weird

    And the workaround was more than easy. In fact — almost hard to call it a workaround at times because when you think of workarounds, you may think of an extra step or two or more. And in the case of using the cylindrical mate on a scissor lift as you mentioned, it wouldn’t require any extra steps, other than noticing the over constrained warning color and then changing from revolute to cylindrical

    As you made clear — it’s more about being familiar with the way CAD (solver in this case) works


  • gauthier_östervallgauthier_östervall Member Posts: 72 ✭✭
    edited March 13
    How funny I ran into the same problem, trying to solve a nearly identical assembly! Somehow the last panel of the bottom half of my dodecahedron cannot rotate, although it is only constrained with a revolute mate. Ah, I had to place the handles in a way that the rotation made sense. With that I can move the last panel into place, but still not add the revolute mate on the sides.

    Or a ball mate. I've tried all ball mates too, since this thread gave me hope, but no cookie.
Sign In or Register to comment.