Package org.openpnp.util

Source Code of org.openpnp.util.MovableUtils

package org.openpnp.util;

import org.openpnp.model.Location;
import org.openpnp.spi.Head;
import org.openpnp.spi.HeadMountable;

public class MovableUtils {
    /**
     * Moves the given HeadMountable to the specified Location by first
     * commanding the head to safe-Z all of it's components, then moving
     * the HeadMountable in X, Y and C, followed by moving in Z.
     * @param hm
     * @param location
     * @param speed
     * @throws Exception
     */
    public static void moveToLocationAtSafeZ(HeadMountable hm, Location location, double speed) throws Exception {
        Head head = hm.getHead();
        head.moveToSafeZ(speed);
        hm.moveTo(location.derive(null, null, Double.NaN, null), speed);
        hm.moveTo(location, speed);
    }
}
TOP

Related Classes of org.openpnp.util.MovableUtils

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.