25 Replies Latest reply on Jul 12, 2018 6:49 AM by John Stoltzfus

    Motion Study (Animation) Help Required

    Rob Edwards

      EDIT:  Thankyou for everyones contributions.  I do not currently have the time to assess all the solutions offered, and mark one correct as I have to focus on other work now.  But I will return to this later.  Thanks again.

       

      Hey Up!

       

      I'm trying to produce an animation of this door opening from 0 to 95 degrees.  I'm not very experienced with motion studies but I can normally get them to work eventually.

      This model I can't get close.  Even limit mates are proving a problem.

      I think it's because the geometry is a bit odd with a skewed axis.

       

      I've exhausted all my ideas!

       

      Thanks for looking.

       

      2016 attached.  (The assembly is the one with motion in the filename)

        • Re: Motion Study (Animation) Help Required
          Piotr Szulta

          Hi Rob!

           

          if it's only about animation why don't you use Mate Controller?

           

          could you send files via pack and go?

          • Re: Motion Study (Animation) Help Required
            Piotr Szulta

            then maybe sth wrong with the file. doesn't matter. try mate controller, it will be perfect for you!

            SOLIDWORKS Quick Tip - Mate Controller - YouTube

             

            if MC won't be good for you, let me know.

            • Re: Motion Study (Animation) Help Required
              John Stoltzfus

              Rob Edwards - I just posted here on pretty much the same mating subject..  Once you tied your mates down then the motion study is simple..

              • Re: Motion Study (Animation) Help Required
                Dennis Dohogne

                Rob,

                I have not downloaded your files, but if you were to investigate the mate controller you should be able to start out with the door closed and then have it move to your open position within a given time frame.  If your assembly moves by just dragging the door then you can tell the mate controller to move the door from 0 degrees to 95 degrees.  You can also adjust the time scale you can make this happen in whatever length of time you desire.

                 

                Okay, I did just download your files.  Swinging the door will be easy to do with the mate controller, once you get the door to behave with free dragging.  I suppressed Coincident4 and 7 and can swing the door, but there are obviously problems with this.  You have a wonky arrangement, and knowing you as we do you have a legitimate reason for that.  Try suppressing one hinge and mate the door and frame to the other just as you want it and then make the second hinge follow along.

                  • Re: Motion Study (Animation) Help Required
                    Rob Edwards

                    Hi Dennis

                    Dennis Dohogne wrote:

                     

                    Rob,

                    I have not downloaded your files, but if you were to investigate the mate controller you should be able to start out with the door closed and then have it move to your open position within a given time frame. If your assembly moves by just dragging the door then you can tell the mate controller to move the door from 0 degrees to 95 degrees. You can also adjust the time scale you can make this happen in whatever length of time you desire.

                     

                    Okay, I did just download your files. Swinging the door will be easy to do with the mate controller, once you get the door to behave with free dragging. I suppressed Coincident4 and 7 and can swing the door, but there are obviously problems with this. You have a wonky arrangement, and knowing you as we do you have a legitimate reason for that. Try suppressing one hinge and mate the door and frame to the other just as you want it and then make the second hinge follow along.

                    Thankyou for your advice.  I had a fresh look this morning and I think I just have one redundant mate.  (coincident4 or coincident7)

                    As it stands though the door could swing freely.  The issue I had was the age old problem of 'flipping'

                     

                    Although occasionally the assembly decided it was fully constrained!  Reload solved this.

                     

                    The hinges themselves are 'wonky'  The bodies are twisted and I used a boundary boss to make them.  Which is why I mated with a sketch point and an edge (3 points) on the top hinge and just a single sketch point on the bottom.

                     

                    Unfortunately I do not have time to look at using mate controller as the next job is already overdue.

                     

                    In the end I created a plane normal to the hinge axis and a 3d sketch of a simple arc.  A reference point on this arc was used to mate coincident with the face of the door and then a macro to create the motion.

                     

                    Not ideal but I just had to get the job done which is probably the biggest cause of my wonkiness.  I will definitely look at the suggestions given here when I get a breathing space.

                     

                    If anyone is interested

                     

                    here is my macro..

                     

                    Option Explicit
                    
                    Sub main()
                        Dim swApp As SldWorks.SldWorks:    Set swApp = Application.SldWorks
                        Dim swModel As SldWorks.ModelDoc2:  Set swModel = swApp.ActiveDoc
                        Dim swDim As SldWorks.Dimension:    Set swDim = swModel.Parameter("D1@Point2")
                       
                        Dim OutputFolder As String: OutputFolder = "C:\Users\Rob\Desktop\New Folder"
                       
                        Dim FPS As Integer: FPS = 30
                        Dim AniLength As Integer: AniLength = 12
                       
                        Dim TotalFrames As Integer: TotalFrames = FPS * AniLength
                       
                        Dim Startval As Double: Startval = 0.1
                        Dim FinishVal As Double: FinishVal = 1.1
                        Dim StepVal As Double: StepVal = (FinishVal - Startval) / TotalFrames
                       
                        Dim Lerrors As Long, Lwarnings As Long
                       
                        swDim.SystemValue = Startval
                        swModel.EditRebuild3
                       
                        Dim f As Integer
                        For f = 1 To TotalFrames
                           
                            swDim.SystemValue = swDim.SystemValue + StepVal
                            swModel.EditRebuild3
                            Call swModel.Extension.SaveAs(OutputFolder & "\IsoFrame" & Format(f, "00000") & ".jpg", 0, 1, Nothing, Lerrors, Lwarnings)
                       
                        Next f
                       
                    End Sub
                    

                     

                    I then used the free version of lightworks to edit the stills into video.

                    Lightworks comes highly recomended.  It is very fast!

                     

                    and here is my video Rising Hinges Concept - YouTube

                      • Re: Motion Study (Animation) Help Required
                        Deepak Gupta

                        You could use the animation (motion study) exported as series of BMP images (with PV 360 rendering) and then use any free tool to make them into a movie.

                          • Re: Motion Study (Animation) Help Required
                            Rob Edwards

                            Deepak Gupta wrote:

                             

                            You could use the animation (motion study) exported as series of BMP images (with PV 360 rendering) and then use any free tool to make them into a movie.

                            Good Morning Deepak

                            That's exactly what I'd like to do.

                            I've only just got access to PV360 (new seat of Pro) and I'd really like to use it but I have a few problems to solve first.

                            I can't get the motion study to work with this assembly at all .

                            I did look at the api functions for ray tracing which doesn't look too hard but I'd rather learn how to use it manually first to understand all the options.  A couple of initial renders I did didn't look great.

                            The free version of lightworks I'm using limits export to 720p

                            Time is my major problem

                            and there is just no money in this particular job!

                             

                            But I'll get there I hope The client has approved the concept and I'll be visiting our blacksmith today.  I'm a bit nervous to be honest.  I think they will be difficult to make accurately, I'm just going to give him some 1:1 drawings.

                            I think fitting will be fun! (hmmm)

                            Anyway it's all a good challenge.  Hopefully I get slightly better each time

                          • Re: Motion Study (Animation) Help Required
                            ömür tokman

                            Can you add an assembly.

                            I wonder

                        • Re: Motion Study (Animation) Help Required
                          Amit Nara

                          Hi Rob,

                          Issue is with mates, they are over defining the assembly. We cannot even move door by dragging.

                          I have edited your assembly.

                          I have attached assembly and video. Files are saved in SW 2018.

                           

                          Thanks,

                          Amit

                          • Re: Motion Study (Animation) Help Required
                            John Stoltzfus

                            Rob Edwards - Just a quick note,  I didn't take the time to download your files and add what you need for assemblies like this. 

                             

                            • Anytime you have an assembly where your dealing with strange alignments and you need to run an animation, then add internal points or spheres that you can't see and mate to them.  So there would be a very slight rotation happening within the hinge, enough to make SW go crazy, but in a real life application the hinge would only flex just a tad, this is what I expect would be the case in your application.  So have one hinge locked in to the rest of the frame etc and have the other hinge just follow along.

                             

                            Let me know if you need further assistance and I'll do the assembly for you...

                              • Re: Motion Study (Animation) Help Required
                                Rob Edwards

                                Thanks John

                                 

                                I was very careful to make sure there was no play in the hinge as the rotation happened.  In real life there will be as they're hand forged, but in the perfect mathematical CAD world it was fine.  The problem was the face of the door (Front  Plane of the part) tilted forward and then backwards relative to the face of the frame during the rotation.  This animation shows what I mean

                                Rising Hinges Top View - YouTube

                                 

                                This caused a strangeness I hadn't anticipated.  When I applied an angle mate between these two faces (as I would normally do for a door) it worked fine for free motion (dragging), but the limit angle mate (0 - 95) allowed the door to swing both ways which was very odd to me.

                                The rushed solution I used was to use a ref point on an arc, and then mate to that -  but motion study didn't like it.  It was just one of those unexpected jobs that had to be done in a hurry -  an oversight that had to be dealt with on the fly.

                                I'm very tempted to redo the assembly and see if I can do it better.  Maybe I'll get the chance and if I do I'd love you to take a look.

                                I think the only way to improve is to be open to suggestions and just keep trying.  I found it an interesting problem.

                                Thanks again to everyone who helped..  I'm going to see the results soon, I'll be fitting the week of the 16th.  If it's not too much of a PITA to fit I'll probably use it again sometime.

                              • Re: Motion Study (Animation) Help Required
                                Rob Edwards

                                Well I picked up the blanks from the blacksmith and mocked them up on the bench.

                                Fingers xd it looks like it will work,,

                                This job epitomises why I love/hate Solidworks.

                                love it because it's an incredible tool for creating geometry.

                                hate it because it's so damn tricky.

                                anyway I'll find out for sure next week.,, I've still got some head scratching to do.

                                Workshop Mockup Rising Hinge - YouTube