sketchucation logo sketchucation
    • Login
    1. Home
    2. Reind Brackman
    3. Posts
    🛣️ Road Profile Builder | Generate roads, curbs and pavements easily Download
    R
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 6
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: Observer triggers and validation methods

      Oops, pushed submit too fast.
      I got the 3dconnexionmouse working with their dll in VFP9 (Visual foxpro, don't ask me why except that i love that language) who in turn is sending - yes... via SKSocket - the values to Ruby-world, turning objects around.
      So yes, it is working.
      Now I like to learn how to set up COM events binding within ruby scripts. As I explained, ruby is new to me, but I start to love that language....

      Cheers.
      R.

      posted in Developers' Forum
      R
      Reind Brackman
    • RE: Observer triggers and validation methods

      The SKSocket not reliable???????
      You must be joking... I use this for years (Early SU6!) to send data to Sketchup for visualising machine motions between one application and another.
      Just 3 simple commands make me run SU from other application and it works as a charm.
      SKSocket.connect("localhost",5088)
      SKSocket.add_socket_listener {|e| eval e}
      SKSocket.write(@m_outp)
      Ideal for automation projects.
      If they abandon that they better come with a good way to run SU from another platform.

      Are you serious they want to abandon that? If so, who should I call?

      Reind,

      posted in Developers' Forum
      R
      Reind Brackman
    • RE: Observer triggers and validation methods

      Thanks Dan,
      Your example hints me to improve some other code parts (moving objects from external program).
      But unfortunatly it wont help me with what I wanted to achieve, what is to get a 3dconnexion-mouse to rotate objects.
      Basically I wanted to retrieve camerea.eye (pan and tilt) with a ViewObserver, then use the .eye data to rotate an object and return the model back as if no pan and tilt occurred in the first place without glitches.
      It probably is better to get the SDK of the mouse to retrieve it's data and send it via SKSocket.

      Still, it would be a good idea to have a bit more freedom in the Observers, validation methods and/or control to the screen output.

      Cheers,

      Reind

      posted in Developers' Forum
      R
      Reind Brackman
    • RE: Observer triggers and validation methods

      Hmmm,

      That is truly a limitation then.
      yet, is there a way to prohibit SU to redraw the screen?
      Like setting a refresh rate to very long, or simply a camera.freeze method?
      I read there is a view.invalidate, but what about a view.do_Nothing_While_I_Sort_things_Out?

      Cheers,
      and thannks for fast reply last time,

      Reind

      posted in Developers' Forum
      R
      Reind Brackman
    • Observer triggers and validation methods

      Hi there,

      I am fairly new to ruby (and this forum) and am trying to get a 3dconnexion-3dmouse to rotate selected objects.
      I thought it would be a good idea to capture the view-changes and redirect it to object(s).
      That would make the code generic for all input devices.

      In my attempts I found some restrictions where you pro's may have some solutions for:

      Question 1:

      The observers are triggered after the change event.
      so, Viewobserver.onViewChanged passes a modified view. In fact, the screen seems also already refreshed!
      So, I can get the Camera.eye, .target and .up values to set the drawingobject's transformations,
      and, I can create a new Camera object to reset the view to it's original, but it will
      show a 'glitch' on screen.

      What raises the following questions:

      Are there a tricks to create:

      a- Observer.BeforeViewChanged as opposed to Observer.AfterViewChanged although it (wrongly) is called Observer.OnViewChanged

      	So that one can do;
      	def Observer.BeforeViewChanged(oProposedNewView)
      		if oProposedNewView.Camera.eye.x > @nTheValueThatIreallyLike
      			return oProposedNewView
      		else
      			return @oAdifferentViewThatILikeMuchBetter
      		end
      	end
      
      	-or-	
      

      b- View.freeze or View.Lock or View.Lockstate, something to disable and enable the screen-refresh?

      	-or-
      

      c- Acces- and Assign methods? so that one can create constructions as:

      	Camera.eye.assign(oNewsetting) 
      		Camera.eye = oNewsetting ;
      if oNewsetting.x > @nTheValueThatIreallyLike
      	end
      
      		-or/and-
      
      	Camera.eye.access(oNewsetting) 
      		Camera.eye.x = @nThexthatIreallylike
      		return Camera.eye
      	end
      	
      

      Hmmm, Maybe a lot of questions for a first post...

      Regards,

      Reind

      posted in Developers' Forum
      R
      Reind Brackman
    • RE: [Plugin] Ruby Console+ (3.0.2) – updated 30.10.2017

      Just installed Ruby Console+ and my productivity doubled already.
      Also very good to avoid RSI, better known as 'lets load the damn script again command...'
      Thanks - great work.

      posted in Plugins
      R
      Reind Brackman
    • 1 / 1