6 Replies Latest reply on Jan 28, 2016 3:47 PM by James Riddell

    Hi! A pack of cokes..

    Bob Larry

      Hello all-


      I'm new to solidworks but I have worked with other 3D design programs.


      I have two parts: (1) a rectangular shell with the rough dimensions of a 12 pack of soda and (2) a coke can.


      I'd like to fill this box up with cans using 'real world' constraints and physics. IE- the cans don't poke through the box and obey gravity.


      I've worked in assemblies and mated parts before but I can't quite wrap my head around how to go about this.



        • Re: Hi! A pack of cokes..
          Glenn Schroeder

          Welcome to the forum, and to using SolidWorks.  Creating a soda can and the box should be fairly straightforward.  Then you can create an assembly with the box and one can.  It shouldn't be too much trouble to mate the can in one corner, then use a Linear Pattern to add the other 11 cans.  If you're having problems with those things, if you can post more specific information about where you're stuck it would be helpful.


          As far as the cans obeying gravity, I'm not sure about that.  Do you mean that maybe the box is slightly larger than required for the cans, and you want the cans to move in the box as the box is rotated?  If so, it can't be done in a standard Assembly, but it might be possible with SW Simulation.  I don't know enough about it to answer that, but I'm sure someone else can.

            • Re: Hi! A pack of cokes..
              Bob Larry

              Thanks for your reply, Glenn.


              Your second paragraph pretty much hits the nail on the head for what I'm trying to accomplish.  You've done me a favor by confirming this is not something that can be done in a standard assembly. So I guess my question is more simulation than assembly oriented!

            • Re: Hi! A pack of cokes..
              Josh Chapman

              SW doesn't simulate gravity. You could probably create an animation that demonstrates it, but be prepared to spend all day to get it right. You might be able to use some advanced mates to allow the parts to move around within the constraints of the box. but you will still have to impose gravity force manually.

              • Re: Hi! A pack of cokes..
                David Paulson

                Within SW assemblies considting of parts, those parts can interfere with each other unles the parts are constrained by mates.  You might be able to use SW Motion to impart gravity effects on the parts, but you will still have to establish mates that define the interaction of the parts.  There may be some physics programs that have the ability to do this as you suggest, but within SW you have to define the rules (mates) that will govern the degree of movement of the parts.

                • Re: Hi! A pack of cokes..
                  Scott Stuart

                  If you model the box and cans as an assembly and insert 12 individual cans (not a pattern) you can use the move component command (Tools->Component->Move) with the physical dynamics option turned on. This will make the cans behave somewhat realistically, so that as you drag one can around it pushes the others around in the available empty space. This doesn't simulate gravity however, so you'd probably need to mate the 12 cans to the bottom of the box. That's as close as you're going to get without using Simulation.



                  • Re: Hi! A pack of cokes..
                    James Riddell

                    Many years ago there used to be a software called Working Model which could handle something like this in 2D fairly easily.  If you were to try this in SW simulation you'd have to do a non-linear analysis.  You'd have to set up contact sets between each surface and *all* the others.  Then, if the stars were aligned properly, you might get it to run in a week or two (SWAG estimate, not for quote).


                    You might be able to set something up in 2D, again, non-linear, but you could treat the box as a rigid surface.  I'm not at all sure how you'd go about setting up the 'cans' material properties.