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

    Help with code

    Scheduled Pinned Locked Moved SketchyPhysics
    2 Posts 2 Posters 496 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.
    • J Offline
      jblively
      last edited by

      Hello,

      I'm still trying to learn how to work in sketchy physics, and am missing some of the basic issues I guess.

      In Sketchup, I can get the bounding box of an item very easy:
      All I have to do is click on it and then run the following code:

      group = Sketchup.active_model.selection[0]
      bb = group.bounds
      bb.corner(0)

      However, in Sketchyphysics, I can't click on any item in 'runtime' Does anyone know how i'd get the bb.corner(0) of an object in runtime in sketchy physics?

      I was doing some researching, and it looks like someone was using code like:

      $curEvalGroup.transformation.origin[0]

      To get the origin point of an object. But I don't understand how the $curEvalGroup was assigned! I looked all over the model and I couldn't find where it was set or even if it has anything to do with what i'm trying to accomplish.

      The main goal here is to be able to figure out how to determine a groups position on the fly in sketchyphysics/ruby.

      Thanks so much.

      Joe

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

        Well $CurEvalGroup applies to whatever object the script is in basically.

        My WIP Thread:Here

        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