Exemple #1
0
def printPolyLens(polygons=None):
    import ygmapbits as yg
    if polygons == None: polygons = yg.getReducedPolys()
    #
    i = 0
    for ply in polygons:
        print("poly(%d): %d" % (i, len(ply)))
        i += 1
    return None
Exemple #2
0
def printPolyLens(polygons=None):
	import ygmapbits as yg
	if polygons==None: polygons=yg.getReducedPolys()
	#
	i=0
	for ply in polygons:
		print("poly(%d): %d" % (i, len(ply)))
		i+=1
	return None
Exemple #3
0
def plotPolygons(polygons=None):
	import ygmapbits as yg
	# getPIsquareRays
	if polygons==None: polygons=yg.getReducedPolys()
	#if polygons==None: polygons=getPIsquareRays()
	#
	plt.figure(0)
	for ply in polygons:
		#if len(ply)<5: continue
		plt.fill(list(map(operator.itemgetter(1), ply)), list(map(operator.itemgetter(0),ply)), '.-')
	
	plt.show()
	
	return polygons
Exemple #4
0
def plotPolygons(polygons=None):
	import ygmapbits as yg
	# getPIsquareRays
	if polygons==None: polygons=yg.getReducedPolys()
	#if polygons==None: polygons=getPIsquareRays()
	#
	plt.figure(0)
	for ply in polygons:
		#if len(ply)<5: continue
		plt.fill(map(operator.itemgetter(1), ply), map(operator.itemgetter(0),ply), '.-')
	
	plt.show()
	
	return polygons