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 = falsehttp://www.sketchup.com/intl/en/developer/docs/ourdoc/camera#perspective=
-
Thanks thomthom, you never let me down.
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