Exemplo n.º 1
0
_FILENAME = "kelvin.bmp"  # "fuer_elise_2.bmp"
# done
# 0, 1,3
# _FILENAME = "./split_big/robinson_big2-3.bmp" #"Australia-NewGuinea.bmp" # , #"robinson_big.bmp", #

_ESTIMATEONLY = True

# RODULPH

if _MODE == "RUDOLPH":
    testPic = picConv.PicConv(
        filename=_FILENAME,
        allowDiagonals=True,
        prioritizeLeft=True,
        shutterTime=servos.Shutter.DEFAULT_DURATION * 2,
        yscale=1.3,
        xscale=1.3
        # simulateDrawing = True,
        # simulate = True,
        # micronInstance = False # We only want to simulate drawing
    )

    testPic.convert()
    testPic.parseLines()
    testPic.draw(
        velocity=_velocity,
        shutterAbsolute=True,
        shutter_channel=servos.Servo.RIGHTCH) if not _ESTIMATEONLY else print(
            datetime.timedelta(seconds=testPic.estimateTime(
                velocity=_velocity)))
Exemplo n.º 2
0
mic = micron.Micos(
    shutterAbsolute=True,
    noHome=True,
    shutter_channel=servos.Servo.LEFTCH,
    stageConfig={
        "xlim": [-10000, 0],
        "ylim": [-10000, 0],
    },
)

testPic = picConv.PicConv(
    filename=_MAINFILENAME.format(1),
    allowDiagonals=True,
    prioritizeLeft=True,
    shutterTime=servos.Shutter.DEFAULT_DURATION,
    yscale=0.5,
    xscale=0.5,
    micronInstance=mic,
    takeoverControl=True,
    flipVertically=True,
    # simulateDrawing= True,
)
testPic.fast_velocity = 200
if not _ESTIMATEONLY:
    xl = abs(testPic.controller.stage.xlim[1] -
             testPic.controller.stage.xlim[0])
    yl = abs(testPic.controller.stage.ylim[1] -
             testPic.controller.stage.ylim[0])

    testPic.controller.setlimits(testPic.controller.stage.xlim[0],
                                 testPic.controller.stage.ylim[0],
                                 testPic.controller.stage.xlim[1],
Exemplo n.º 3
0
#!/usr/bin/env python3

import sys, os
base_dir = os.path.dirname(os.path.realpath(__file__))
root_dir = os.path.abspath(os.path.join(base_dir, ".."))
sys.path.insert(0, root_dir)

import picConv, micron
import time

testPic = picConv.PicConv(
    filename = "fliptest.bmp",
    allowDiagonals = True,
)

# OSCAR = VERTICAL FLIP
# testPic.controller = micron.Micos(
#     stageConfig = {
#         "xlim" : [-10000,0],
#         "ylim" : [-10000,0],
#     },
#     noHome = True,
#     shutterAbsolute = True
# )
#
# testPic.controller.setvel(1000)
# # testPic.controller.send("rm")
# # time.sleep(2)
# # testPic.controller.abort()
# testPic.controller.setpos(0, 0)
#