Need helpfull informations for a project
-
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 -
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. -
@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
-
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register LoginAdvertisement