############################
### diag @ IAM @ DM2_w25 ###
### hu_03 setUp_ver00    ### see examples @ DM2_w23 hu_03 !
############################


##############################
import rhinoscriptsyntax as rs
import random, time, sys   ###
sys.path.append("P:/")     ###                  ### diag's path to DM_lib.py  .. please keep it !                                               
sys.path.append("P:/TUGonlineUsernam/dm2/")     ### *your* path to DM_lib.py                                            
sys.path.append("P:/WWW/lukschme/dm2/") ### *your* path to DM_lib.py                                            
sys.path.append("/Users/macpro/Desktop/DM2")    ### *your* path to DM_lib.py      
import DM_lib as dm        ###                  ### "dm" is alias for DM_lib / for adressing definitions etc in "DM_lib.py"
############################## reload(dm)

rs.ShowGrid(show=0)
rs.ShowGridAxes(show=0)
rs.ViewDisplayMode(mode="Wireframe")
rs.EnableRedraw(0)

dm.PointRadius(displayModeX=0, rad=3, styl=3)                   ### displayModeX=0="Wireframe" / rad=size of points / styl=pointStyle (try 0..5) / default 3, 3
dm.printDisplay(state=1, scale=1, thickness=1, color="Display") ### state=0/1 = off/on / for showing printWidth etc

dm.eAA()

### BASIC SETUP / mandatory input:
allInOne = 1
allCoords = dm.coordsCub (what="F")
allCoords = dm.coordsCub (edge_len=10, anz_pts=10, what="A", angle=random.uniform(0,360), axe=dm.randVec(-1,1), pos=[0,0,10], allInOne=allInOne)

coordsSph = allCoords[0]
coordsCub = allCoords[1]


##### check setup - just visualization of coords
##### don't execute  @ final version of homework
if 0:
    rs.AddPoints( coordsSph )
    
    if allInOne:
        rs.AddPoints( coordsCub )
    else:
        for i,coords in enumerate(coordsCub): 
            pts = rs.AddPoints( coords )

##### end check setup

#######################################
################ HERE YOU GO AS YOU GO:


#################
#dm.eDup( 1 )
dm.zA( 0.9 )



