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

    Pickup an object

    Scheduled Pinned Locked Moved SketchyPhysics
    13 Posts 4 Posters 1.3k Views 4 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.
    • C Offline
      christcm
      last edited by

      I have figured out how to pick up the load. I just needed to beef up the size of my hook and the size of the ring (in cross section diameter). I added a clasp on the hook to keep the load on as well. I tried to attach the model but it is too large.

      1 Reply Last reply Reply Quote 0
      • H Offline
        hpnisse
        last edited by

        Hello!
        Is there any way to pick up somethinge with a script?
        I have one script:

        
        ontouch{|toucher,s,p|
           if getVar("var1")==1 
             case toucher.name 
                 when "NAME"
                    connect(toucher,"fixed")
              end
           else
              ontouch{} #turn off ontouch event.
           end
        
        

        But this script do not work, cause when it hit an object will the Sketchup and Physics freeze.

        So, is there a script that can be turned on with a "getVar("Var")==1", and when the "var" is 0 it will release the object, just like pneumatic vakum.

        Thanks for any help!
        /hpnisse

        ` /hpnisse`
        ` Windows 7 U -Sketchup 8 -SketchyPhysics 3.2-Dec2 - from Sweden`

        1 Reply Last reply Reply Quote 0
        • P Offline
          phy
          last edited by

          ontouch{|t,s,p|
             if getVar("var1")==1 && t.name=="NAME"
                          connect(t,"fixed")
                end
                ontouch{} #turn off ontouch event.
          }
          

          There you go, but remember you can't upload the model to the warehouse cause your using the June 27 version of sp. you can post the model here though.

          Tableau de comparaison de Staxyn s'agit d'un mГ©dicament uniquement sur ordonnance.

          1 Reply Last reply Reply Quote 0
          • H Offline
            hpnisse
            last edited by

            Thanks for that, but it will freeze when the "hook" touch the box. Why??
            Se if you, or someone else can get it to work.

            PICK MASKIN.skp

            (all stuff is controlled by sliders)
            thans again.

            ` /hpnisse`
            ` Windows 7 U -Sketchup 8 -SketchyPhysics 3.2-Dec2 - from Sweden`

            1 Reply Last reply Reply Quote 0
            • P Offline
              phy
              last edited by

              if slider("var1")==1;setVar("var1",1);else setVar("var1",0);end
              

              put that in the ontick in place of

              slider("var1")
              

              only problem is once it rejects it, it rejects it and when it picks it up it picks it up 😕 🎉 😒

              Tableau de comparaison de Staxyn s'agit d'un mГ©dicament uniquement sur ordonnance.

              1 Reply Last reply Reply Quote 0
              • C Offline
                camokid11
                last edited by

                a simple idea would have been to use a controled magnet which has some stabalising around it to stop it from spasing out. simple is always better, why need long scripts

                If you can read this, thank a teacher.
                If you can read this in english, thank a soldier.

                1 Reply Last reply Reply Quote 0
                • C Offline
                  christcm
                  last edited by

                  How would you use a controlled magnet? I started with a magnet but it didn't cause the two objects to stick together for me.

                  1 Reply Last reply Reply Quote 0
                  • H Offline
                    hpnisse
                    last edited by

                    I didn´t get the script idea to pickup an object to work, it will always freeze.

                    and if I use a controlled magnet: the SP.Simulation wont start, and when I press "resetPhysicsSim button" this box come up:

                    @unknownuser said:

                    error resetting the simulation: : undefined method ´/´ for nil:NilClass
                    C:/Program Files/Google/Google Sketchup
                    7/Plugins/SketchyPhysics3/sketchyphysicstool.rb:1270:in
                    ´resetSimulation

                    wierd??
                    (and there can not be the Physics Installation that did´t work cause when I start a new Sketchup and start it will work just fine)

                    Anyone that can fix the problem with either the script system or the magnets?
                    thanks:D
                    /hpnisse

                    ` /hpnisse`
                    ` Windows 7 U -Sketchup 8 -SketchyPhysics 3.2-Dec2 - from Sweden`

                    1 Reply Last reply Reply Quote 0
                    • P Offline
                      phy
                      last edited by

                      what version are you using?

                      Tableau de comparaison de Staxyn s'agit d'un mГ©dicament uniquement sur ordonnance.

                      1 Reply Last reply Reply Quote 0
                      • H Offline
                        hpnisse
                        last edited by

                        In menu,
                        Help/About Sketchup Physics:

                        @unknownuser said:

                        SketchyPhysics3.
                        hh´ttp://code.google.com/p/sketchyphysics2
                        Copyright 2009 C Philips.

                        In the simulation window:

                        @unknownuser said:

                        SketchyPhysics3x Jun 27

                        so I guess it is SP3x

                        ` /hpnisse`
                        ` Windows 7 U -Sketchup 8 -SketchyPhysics 3.2-Dec2 - from Sweden`

                        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