Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape, CAD, maker project and design.

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.

Rubiks Cube mate / animation

john_mcclaryjohn_mcclary Member, Developers Posts: 1,310 PRO
Well, I had an epiphany in the shower last night. Couldn't wait to get home an experiment with it.
My plan is to have an animation scramble, by doing a reverse PLL -> F2L then reverse animation to simulate a solve as it would be done by a speed cuber
A quick test shows It "could" be done, but this will take a while... Stay tuned


«1

Comments

  • sebastian_glanznersebastian_glanzner Member Posts: 56 PRO
    Nice! You are pushing the boundaries of Onshape further and further :)
    Please comment and vote for TEXTURES + TEXTURE STUDIO 
    https://forum.onshape.com/discussion/comment/45056/#Comment_45056
  • TimRiceTimRice Member, Moderator, Onshape Employees Posts: 147
    That looks awesome @john_mcclary . I'd love to take a look at the doc when you're done.
    Tim Rice | PD | Support | Community
    Onshape, Inc.
  • john_mcclaryjohn_mcclary Member, Developers Posts: 1,310 PRO
    TimRice said:
    That looks awesome @john_mcclary . I'd love to take a look at the doc when you're done.
    I'll make it public when I get farther. I'm still experimenting with some things here and there, and don't want to mislead people with bad practices.
  • john_mcclaryjohn_mcclary Member, Developers Posts: 1,310 PRO
    Some more progress:
    I was gonna cheat by starting with a solved cube then just running in reverse, but that's no fun :)

    So I scrambled up a cube and wrote the turns down as I went. Then trimmed out a few redundant turns to shorten it a little.
    Now the 6 axis' are all done, and 3 out of the 4 White edges are done.

    So far everything has been working smooth and I haven't hit any snags yet.
    The only issue I do have is the complexity of the mates are starting to make it hard to turn without using the animation tool itself :(
    If you run the animations too fast they can jam the relations.
    if you run the animations too slow there are dropped frames.

    Other than that its starting to look like something now:

  • mbartlett21mbartlett21 Member Posts: 1,142 EDU
    Do you have a link to the document?
    MB (I make FeatureScripts: view FS)
  • john_mcclaryjohn_mcclary Member, Developers Posts: 1,310 PRO
    Yea, i think today ill make a talk thru video on the process of putting in another edge, then i need to figure out a corner and ill post it then. Ill post it.  It's a spiderweb of mates and sub assemblies, it would be tough to see whats happening, even though its pretty simple concept
  • john_mcclaryjohn_mcclary Member, Developers Posts: 1,310 PRO
    edited November 12
    Ok, after a few beers, a headache, a couple meals. I got half way through animating one corner piece...  :s

    I made a short (50min) video explaining everything I could. There were a few things I forgot to mention, but they aren't mission critical, so it is what it is for now.

    I made it public now, but you may want to wait to copy, or copy again later because I do plan on finishing this eventually. And after you see what's involved you may not want to put yourself through that :) 

    I will be hunting next week so you may not hear of much progress because i will only have my cell phone :(

    But this is my top hobby project right now because I've always wanted to make this since I first started solidworks 8 years ago.

    Here is the document: https://cad.onshape.com/documents/936dc91e3f3998485e1f8dfe/w/4d6927be70009dc330c213a3/e/bf77cbf85325eff88c8a0c26

    and here is the video, Enjoy :)


  • mbartlett21mbartlett21 Member Posts: 1,142 EDU
    @john_mcclary
    For some reason, when i try to animate the mate that says animate me, it says "Unable to compute transform. Instance(s) may be constrained"
    MB (I make FeatureScripts: view FS)
  • john_mcclaryjohn_mcclary Member, Developers Posts: 1,310 PRO
    that one is backwards, use a negative number
  • john_mcclaryjohn_mcclary Member, Developers Posts: 1,310 PRO
    edited November 12
    ok, try now. Remember in the video where I thought it was weird how the ends were not lined up with the corner piece's tracks?
    That was preventing the animation from starting at zero.

    it's fixed now, but I wonder how those shifted.. they are in the same group mate with all the rest...

    also, keep in mind the piece I created in the video, and the corner piece are not fully animated yet, so they will not move after a little bit.

  • brucebartlettbrucebartlett Member, OS Professional, Mentor Posts: 1,707 PRO
    I spent my evening watching your video while the rest of the fam was watching a show on Netflix's. I think I had much more enjoyment. Awesome job on making this work and I looking forward to the final episode.

     Hmm... the same group mate hey, I generally trust group mates but sometimes I am not sure they are rock solid, although I think the issues mostly come from the user, so I always try to tread lightly when adjusting something related to a group mate. 
    Engineer ı Product Designer ı Onshape Consulting Partner
    Twitter: @onshapetricks  & @babart1977   
  • john_mcclaryjohn_mcclary Member, Developers Posts: 1,310 PRO
    right, that's why I make a point to only use group mates with parts created in the same part studio.
    but I haven't reviewed the video for when it moved, but it was definitely in position at the beginning of the video, then later was shifted over..

    I Hope I was able to get the point across with all my rambling and mumbling :)
  • brucebartlettbrucebartlett Member, OS Professional, Mentor Posts: 1,707 PRO
    It was great, thanks for posting. You definitely needed that drag and reposition mate for this project to group all the mates together.  This is also where folders will come in handy when implemented. 
    Engineer ı Product Designer ı Onshape Consulting Partner
    Twitter: @onshapetricks  & @babart1977   
  • john_mcclaryjohn_mcclary Member, Developers Posts: 1,310 PRO
    defiantly am waiting on folders :)
  • brucebartlettbrucebartlett Member, OS Professional, Mentor Posts: 1,707 PRO
    For me folders for assy will be great, not sure about part studios with interdependencies between features. In part studio's I have been super happy with the drag of multiple features, this is a constant joy to use. 
    Engineer ı Product Designer ı Onshape Consulting Partner
    Twitter: @onshapetricks  & @babart1977   
  • 3dcad3dcad Member, OS Professional, Mentor Posts: 2,287 PRO
    edited November 12
    I too saved this video for the movie of the night =)

    Awesome job @john_mcclary , just out of curiosity: did you not get the rubik from the local shop when you were a little boy ;) :D

    ps. Do you remember I reported an weird anomaly with the assembly recently, it happened later again and support told me it's something that can happen when using Group and/or Pattern mates within subassemblies - they tied me to improvement to first solve subs then main. I got it fixed with suppress > unsuppress pattern.
    //rami
  • john_mcclaryjohn_mcclary Member, Developers Posts: 1,310 PRO
    When i was a little boy i peeled the stickers (before i knew you could break it apart) :)

    Well, the thing is, the group is broken in the assembly it was defined. And the error also propigated into the higher level assembly. i assumed group just locked origins. Biut the glitches they can cause seem to be more complicated.
  • john_mcclaryjohn_mcclary Member, Developers Posts: 1,310 PRO
    I looked through the video, I think I found out what happened, I suppressed the two tracks, then moved the other. So the position did not update with the group mate. Bug Report? @lougallo
  • brucebartlettbrucebartlett Member, OS Professional, Mentor Posts: 1,707 PRO
    Any updates on the Cube John?
    Engineer ı Product Designer ı Onshape Consulting Partner
    Twitter: @onshapetricks  & @babart1977   
  • john_mcclaryjohn_mcclary Member, Developers Posts: 1,310 PRO
    Well after not seeing any deer for a few days, came back and finished up a couple more edge pieces. Then Discovered the orange block was rotating backwards.. oops.. So fixed that and the few blocks that revolved around it.

    Named all the tangent mates to make debug easier.

    Found a stupid easy way to check next rotation to sketch.
    Just mouse over the rack and pinion relation... seems obvious now though :)


  • john_mcclaryjohn_mcclary Member, Developers Posts: 1,310 PRO
    Sorry, when I have a better way to do something, I'm usually one to start over and take that path...
    So its refactor day!

    Breaking out the part studios

    Sorry about that loud F bomb in the background... Wife was watching the Redwings loosing :(

  • john_mcclaryjohn_mcclary Member, Developers Posts: 1,310 PRO
    Refactoring and edges done.
    Finished up the first corner block.

    The animation only works around 3000 frames now, because some of the tangents are getting too much for Onshape.

    7 Pieces to go. Hope it will still animate after those pieces.


  • 3dcad3dcad Member, OS Professional, Mentor Posts: 2,287 PRO
    Beautiful! I know it's the same logic copied over and over again but I still admire your devotion to this subject :+1:
    //rami
  • john_mcclaryjohn_mcclary Member, Developers Posts: 1,310 PRO
    Well, at this point it's gonna be whether or not Onshape's mates take a puke before it's done.

    That web of tangent mates locks up almost instantly if you don't suppress them all (except the 6 central axis and 3 axis of the piece you're working with)
    That's why I need to animate starting around 3000 steps right now. It takes about 3 minutes to get the animation rendered before it starts moving. So it is a stress test for Onshape at this point too :)
  • john_mcclaryjohn_mcclary Member, Developers Posts: 1,310 PRO
    Almost... There... 4 corners left...
    Not sure if you have noticed, but I switched to Firefox in the last video and have been using that since the edges have been done.
    Chrome really struggles to stay smooth while moving the animation slider by one rotation.
    Sometimes the graphic area won't update until I've moved the slider about half inch or so.
    Seems to be worse the longer it is open. Not sure if there is a memory leak, or just chrome poor memory management. But Firefox has been more stable with this.

    Also my internet has been shotty lately, probably from squirrels hiding nuts in the ISP's cabinets. :) So progress has been a little slow.

     
  • owen_sparksowen_sparks Member, Developers Posts: 1,823 PRO
    Awesome :+1:
    Production Engineer
    HWM-Water Ltd
  • mbartlett21mbartlett21 Member Posts: 1,142 EDU
    :+1:
    MB (I make FeatureScripts: view FS)
  • john_mcclaryjohn_mcclary Member, Developers Posts: 1,310 PRO
    Paths are done!

    Just some clean-up to ensure the thing still animates.
    I stopped being able to animate it before the last two pieces, so I need to tweak a few things.

    Almost.... Done...


  • 3dcad3dcad Member, OS Professional, Mentor Posts: 2,287 PRO
    :star: :star: :star: :star:

    //rami
«1
Sign In or Register to comment.