@tig said:
Here some short code to do it
require 'sketchup.rb'
> class Rotateplanview
> def initialize(angle=45.0)
> model=Sketchup.active_model
> view=model.active_view
> camera=view.camera
> up=camera.up
> return if up==Z_AXIS
> eye=camera.eye
> target=camera.target
> persp=false
> tr=Geom;;Transformation.rotation(target, Z_AXIS, angle.degrees)
> up.transform!(tr)
> newcamera=Sketchup;;Camera.new(eye, target, up, persp)
> view.camera=newcamera
> Sketchup.send_action("viewZoomExtents;")
> end
> end#class
Copy/paste it into a file named Rotateplanview.rb
in the Plugins folder.
To use set up your Plan [Top] view, without Perspective and in the Ruby Console type Rotateplanview.new
to rotate the camera 45 degrees clockwise, repeat to rotate it another 45 degrees etc. The extents are zoomed after each rotation.
To do other angles provide an angle value in degrees - e.g. Rotateplanview.new 10
rotates the view 10 degrees clockwise or Rotateplanview.new -30
rotates the view 30 degrees counterclockwise.
When you are happy with it save the view to a new Scene tab so you can return to it later.
TIG, Wow!
To have you replying to one of my question is an honor! I really admire you coding gurus!
You should all live together in a tiny house as a community along with ThomThom, Chris Fullmer, Whaaat (forgot how many A's...), Fredo6, Didier Bur...
Seriously, Michael Jackson would have replied, I wouldn't have been more honored!
I'll try this quickly! Thank you so much! (where's the worshipping smiley, the one that's on his knees... Whatever... You get the point!
)
Nicolas