sketchucation logo sketchucation
    • Login
    1. Home
    2. hpnisse
    3. Posts
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    FredoBend | Powerful new bending tool for SketchUp Download
    H
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 7
    • Posts 101
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: Combining sketchy physics joints

      Hey!
      I don't think it works just with a motor and piston conected to a wheel.
      But if you group a motorjoint together with a box, and then connect the piston to the motor-box-group, then it will work.
      Here is a skp-file with a simple example:

      wheel and piston.skp

      P.S. if you don't want to se the box just right-click and hide it...

      hope this is to some help.

      /hpnisse

      posted in SketchyPhysics
      H
      hpnisse
    • RE: SketchyPhysic - Object in another

      Cut apart the big box in smaller ones, like :
      box in hole.skp

      Then you can move the big box corectly:)

      posted in SketchyPhysics
      H
      hpnisse
    • RE: Pickup an object

      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

      posted in SketchyPhysics
      H
      hpnisse
    • RE: Pickup an object

      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

      posted in SketchyPhysics
      H
      hpnisse
    • RE: Pickup an object

      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.

      posted in SketchyPhysics
      H
      hpnisse
    • RE: Pickup an object

      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

      posted in SketchyPhysics
      H
      hpnisse
    • RE: Change color of a Group.

      Okay,
      I'm not a Sketchup API friend so it would be hard for me to do.
      But thanks for answer.

      by the way, I have the SketchyPhysics3x Jun 27 version.
      And it works perfect.

      /hpnisse

      posted in SketchyPhysics
      H
      hpnisse
    • Change color of a Group.

      Hello.
      Can I change color of a group with script in SP3?
      Example: Change color of a Light from red to green or something else. (the light is a group)

      Thanks for any help, hope you understand.

      posted in SketchyPhysics
      H
      hpnisse
    • RE: Mid-simulation controls

      Thats OK... 👍

      posted in SketchyPhysics
      H
      hpnisse
    • RE: Mid-simulation controls

      if I understand you right you want the slider("strength") to show up direct when the simulation starts:

      put this code in "onthick" in some object(wherever you want:D)

      
      if frame==0
      slider('pitching strength')
      end
      
      

      hope this was the stuff you search for.

      posted in SketchyPhysics
      H
      hpnisse
    • RE: SketchyPhysics 3 Problem

      Have you try reinstall the SP3? 😄

      posted in SketchyPhysics
      H
      hpnisse
    • RE: Speedmeter??

      Okay!
      Thanks!

      posted in SketchyPhysics
      H
      hpnisse
    • Speedmeter??

      Is there any way to get a "speedmeter" in sketchyphysics?

      see my model to understand what I mean.

      this is what I want to do:
      'The servo should raise when the speed on the hinge is raised, is that possible?'
      If not, there would be a good part in SPIV 😄

      thanks for help.
      /Hpnisse


      speedmeder.skp

      posted in SketchyPhysics
      H
      hpnisse
    • RE: 'Stop Timer'-Help Needed

      Okey...

      change the first line

      
      if key("A")==1
      
      

      to

      
      if frame==0
      
      

      all script

      
      if frame==0
       setVar("start",1)
       setVar("stop",0)
      end
      
      if getVar("start")==1
       setVar("time",getVar("time")+1)
      end
      
      if getVar("stop")==1
       setVar("start",0)
      end
      
      

      This is exact that you searching for! (I hope)

      posted in SketchyPhysics
      H
      hpnisse
    • RE: 'Stop Timer'-Help Needed

      I used this code in the 'ontick'

      To start the "timer" press "A" (the SP Controll Panel must be visible and ontouched)

      
      if key("A")==1
       setVar("start",1)
       setVar("stop",0)
      end
      
      if getVar("start")==1
       setVar("time",getVar("time")+1)
      end
      
      if getVar("stop")==1
       setVar("start",0)
      end
      
      

      The timer stops when the box is touched by the ball
      and the timer also start again when you press "A" again.

      if you want to reset the timer every time you press "A" (or another key)
      put this line into the 'ontick' at the third line before the first 'end'.

      
       setVar("time",0)
      
      

      Hope this helps!:D


      this is the changed version

      posted in SketchyPhysics
      H
      hpnisse
    • RE: Timer variable to SPIV?

      THANKS CPhillips!!

      this code was the thing I searched for 😉

      
      if(frame==10)
      UI.start_timer(10){setVar("timer1",1)}
      end
      
      

      But I start/reset it with a "getVar" command... and it works perfect!

      
      if getVar('start')==1
      UI.start_timer(5){setVar("timer1",1)}
      end
      if getVar('stop')==1
       setVar('timer1',0)
      end
      
      

      Why should I don't use it to many timers at the same project? Would Sketchup crash?? 😮

      Thanks again!
      I'm look forward to see SPIV, can it be better than it is now?:D

      posted in SketchyPhysics
      H
      hpnisse
    • RE: Timer variable to SPIV?

      Thanks!

      But that is not the thing I searching for...
      cause:

      @unknownuser said:

      if key("space")==1 then setVar("time",10);end;

      only set a standard variable to 10 with the name "time".

      I search for something that count to ten (or something else), and when it reach the number it would set the variable to 1 (one).

      and with another script it would reset the timer/counter.

      your script is good, nothing wrong, but not the thing i searched for.

      but thanks for the help, I appreciate that 😄

      posted in SketchyPhysics
      H
      hpnisse
    • Timer variable to SPIV?

      I have an idea to the SPIV
      It is possible to create some kind of Timer (clock) in future version of SP?

      I had an idea how to get it look, really simple idea.

      To start the timer: (when the time is reached it would set the variable to 1, one)

      setTime('timer_name',time in seconds)

      example:

      setTime('timer1',10)
      

      a timer at ten seconds

      and to reset it: (set the variable to 0, zero)
      rstTime('timer_name')

      example:

      rstTime('timer1')
      

      Or is it possible already in SP3x or something?
      Thanks for answer and hope that this is possible, it would be a really helpfull stuff in SPIV.
      (sorry for bad English 😄 )

      posted in SketchyPhysics
      H
      hpnisse
    • RE: Frame-cycle

      Okay!
      Now I understand better what [1,2,3,4] part is...
      thanks a lot.
      So you think that I should do a program for every joint, as it was berfore I edited it.
      I would try that and se if I can get it.
      But if you came up with something new and "easier" way so share it, thanks for the help.
      I love SketchyPhysics3 and wait so much for the SPIV version...

      posted in SketchyPhysics
      H
      hpnisse
    • RE: Frame-cycle

      Thanks for the codes...
      But I can't get it work, I don't know if I do right?
      How would you do with the program in the skp-file that I had edited?

      it is the "[1,2,3,4,5,6]" part that I don't understand.

      this is an version that I used, but the only thing that happen is that all values in the robot is set to 1 ('one').

      
      
      if getVar('XXX')==1;
      [
      if((frame%400)>20and(frame%400)<200)
       setVar('snurr',0)
      else
       setVar('snurr',1)
      end,
      
      if((frame%400)>130and(frame%400)<200)
       setVar('XLLed',0.5)
      else
       setVar('XLLed',0.2)
      end,
      
      if((frame%400)>130and(frame%400)<200)
       setVar('SLed',0.9)
      elsif((frame%400)>200and(frame%400)<200)
       setVar('SLed',1.05)
      else
       setVar('SLed',0.8)
      end,
      
      if((frame%400)>160and(frame%400)<300)
       setVar('klo',-1.0)
      else
       setVar('klo',0.5)
      end,
      
      setVar("XXX",0)
      ]
      [(frame/50)%5]; else; 0; end
      
      
      

      I even don't know if I'm on the right way.

      Thank's for the help!

      posted in SketchyPhysics
      H
      hpnisse
    • 1 / 1