Sync sketchup with vtk tool
-
Hey all,
I am trying to use Sketchup as modelling tool for an external application. Both run simultainiously and communication is not a problem.As both tools run together, I would prefer that a change of view in SU would result in the same change of view in the vtk Tool. Hence, I already made use of the ViewObserver to get informed about any changes, but I dont know how to "convert" the View information to vtk. I guess, that I have to modify the vtkCamera [1], but I dont know which data to insert (based on Sketchup View [2]). Any suggestions?
kind regards,
curator[1] http://www.vtk.org/doc/nightly/html/classvtkCamera.html
[2] http://www.sketchup.com/intl/en/developer/docs/ourdoc/view -
You would need to get the view's instance of the
Sketchup::Camera
class, via:
cam = Sketchup.active_model.active_view.camera()
-
Hi,
thanks for the Tip. I looked their and synced the position with the position, the target with the focal point and view up with view up. That seems to work pretty good in the first attempt, but I am not allowed to zoom in or out, since then both view are not the same anymore (basically the vtk window does not "rescale". vtk has the zoom or setdistance function, but I expected them to be given indirectly be the distance between position and focal point. what information have i missed?
Advertisement