sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Door hinge servo not working

    Scheduled Pinned Locked Moved SketchyPhysics
    14 Posts 2 Posters 2.3k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R Offline
      rhots
      last edited by

      Thanks again SK !!! The hinge is life size, 1 1/2"x 4" x 1/8" thick plates. Leaving the servo full size and changing to default worked great. Now if I could get Sketchup to stop crashing every other time I try to run a model I'd be a happy camper.
      Thanks again,
      Rick

      1 Reply Last reply Reply Quote 0
      • S Offline
        sketchyKev
        last edited by

        Cheers! You can scale your joints down by a factor of 10 so that they don't look so out of place, just don't scale down by 100! On the subject of scaling you should get the "Fredo scale tools plugin" (if you have not already). It is vastly superior to the standard Sketchup scale tool, easier to use with lots of additional features. For example you can increase the height of a door without turning the door lock hole into an elipse and you scale in 3 dimensions from the centre by clicking ctrl once and typing a number in (something you cannot normally do). The plugin comes with a very good illustrated pdf manual explaining the features. Rather than scale all the individual servos down by a factor of ten you could build the whole model scaled up by a factor of ten and then scale the completed model down by a factor of ten at the end. Just make sure all your dimensions are properly attached so that they adjust correctly with any scaling operations. πŸ˜‰

        1 Reply Last reply Reply Quote 0
        • R Offline
          rhots
          last edited by

          Okay Kev, here is where I am at...as you can see I still need to work out having the catch be attached to the door. Also is there a way to make the joints, weather it be a slider, hinge, etc. NOT jump to the mid point of the motion. For instance with this door, as soon as you start it it opens half way. It would be nicer and more realistic if it just stayed put until the arrow key was "hit".
          Thanks,
          Rick


          DOOR.skp

          1 Reply Last reply Reply Quote 0
          • R Offline
            rhots
            last edited by

            New door file...I got the catch to move with the door. Now if I can just get the door to stay closed until I open it.
            Rick


            DOOR2.skp

            1 Reply Last reply Reply Quote 0
            • R Offline
              rhots
              last edited by

              Think I got ....changed from servo to hinge.


              DOOR3.skp

              1 Reply Last reply Reply Quote 0
              • S Offline
                sketchyKev
                last edited by

                OK, I had a look at your model and there were a number of problems making it tend to crash.

                First attached file is with your original keyboard controllers but now nothing moves until you press the arrow keys.
                Have a look at the control codes to see how this is done.
                One problem that was causing glitches is the small size of the door latch. I solved this by increasing its density setting.
                The other problem is that the hole that the latch passes through does not really exist and SP sees the door as a solid rectangle.
                I solved that problem by making the edge of the door and the door knob status into "no collision" and "ignore".

                The second file uses the usual control sliders to control the door and the latch but they do not start moving until you move the sliders.
                The code prevents the door swinging in the opposite direction past the door frame so that it opens only one way.

                It might look like the door catch is moving when the door is opening, but this is just due to the centrifugal momentum of the piston which weighs a lot. It is not just symbolic!
                Overall it probably not worth animating the door latch as it such a small part and causes more problems than it worth.

                Hopefully the things I mentioned above will make your model less buggy and crash prone.


                DOOR3b.skp


                DOOR4b.skp

                1 Reply Last reply Reply Quote 0
                • R Offline
                  rhots
                  last edited by

                  Okay Kev, you're up...new challange...my door and catch work as I want, now I added a door knob which works great until I add collision to the group with the knob and knob hinge. I think it is just a matter of grouping the correct items, but I can't seem to get it right.
                  Thanks,
                  Rick


                  DOOR4.skp

                  1 Reply Last reply Reply Quote 0
                  • S Offline
                    sketchyKev
                    last edited by

                    @unknownuser said:

                    Okay Kev, you're up...new challange...my door and catch work as I want, now I added a door knob which works great until I add collision to the group with the knob and knob hinge. I think it is just a matter of grouping the correct items, but I can't seem to get it right.
                    Thanks,
                    Rick

                    Hi Rick,

                    Your right. The knob was connected to the static white frame block preventing the knob moving with the door. I've connected the door to the knob hinge and that fixed the main problem.

                    I have also added a bit of a door frame for the door to shut flush to, an extra hinge to make the whole structure a bit more rigid and tweaked some of the density and collision settings. Have a look at the attached file. It seems to work quite nicely now. (Left arrow button to open door and rotate handle.)

                    Kev.

                    P.S. The new door frame parts are in a new layer that you can turn off anytime πŸ˜‰


                    DOOR7.skp

                    1 Reply Last reply Reply Quote 0
                    • R Offline
                      rhots
                      last edited by

                      You ARE the man! One question, the original top door hinge has "+0.01" after the ("rightx"). I tried it with and without it and saw no difference. What is that for?
                      Thanks again.
                      PS Nice door jamb/stop
                      Rick

                      PSS I just tried it with whole numbers....WOW....all kinds of "stuff" happens!

                      1 Reply Last reply Reply Quote 0
                      • S Offline
                        sketchyKev
                        last edited by

                        @unknownuser said:

                        One question, the original top door hinge has "+0.01" after the ("rightx"). I tried it with and without it and saw no difference. What is that for?

                        The "+0.01" was necessary to make the door shut completly flush against the door frame (at least on my PC). You might need to look from above the door to see the difference. I figured since you make highly detailed models you would appreciate little details like that. πŸ˜‰

                        @unknownuser said:

                        PSS I just tried it with whole numbers....WOW....all kinds of "stuff" happens!

                        Hinges and servos behave badly if asked to rotate more than 179 degrees in a given direction. Adding 1 to "rightx" changes the range of values from (0 to 1) to (1 to 2) which changes the range of movement from (min=-90 to max=90 degrees) to (min=90 to max=270 degrees).

                        1 Reply Last reply Reply Quote 0
                        • R Offline
                          rhots
                          last edited by

                          Hav'n fun now


                          DOOR and window.skp

                          1 Reply Last reply Reply Quote 0
                          • S Offline
                            sketchyKev
                            last edited by

                            @unknownuser said:

                            Hav'n fun now

                            You seem to really have got to grips with SketchyPhysics now. πŸ˜„

                            Nice surprise in the model. 😲

                            1 Reply Last reply Reply Quote 0
                            • 1 / 1
                            • First post
                              Last post
                            Buy SketchPlus
                            Buy SUbD
                            Buy WrapR
                            Buy eBook
                            Buy Modelur
                            Buy Vertex Tools
                            Buy SketchCuisine
                            Buy FormFonts

                            Advertisement