sketchucation logo sketchucation
    • Login
    🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Need helpfull informations for a project

    Scheduled Pinned Locked Moved Developers' Forum
    4 Posts 3 Posters 337 Views 3 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.
    • S Offline
      sirnoname
      last edited by

      Hello,

      I will try to make a bridge which will control a object and it's placement / orientation from a external program. So I need some advice if this is possible and some hints where to begin.

      What I have:

      • Scetchup
      • Ruby (standard installation + C++ libraries)
      • a simple object drawn with scetchup

      What I want:
      I have a external software written in C++ which has a degree slider 0-90°.
      The object in scetchup should turn if I move the slider.

      The goal:

      • Make a drawing of a mechanical object and find out how it will work with real parameters

      How to realise??
      Here is my attempt:
      Ruby owns mmap library which can access memory mapped files and therefore the C++ application can create such a interprocess communication and ruby will read that value and set the object in the new position.

      This are the open questions:

      • Which mode of scetchup can work with such a ruby loop?
      • will the mmap ruby library available within scetchup?
      • what are the other options to move/rotate a object in ruby?

      Would be nice to get some ideas ...

      Best regards
      SirNoName

      1 Reply Last reply Reply Quote 0
      • A Offline
        avariant
        last edited by

        I'm not really familiar with "memory mapped" files, but I can imagine more or less what it is.
        You will probably need a ruby script in SU that polls the memory to detect changes, and then control the geometry when there is a change. In order to poll the memory, you'll need a thread or a timer. However, from what I've seen, threads and timers don't work well, or at all, in SU. They tend to start out ok but stop after a very short period of time. So I think the biggest hurdle is to figure out how to poll the memory inside SU.

        1 Reply Last reply Reply Quote 0
        • chrisglasierC Offline
          chrisglasier
          last edited by

          @sirnoname said:

          ... - what are the other options to move/rotate a object in ruby?

          Would be nice to get some ideas ...

          How about a web dialog with an html/javascript slider and a callback in the ruby plugin file to do the rotating?

          Chris

          With TBA interfaces we can analyse what is to be achieved so that IT can help with automation to achieve it.

          1 Reply Last reply Reply Quote 0
          • chrisglasierC Offline
            chrisglasier
            last edited by

            PS see also:

            This topic.

            This clip

            cg

            With TBA interfaces we can analyse what is to be achieved so that IT can help with automation to achieve it.

            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