folks, i’ve encountered this mystery need to created a “reflected bottom view” - i.e. it’s a standard bottom view but got to have same orientation with top view.
search here but yet to find any solutions yet, basically the actions are:
1 set a bottom view
2 flip the view.camera left to right
3 flip the view.camera bottom to top
while not moving the entities… only flip the view.camera…
Thanks in advance
Go to a Top view scene … then
def create_reflected_view
model = Sketchup.active_model
view = model.active_view
cam = view.camera
up_vector = cam.up
target_point = cam.target
old_eye = cam.eye
pages = model.pages
old_name = pages.selected_page.name
reflected_scene = pages.add('Reflection of '<<old_name)
reflected_scene.use_camera = true
vector = old_eye.vector_to(target_point)
new_eye = target_point.transform(vector)
view.camera.set(new_eye, target_point, up_vector)
reflected_scene.update(1)
end
2 Likes