##############################
###  DM2_w24 capture to LW P:/
###  _diag  /  2024 10 25  ###
##############################
import rhinoscriptsyntax as rs
import time, os, sys
sys.path.append("P:/")
import DM_lib as dm
##############################

if 0: ### hb04 20241024
    #dm.setCameraTarget( [-1556.80229203, -2326.257721, -1730.23402708], [674.86512556, 678.68500596, 226.55707726], lens=49.99999999, rota=0, upVec=[-0.27622862061140113,-0.3719421531809799,0.8862035792312165] ) # ... danke, andi !
    dm.setCameraTarget( [834.54715195, -1887.23259595, -1042.64433779], [834.54715195, 725.45011753, 120.59695186], lens=39.99999999, rota=0, upVec=[5.090071110230963E-13,-0.4067366430754919,0.9135454576427382] ) # ... danke, andi !
    #dm.setCameraTarget( [-187.34960514, -1612.62023696, 1350.67349238], [893.85338768, 623.95557652, 18.65480387], lens=40.0, rota=0, upVec=[0.20566878890331983,0.42544632405233684,0.8813034520648354] ) # ... danke, andi !

if 0:
    rs.ZoomExtents()
    rs.Command("-zoom Factor 0.95 enter", 0) # decrease zoom for better framing
    rs.Redraw()

if  0:
    path = "P:/hu_03/images/"
    path = "M:\diag.at\mod\hubbett04\images\querbett_120x140/"
    if not os.path.exists(path): os.makedirs(path)
    imageName = "gruppe_3_"
    imageName = "gruppe_1_"+str(int(time.time()))+".png"
    #rs.Command("-viewCaptureToFile Width=960  Height=540  Scale=2 DrawCPlaneAxes=No TransparentBackground=Yes "+path+imageName, 0) 
    # .jpg and Scale=4 for webSite submission check ".jpg"
    imageName = "gruppe_1_"+str(int(time.time()))+".jpg"
    print path+imageName
    rs.Command("-viewCaptureToFile Width=960  Height=720  Scale=2 TransparentBackground=No " + path+imageName, 0) # min 960*720px 4 webSite

dm.getCameraTarget()
## dm.setCameraTarget( [-1556.80229203, -2326.257721, -1730.23402708], [674.86512556, 678.68500596, 226.55707726], lens=49.99999999, rota=0, upVec=[-0.27622862061140113,-0.3719421531809799,0.8862035792312165] ) # ... danke, andi !
