예제 #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
파일: test_cut_hex.py 프로젝트: ont/cbox
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
파일: test_ock_ock.py 프로젝트: ont/cbox
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
파일: test_ock_ock.py 프로젝트: ont/cbox
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
파일: prog_FK_FK.py 프로젝트: ont/cbox
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
파일: prog_FK_FK.py 프로젝트: ont/cbox
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
파일: test_ock_ock.py 프로젝트: ont/cbox
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
파일: test_ock_ock.py 프로젝트: ont/cbox
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)