예제 #1
0
파일: test_3d.py 프로젝트: ponty/eagexp
def export(fin, **kwargs):
    fout = tempfile.NamedTemporaryFile(
        prefix='eagexp_test_', suffix='.png', delete=0)
    fout = Path(fout.name)
    export_image3d(fin, fout, showgui=VISIBLE, **kwargs)
    assert fout.exists()
예제 #2
0
파일: test_3d.py 프로젝트: ponty/eagexp
def export(fin, **kwargs):
    with tempfile.TemporaryDirectory() as temp_dir:
        fout = join(temp_dir, "out.png")
        export_image3d(fin, fout, showgui=VISIBLE, **kwargs)
        assert exists(fout)
예제 #3
0
 def export_func(fname_sch, fname_img_abs):
     export_image3d(fname_sch,
                    fname_img_abs,
                    size=size,
                    timeout=timeout,
                    pcb_rotate=pcbrotate)
예제 #4
0
 def export_func(fname_sch, fname_img_abs):
     export_image3d(fname_sch, fname_img_abs, size=size,
                    timeout=timeout, pcb_rotate=pcbrotate)
예제 #5
0
'''
Example for 3D image export
'''
from eagexp import image3d

brd = '/usr/share/eagle/projects/examples/tutorial/demo2.brd'

if __name__ == "__main__":
    image3d.export_image3d(brd, 'api_3d.png')
    
    # size
    image3d.export_image3d(brd, 'api_3d_size1.png', size=(50, 50))
    image3d.export_image3d(brd, 'api_3d_size2.png', size=(50, 100))
    image3d.export_image3d(brd, 'api_3d_size3.png', size=(100, 50))
    
    # rotate
    image3d.export_image3d(
        brd, 'api_3d_xrot.png', pcb_rotate=(180, 0, 0), size=(200, 150))
    image3d.export_image3d(
        brd, 'api_3d_yrot1.png', pcb_rotate=(0, 45, 0), size=(200, 150))
    image3d.export_image3d(
        brd, 'api_3d_yrot2.png', pcb_rotate=(0, 90, 0), size=(200, 150))
    image3d.export_image3d(
        brd, 'api_3d_yrot3.png', pcb_rotate=(0, 135, 0), size=(200, 150))