Ejemplo n.º 1
0
def createBox(RDK=None):
    if RDK is None:
        RDK = Robolink()

    global BOX_SIZE_XYZ
    global USE_METRIC
    global PARENT
    global CONV_PARENT

    RDK.Render(False)

    x, y, z = BOX_SIZE_XYZ
    if USE_METRIC:
        new_box = RDK.AddFile(REF_BOX_MM_PATH, PARENT)
        new_box.setName(BOX_ITEM_NAME_MM % (x, y, z))
    else:
        new_box = RDK.AddFile(REF_BOX_IN_PATH, PARENT)
        new_box.setName(BOX_ITEM_NAME_IN % (x, y, z))

    new_box.setPose(eye(4))
    new_box.Scale([x, y, z])
    RDK.Update()

    if CONV_PARENT is not None:
        new_box.setParentStatic(CONV_PARENT)

    new_box.setVisible(True)
    RDK.Render(True)
Ejemplo n.º 2
0
# Type help("robolink") or help("robodk") for more information
# Press F5 to run the script
# Documentation: https://robodk.com/doc/en/RoboDK-API.html
# Reference:     https://robodk.com/doc/en/PythonAPI/index.html
# Note: It is not required to keep a copy of this file, your python script is saved with the station
from robolink import Robolink  # RoboDK API
import SpawnBoxTools as spt

RDK = Robolink()
script = RDK.AddFile(spt.LOCAL_PATH + '\SpawnBox.py')
script.setName('Spawn Box')
Ejemplo n.º 3
0
# Type help("robolink") or help("robodk") for more information
# Press F5 to run the script
# Documentation: https://robodk.com/doc/en/RoboDK-API.html
# Reference:     https://robodk.com/doc/en/PythonAPI/index.html
# Note: It is not required to keep a copy of this file, your python script is saved with the station
from robolink import Robolink  # RoboDK API
import ObjectDeleterTools as odt

RDK = Robolink()
script = RDK.AddFile(odt.LOCAL_PATH + '\ObjectDeleterLoop.py')
script.setName('Object Deleter (loop)')