Class AbstractHeadMountable

    • Constructor Detail

      • AbstractHeadMountable

        public AbstractHeadMountable()
    • Method Detail

      • applyConfiguration

        public void applyConfiguration​(Configuration configuration)
      • setAxisRotation

        public void setAxisRotation​(AbstractAxis axisRotation)
      • headMountableToRawZ

        protected Length headMountableToRawZ​(CoordinateAxis axisZ,
                                             Length z)
                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getSafeZZone

        public Length[] getSafeZZone()
        Specified by:
        getSafeZZone in interface Movable
        Returns:
        The lower and upper limits of the Safe Zone as defined on the Z axis. The array elements may be null if no axis is mapped on the Movable or no Safe Zone defined on the axis.
      • getSafeZ

        public Length getSafeZ()
        Specified by:
        getSafeZ in interface Movable
        Returns:
        The lower limit of the Safe Zone as defined on the Z axis, or null if now axis is mapped on the Movable or no Safe Zone defined on the axis.
      • isInSafeZZone

        public boolean isInSafeZZone​(Length z)
                              throws java.lang.Exception
        Specified by:
        isInSafeZZone in interface Movable
        Returns:
        True if the given z is in the Safe Z Zone.
        Throws:
        java.lang.Exception
      • setSafeZ

        public void setSafeZ​(Length safeZ)
      • getEffectiveSafeZ

        public Length getEffectiveSafeZ()
                                 throws java.lang.Exception
        Specified by:
        getEffectiveSafeZ in interface Movable
        Returns:
        The effective Safe Z, including any dynamic adjustment such as for parts on a Nozzle.
        Throws:
        java.lang.Exception
      • moveTo

        public void moveTo​(Location location,
                           double speed,
                           Motion.MotionOption... options)
                    throws java.lang.Exception
        Description copied from interface: Movable
        Move the object to the Location at the feedRate.
        Specified by:
        moveTo in interface Movable
        Parameters:
        location - The Location to move to. If the movement should not include a particular axis, specify Double.NaN for that axis.
        speed - Feed rate is specified as a percentage of maximum feed between 0 and 1. 1 specifies maximum feed rate as defined by the machine while 0 defines the absolute minimum feed rate while still moving.
        Throws:
        java.lang.Exception
      • moveToSafeZ

        public void moveToSafeZ​(double speed)
                         throws java.lang.Exception
        Specified by:
        moveToSafeZ in interface Movable
        Throws:
        java.lang.Exception
      • moveToSafeZ

        public void moveToSafeZ()
                         throws java.lang.Exception
        Specified by:
        moveToSafeZ in interface Movable
        Throws:
        java.lang.Exception
      • waitForCompletion

        public void waitForCompletion​(MotionPlanner.CompletionType completionType)
                               throws java.lang.Exception
        Description copied from interface: HeadMountable
        Wait for any motion of this HeadMountable to be completed according to the completionType. If this is not mounted to any Head (e.g. the bottom camera), the wait must encompass the whole machine, as any HeadMountable could then be the camera's subject.
        Specified by:
        waitForCompletion in interface HeadMountable
        Throws:
        java.lang.Exception
      • getMappedAxes

        public AxesLocation getMappedAxes​(Machine machine)
        Description copied from interface: MovableMountable
        Returns the set of motion-controller axes, mapped to the MovableMountable.
        Specified by:
        getMappedAxes in interface MovableMountable
        Parameters:
        machine - The machine giving the axes order.
        Returns:
      • substituteUnchangedCoordinates

        public static Location substituteUnchangedCoordinates​(Location location,
                                                              Location currentLocation)
      • toHeadLocation

        public Location toHeadLocation​(Location location,
                                       Locatable.LocationOption... options)
                                throws java.lang.Exception
        Description copied from interface: HeadMountable
        Transform the specified HeadMountable location to a Head location. This will typically apply the Head Offset and apply other transformations such as Runout Compensation on a Nozzle.
        Specified by:
        toHeadLocation in interface HeadMountable
        Parameters:
        location - The HeadMountable location.
        options - Location approximation options @see org.openpnp.spi.Movable.LocationOption
        Returns:
        Throws:
        java.lang.Exception
      • toHeadMountableLocation

        public Location toHeadMountableLocation​(Location location,
                                                Locatable.LocationOption... options)
        Description copied from interface: HeadMountable
        Transform the specified Head location to a HeadMountable location. This will typically unapply the Head Offset and unapply other transformations such as Runout Compensation on a Nozzle.
        Specified by:
        toHeadMountableLocation in interface HeadMountable
        Parameters:
        location - The Head location.
        options - Location approximation options @see org.openpnp.spi.Movable.LocationOption
        Returns:
      • toTransformed

        public Location toTransformed​(AxesLocation axesLocation,
                                      Locatable.LocationOption... options)
        Description copied from interface: MovableMountable
        Converts the specified raw motion-controller AxesLocation into a transformed Head Location. Note, toTransformed() must not throw even if transformations are not well-defined. This would otherwise disrupt operation while setting the machine up. Only if toRaw() will throw, e.g. when you want to move the machine.
        Specified by:
        toTransformed in interface MovableMountable
        Returns:
      • toRaw

        public AxesLocation toRaw​(Location location,
                                  Locatable.LocationOption... options)
                           throws java.lang.Exception
        Description copied from interface: MovableMountable
        Converts the specified transformed Head Location into a raw motion-controller AxesLocation. Note, unlike toTransformed() toRaw() will throw if the reverse transformation is not well-defined. As this typically happens when trying to move the machine, it is an appropriately graded precaution.
        Specified by:
        toRaw in interface MovableMountable
        Returns:
        Throws:
        java.lang.Exception
      • getApproximativeLocation

        public Location getApproximativeLocation​(Location currentLocation,
                                                 Location desiredLocation,
                                                 Locatable.LocationOption... options)
                                          throws java.lang.Exception
        Description copied from interface: Locatable
        Get an approximative Location in order to avoid extra compensation transformations or moves.
        Specified by:
        getApproximativeLocation in interface Locatable
        Parameters:
        currentLocation - The current location, usually obtained using Headmountable.getLocation()
        desiredLocation - The desired location to approximate.
        options - Options for the approximation.
        Returns:
        Throws:
        java.lang.Exception
      • isReachable

        public boolean isReachable​(Location location)
                            throws java.lang.Exception
        Specified by:
        isReachable in interface Movable
        Returns:
        true if the location can be moved to with this Movable (soft limits etc.)
        Throws:
        java.lang.Exception