sketchucation logo sketchucation
    • Login
    1. Home
    2. tangofoxtrot
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    T
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 4
    • Groups 1

    tangofoxtrot

    @tangofoxtrot

    10
    Reputation
    1
    Profile views
    4
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    tangofoxtrot Unfollow Follow
    registered-users

    Latest posts made by tangofoxtrot

    • RE: SP API Question

      MR K thanks for the scoping explanation, it helps. Actually, I was using the getVar and setVar methods in my script. My question about name collisions was in reference to the names stored in the $SP3xSimulationVars hash with these methods.

      I have a couple of other questions, but let me first digest the info in your post - perhaps the answers are there.

      Thanks again

      posted in SketchyPhysics
      T
      tangofoxtrot
    • RE: SP API Question

      Again, thanks MR. K,

      I tried that and it worked as you described.
      From my reading of the ControllerCommands.rb file it appears that the variable names
      are global to a simulation. I assume they are arbitrary (the user can make them up), writing the scripts, one must then watch out for name collisions. For example, using the variable 'speed' for two different motors that one wished to control independently, would not work. One would have to use 'speed1' and speed2'. Is that right?

      Thanks

      posted in SketchyPhysics
      T
      tangofoxtrot
    • RE: SP API Question

      Thanks for the response Mr K. My immediate problem is that I’m trying to figure out how to control a motor joint from a ruby script rather than from a slider. I am already reasonably fluent in Sp (doing things manually) and the SU Ruby API, but I don’t know the architecture of SP-Ruby. In particular, I don’t know how to find the motor, what methods it responds to, and how to send them. I have been looking at various SP code snippets that I’ve found, but this is a slow and tedious way to learn the API. I was hoping that someone might have written an overview and that there was a better description of methods and their use than the one I found in the Wiki.

      posted in SketchyPhysics
      T
      tangofoxtrot
    • SP API Question

      Is there a more comprehensive description of the SP API than that given in the Wiki under ”Events and Scripted Functions”? I was hoping that there is a description of the conventions for referencing objects like joints, global variable usage, how scripts communicate etc.

      Also, where can I find coding examples?

      Thanks for any help

      posted in SketchyPhysics
      T
      tangofoxtrot