######################### https://www.openstreetmap.org/export ### AGruber@tugraz.at ### https://osmbuildings.org/ ### OSM demo 2024/12 ### ######################### ############################## import rhinoscriptsyntax as rs import sys, math, random ### sys.path.append("P:/") ### sys.path.append("P:/WWW/deni2000/DM2/UE09") ### sys.path.append("P:/WWW/deni2000") import OSM_lib as osm ### import DM_lib as dm ### ############################## reload (osm) rs.UnitSystem(4) # meters = 4 rs.ShowGrid(None, 0) rs.ShowGridAxes(None, 1) rs.EnableRedraw(0) currentMode = rs.ViewDisplayMode(rs.CurrentView()) #rs.ViewDisplayMode(rs.CurrentView(), "wireframe") rs.Redraw() ############################## ####################### ##OSMpath = "D:/OSM/osmData/" OSMpath = "P:/WWW/deni2000/DM2/UE09/" OSMpath = "L:/osmData/" ####################### if 0: dm.newEmptyLayer("CONTI", [200,100,0]) rs.LayerVisible("alexandria", 1) ############################ distOfContis = 0.5 ### float ############################ rs.UnselectAllObjects() rs.ObjectsByLayer("alexandria", 1) cmdStr = "-_contour 0,0,0 0,1,0 " + str(distOfContis) + " enter" print cmdStr rs.Command(cmdStr, 0) rs.ObjectColor(rs.SelectedObjects(), [0,100,0]) rs.UnselectAllObjects() rs.Redraw() rs.ObjectsByLayer("alexandria", 1) rs.Command("-_contour 0,0,0 1,0,0 "+str(distOfContis)+" enter", 0) rs.ObjectColor(rs.SelectedObjects(), [100,0,0]) rs.UnselectAllObjects() rs.Redraw() rs.ObjectsByLayer("alexandria", 1) rs.Command("-_contour 0,0,0 0,0,1 "+str(distOfContis)+" enter", 0) rs.ObjectColor(rs.SelectedObjects(), [0,0,100]) rs.UnselectAllObjects() rs.Redraw() rs.LayerVisible("alexandria", 0) rs.Redraw() if 1: dm.newEmptyLayer("POINTS", [20,100,220]) allCoords = [] for crv in rs.ObjectsByLayer("CONTI"): lenx = rs.CurveLength(crv) anz = int(lenx*2000) #print anz if anz > 2: ### einstellen !!! coords = rs.DivideCurve(crv, anz, 0) allCoords.extend( coords ) #allCoords.append( coords ) #rs.AddCurve( allCoords ) dm.exportCoordList(list2export=allCoords, exportedListName='allCoords', path='P:/WWW/deni2000/DM2/UE09', fileName='alexandriaCoords12X' ) ## exportCoordList(list2export=[], exportedListName='GIS_coords', path='P:/', fileName='dachsteinGis') #dm.exportCoordLists(list2export=allCoords, exportedListName='allCoords', path='P:/finale/denialS/', fileName='alexandriaCoords12X' ) ## exportCoordList(list2export=[], exportedListName='GIS_coords', path='P:/', fileName='dachsteinGis') #################################### rs.CurrentLayer("Default") #rs.ViewDisplayMode(None, "ghosted")