def to_ipe(*args): #global num, r0, dr for num in xrange(-9, 1): drawipe.clear() pln = n.to_plane(r0 + num * dr) drawipe.setup_plane(pln, 10) for p in pln.touch(vhex.has(ds1)): drawipe(p, r=0.02, color=(0, 1, 0)) for p in pln.touch(vhex.has(ds2)): drawipe(p, r=0.04, color=(1, 0, 0)) drawipe(vhex) #drawipe( vo21 ) #drawipe( vo22 ) drawipe.save('/tmp/%s.ipe' % abs(num)) drawipe.clear() drawipe.setup_plane(pln, 10) import math drawipe.th -= math.pi / 2 drawipe(vhex) for p in vhex.has(ds1): drawipe(p, r=0.02, color=(0, 1, 0)) for p in vhex.has(ds2): drawipe(p, r=0.04, color=(1, 0, 0)) drawipe.save('/tmp/sheme.ipe')
def to_ipe( *args ): #global num, r0, dr for num in xrange( -9, 1 ): drawipe.clear() pln = n.to_plane( r0 + num * dr ) drawipe.setup_plane( pln, 10 ) for p in pln.touch( vhex.has( ds1 ) ): drawipe( p, r=0.02, color = (0,1,0) ) for p in pln.touch( vhex.has( ds2 ) ): drawipe( p, r=0.04, color = (1,0,0) ) drawipe( vhex ) #drawipe( vo21 ) #drawipe( vo22 ) drawipe.save( '/tmp/%s.ipe' % abs( num ) ) drawipe.clear() drawipe.setup_plane( pln, 10 ) import math drawipe.th -= math.pi / 2 drawipe( vhex ) for p in vhex.has( ds1 ): drawipe( p, r=0.02, color = (0,1,0) ) for p in vhex.has( ds2 ): drawipe( p, r=0.04, color = (1,0,0) ) drawipe.save( '/tmp/sheme.ipe' )
def to_ipe( *args, **kargs ): #from math import * #al, th = drawgl.gl.alpha * pi / 180, drawgl.gl.theta * pi / 180 #als = ( al, -al, al + pi / 2, al - pi / 2 ) #ths = ( th, -th, th + pi / 2, th - pi / 2 ) #for ai, al in enumerate( als ): # for ti, th in enumerate( ths ): # drawipe.setup( al, th, drawgl.gl.dist ) # drawipe.clear() # drawipe.group() # drawipe( v1, style = 'line' ) # drawipe( v2, style = 'line' ) # drawipe( v3, style = 'line' ) # drawipe.save( '/tmp/out_%s_%s.ipe' % ( ai, ti ) ) #for i in xrange( 1,9 ): # getattr( drawipe, 'setup_drawgl' + str( i ) )( drawgl ) # drawipe.clear() # drawipe.group() # drawipe( vo ) # drawipe.save( '/tmp/out%s.ipe' % i ) drawipe.setup_drawgl( drawgl ) drawipe.clear() drawipe.group() drawipe( vo ) drawipe.save( '/tmp/out.ipe' )
def view2ipe(*args): import math drawipe.clear() for v in ucm.atoms['A']: drawipe(v) for v in ucm.atoms['B']: drawipe(v, r=0.1, color=(1, 0, 0)) for v in ucm.rep: drawipe(v, style='line', color=(0, 1, 0)) drawipe.ortho = True drawipe.th = drawgl.gl.theta * math.pi / 180 drawipe.al = drawgl.gl.alpha * math.pi / 180 drawipe.dist = drawgl.gl.dist drawipe.save('/tmp/sheme.ipe')
def view2ipe( *args ): import math drawipe.clear() for v in ucm.atoms['A']: drawipe( v ) for v in ucm.atoms['B']: drawipe( v, r = 0.1, color = (1,0,0) ) for v in ucm.rep: drawipe( v, style = 'line', color = (0,1,0) ) drawipe.ortho = True drawipe.th = drawgl.gl.theta * math.pi / 180 drawipe.al = drawgl.gl.alpha * math.pi / 180 drawipe.dist = drawgl.gl.dist drawipe.save( '/tmp/sheme.ipe' )
def ipe2file(*args): drawipe.save('/tmp/test.ipe') drawipe.clear()
def ipe2file( *args ): drawipe.save( '/tmp/test.ipe' ) drawipe.clear()