Sketchup plugin – SketchyPhysics

sketchyphysics logo
SketchyPhysics is een gratis en unieke plug-in voor SketchUp Pro. Het programma kan objecten laten bewegen, vallen, roteren, etc.

Sketchup compatibiliteit:
SketchyPhysics v3.1, v3.2, v3.5.6 (getest) voor SketchUp 8
SketchyPhysics v3.3.0+ voor SketchUp 2014 en Sketchup 2015 (32-bit)

Werk NIET met Sketchup 2015 64-bit!

Download SketchyPhysics2 @ Google Code
Download SketchyPhysics3 voor SketchUp 8 @ Google Code
Download SketchyPhysics3 voor SketchUp 2014/2015 @ Google Drive
Download SketchyPhysics 3.6.0 @ Sketchucation forum
Download SketchyPhysics 3.7.0+ @ 5mp.eu

Installatie van Sketchup plugins/tools/libraries: Sketchup info

SketchyPhysics Handleiding


Interactief met de buitenwereld communiceren via SketchUp SketchyPhysics? bekijk het voorbeeld script!

Virtual 3D Device port SU08 logo


Events

Events are defined in the Scripted field in the UI.

  • ontouch

  • ontouching

  • onuntouch

  • onstart

  • onend

  • onpreframe

  • ontick

  • onpostframe

  • onclick

  • ondrag

  • onupdate (not documented)

  • onunclick


Script functions

Simulation variables

Varibles are used to communicate between fields and bodies. Setting a variable in the scripted field and reading it in a controller field for example.

  • setVar(name,value)
  • getVar(name)
  • getSetVar(name,value=0)#shortcut function that allows you to get the current value and set it at the same time.

Inputs

Inputs return a value depending on the state of the key/joystick etc. For example key(“space”) returns 1.0 if the space key is down 0.0 if it is not.

  • key(name)
  • joy(name)
  • joybutton(name)
  • slider(sname,defaultValue=0.5,min=0.0,max=1.0)

Physics body

These functions change the physics body as described.

    • magnetic=true/false
    • nocollision=true/false
    • solid=true/false
    • push(direction)
    • getVelocity()
    • setVelocity(velocity).

    • setLinearDamping(damp)
    • setAngularDamping(damp)
    • getTorque()
    • setTorque(torque).

  • destroy()
  • teleport(pos,recurse=true)
  • copy(pos=nil,velocity=nil,lifetime=0)
  • split(bdy=self,recurse=0)
  • setCamera()

Joints

  • createJoint(parent,child,type=”ball”,min=0,max=0,accel=0,damp=0,breakingForce=0)
  • disconnect()
  • attach(child,breakingForce=0)#shortcut that creates a fixed joint connection to child
  • connect(child,type=”ball”,min=0,max=0,accel=0,damp=0,breakingForce=0)#shortcut for createJoint that uses the current body as the parent.
  • lookAt(target,stiff=10.0,damp=10.0)

Utility

  • playSound(name)#play an embedded sound. See SoundUI.
  • logLine(str)#put a message on the screen.
  • frame()#get current frame
  • group()#get current Sketchup group
  • camera()#get the Sketchup camera
  • position()#get the current position of the body
  • transformation()#get the current transformation of the body.
  • simulation()#get the simulation object(seldom used)
  • evalCurveAbs(name,dist)
  • getCurveLength(curveVerts)
  • findCurve(name)

 


[#/sketchup/plugins/sketchyphysics” ]