Пример #1
0
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')
Пример #2
0
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' )
Пример #3
0
def to_ipe( *args ):
    drawipe.group()  ## make new group
    drawipe( vo3 )
    vn = edg.norm()
    pln = vn.to_plane( vn * dr * n )
    drawipe.setup_plane( pln, 10 )

    for p in pln.touch( vo3.has( ds1 ) ):
        drawipe( p, color=(0,1,0) )

    for p in pln.touch( vo3.has( ds2 ) ):
        drawipe( p, r=0.04, color=(1,0,0) )
Пример #4
0
def to_ipe(*args):
    drawipe.group()  ## make new group
    drawipe(vo3)
    vn = edg.norm()
    pln = vn.to_plane(vn * dr * n)
    drawipe.setup_plane(pln, 10)

    for p in pln.touch(vo3.has(ds1)):
        drawipe(p, color=(0, 1, 0))

    for p in pln.touch(vo3.has(ds2)):
        drawipe(p, r=0.04, color=(1, 0, 0))
Пример #5
0
def to_ipe2(*args):
    global va
    v = va.norm()
    p = v.to_plane(va)

    drawipe.group()  ## make new group
    drawipe(vo_h)
    drawipe.setup_plane(p, 10)

    for x in vo_h.has(ds1_h):
        drawipe(x, r=0.04, color=(1, 0, 0))

    for x in vo_h.has(ds2_h):
        drawipe(x, color=(0, 1, 0))
Пример #6
0
def to_ipe(*args):
    global vc, pos, delta
    v = vc.norm() * delta * pos
    p = vc.to_plane(v)

    drawipe.group()  ## make new group
    drawipe(vo_h)
    drawipe.setup_plane(p, 10)

    for x in p.touch(ds1_h):
        drawipe(x, r=0.04, color=(1, 0, 0))

    for x in p.touch(ds2_h):
        drawipe(x, color=(0, 1, 0))
Пример #7
0
def to_ipe2( *args ):
    global va
    v = va.norm()
    p = v.to_plane( va )

    drawipe.group()  ## make new group
    drawipe( vo_h )
    drawipe.setup_plane( p, 10 )

    for x in vo_h.has( ds1_h ):
        drawipe( x, r=0.04, color=(1,0,0) )

    for x in vo_h.has( ds2_h ):
        drawipe( x, color=(0,1,0) )
Пример #8
0
def to_ipe( *args ):
    global vc, pos, delta
    v = vc.norm() * delta * pos
    p = vc.to_plane( v )

    drawipe.group()  ## make new group
    drawipe( vo_h )
    drawipe.setup_plane( p, 10 )

    for x in p.touch( ds1_h ):
        drawipe( x, r=0.04, color=(1,0,0) )

    for x in p.touch( ds2_h ):
        drawipe( x, color=(0,1,0) )
Пример #9
0
def to_ipe2( *args ):
    v = vo3.rep[0] + vo3.rep[1]
    v = v.norm()
    pln = v.to_plane( v * 2 )

    drawgl( v * 2, style="line" )

    drawipe.setup_plane( pln, 10 )

    for p in vo3.has( ds1 ):
        drawipe( p, color=(0,1,0) )

    for p in vo3.has( ds2 ):
        drawipe( p, r=0.04, color=(1,0,0) )

    drawipe( vo3 )
Пример #10
0
def to_ipe2(*args):
    v = vo3.rep[0] + vo3.rep[1]
    v = v.norm()
    pln = v.to_plane(v * 2)

    drawgl(v * 2, style="line")

    drawipe.setup_plane(pln, 10)

    for p in vo3.has(ds1):
        drawipe(p, color=(0, 1, 0))

    for p in vo3.has(ds2):
        drawipe(p, r=0.04, color=(1, 0, 0))

    drawipe(vo3)