Help getting Parallel Projection in current view from Ruby
-
I am currently tangled in a web of Camera/View/Page classes and need a working example of how to get parallel projection enabled in the current view from the Ruby console. I feel like View can be defined as what I am looking at on the screen currently, while Page is the saved Sketchup scene, and Camera seems to be how the view is displayed, fov etc. I can't seem to come up with a good method of showing parallel projection in the view. I tried setting fov to 0, it did not like that. I tried setting camera perspective to false, it likes that, but did not change the current view any. I am sure I am missing something here. It seem like a camera change should affect the current view, but found that is not the case. I found many ways not to view parallel projection, could use a snippet showing how.
This is what I have that is working...
model = Sketchup.active_model view = model.active_view pages = model.pages pages.selected_page = model.pages[0]#Uses Scene 1 to be parallel projected #Need method for parallel projection here, nothing I have come up with works yet. view.zoom_extents status = pages.add "Scene1_Parallel_Projected"
-
view.camera.perspective = false
http://www.sketchup.com/intl/en/developer/docs/ourdoc/camera#perspective=
-
Thanks thomthom, you never let me down.
Advertisement