Package org.openpnp.spi

Examples of org.openpnp.spi.NozzleTip


                BoardLocation bl = solution.boardLocation;
                Part part = solution.placement.getPart();
                Feeder feeder = solution.feeder;
                Placement placement = solution.placement;
                Nozzle nozzle = solution.nozzle;
                NozzleTip nozzleTip = solution.nozzleTip;
               
                firePartProcessingStarted(solution.boardLocation, solution.placement);
       
                Location placementLocation =
                        Utils2D.calculateBoardPlacementLocation(bl, placement);

        // Update the placementLocation with the proper Z value. This is
        // the distance to the top of the board plus the height of
        // the part.
                Location boardLocation = bl.getLocation().convertToUnits(placementLocation.getUnits());
        double partHeight = part.getHeight().convertToUnits(placementLocation.getUnits()).getValue();
        placementLocation = placementLocation.derive(null, null, boardLocation.getZ() + partHeight, null);

        // NozzleTip Changer
        if (nozzle.getNozzleTip() != nozzleTip) {
              fireDetailedStatusUpdated(String.format("Unload nozzle tip from nozzle %s.", nozzle.getId()));       

              if (!shouldJobProcessingContinue()) {
                  return;
              }
             
                    try {
                        nozzle.unloadNozzleTip();
                    }
                    catch (Exception e) {
                        fireJobEncounteredError(JobError.PickError, e.getMessage());
                        return;
                    }
                   
                    fireDetailedStatusUpdated(String.format("Load nozzle tip %s into nozzle %s.", nozzleTip.getId(), nozzle.getId()));       

                    if (!shouldJobProcessingContinue()) {
                        return;
                    }
                                       
View Full Code Here


                BoardLocation bl = solution.boardLocation;
                Part part = solution.placement.getPart();
                Feeder feeder = solution.feeder;
                Placement placement = solution.placement;
                Nozzle nozzle = solution.nozzle;
                NozzleTip nozzleTip = solution.nozzleTip;
     
                if (nozzle == null) {
                    fireJobEncounteredError(JobError.HeadError, "No Nozzle available to service Placement " + placement);
                    return;
                }
View Full Code Here

            PlacementSolution solution = i.next();
            i.remove();
            // Feeder can be null if no applicable Feeder was found.
            Feeder feeder = getFeederSolution(Configuration.get().getMachine(), nozzle, solution.placement.getPart());
            // NozzleTip can be null if no applicable NozzleTip was found.
            NozzleTip nozzleTip = getNozzleTipSolution(Configuration.get().getMachine(), nozzle, solution.placement.getPart(), feeder);
            solution = new PlacementSolution(solution.placement, solution.boardLocation, solution.head, nozzle, nozzleTip, feeder);
            results.add(solution);
        }
        return results.size() > 0 ? results : null;
    }
View Full Code Here

        }
        if (nozzleTips.size() < 1) {
            return null;
        }
        // For now we just take the first NozzleTip that works.
        NozzleTip nozzletip = nozzleTips.get(0);
        return nozzletip;
    }   
View Full Code Here

          BoardLocation bl = solution.boardLocation;
          Part part = solution.placement.getPart();
          Feeder feeder = solution.feeder;
          Placement placement = solution.placement;
          Nozzle nozzle = solution.nozzle;
          NozzleTip nozzletip = solution.nozzleTip;

          if (nozzle == null) {
                      fireJobEncounteredError(JobError.HeadError, "No Nozzle available to service Placement " + placement);
                      return;
                  }
View Full Code Here

        BoardLocation bl = solution.boardLocation;
        Part part = solution.placement.getPart();
        Feeder feeder = solution.feeder;
        Placement placement = solution.placement;
        Nozzle nozzle = solution.nozzle;
        NozzleTip nozzleTip = solution.nozzleTip;

        // Determine where we will place the part
        Location boardLocation = bl.getLocation();
        Location placementLocation = placement.getLocation();

        // We will work in the units of the placementLocation, so convert
        // anything that isn't in those units to it.
        boardLocation = boardLocation.convertToUnits(placementLocation.getUnits());
       
        // If we are placing the bottom of the board we need to invert
        // the placement location.
        if (bl.getSide() == Side.Bottom) {
          placementLocation = placementLocation.invert(true, false, false, false);
        }

        // Create the point that represents the final placement location
        Point p = new Point(placementLocation.getX(),
            placementLocation.getY());

        // Rotate and translate the point into the same coordinate space
        // as the board
        p = Utils2D.rotateTranslateScalePoint(p, boardLocation
            .getRotation(), boardLocation.getX(), boardLocation
            .getY(), 1.0, 1.0);

        // Update the placementLocation with the transformed point
        placementLocation = placementLocation.derive(p.getX(), p.getY(), null, null);

        // Update the placementLocation with the board's rotation and
        // the placement's rotation
        // This sets the rotation of the part itself when it will be
        // placed
        placementLocation = placementLocation.derive(
                null,
                null,
                null,
                (placementLocation.getRotation() + boardLocation.getRotation()) % 360.0);

        // Update the placementLocation with the proper Z value. This is
        // the distance to the top of the board minus the height of
        // the part.
        double partHeight = part.getHeight().convertToUnits(placementLocation.getUnits()).getValue();
        placementLocation = placementLocation.derive(null, null, boardLocation.getZ() - partHeight, null);


       
                // NozzleTip Changer
                if (nozzle.getNozzleTip() != nozzleTip) {
                    fireDetailedStatusUpdated(String.format("Unload nozzle tip from nozzle %s.", nozzle.getId()));       

                    if (!shouldJobProcessingContinue()) {
                        return;
                    }
                   
                    try {
                        nozzle.unloadNozzleTip();
                    }
                    catch (Exception e) {
                        fireJobEncounteredError(JobError.PickError, e.getMessage());
                        return;
                    }
                   
                    fireDetailedStatusUpdated(String.format("Load nozzle tip %s into nozzle %s.", nozzleTip.getId(), nozzle.getId()));       

                    if (!shouldJobProcessingContinue()) {
                        return;
                    }
                                       
View Full Code Here

       
        generalConfigPanel.removeAll();
        nozzleTipSpecificConfigPanel.removeAll();
        if (index != -1) {
          index = table.convertRowIndexToModel(index);
          NozzleTip nozzleTip = tableModel.getNozzleTip(index);
//          Wizard generalConfigWizard = new NozzleConfigurationWizard(nozzle);
          Wizard generalConfigWizard = null;
          if (generalConfigWizard != null) {
            generalConfigWizard.setWizardContainer(NozzleTipsPanel.this);
            JPanel panel = generalConfigWizard.getWizardPanel();
            generalConfigPanel.add(panel);
          }
          Wizard nozzleTipSpecificConfigWizard = nozzleTip.getConfigurationWizard();
          if (nozzleTipSpecificConfigWizard != null) {
              nozzleTipSpecificConfigWizard.setWizardContainer(NozzleTipsPanel.this);
            JPanel panel = nozzleTipSpecificConfigWizard.getWizardPanel();
            nozzleTipSpecificConfigPanel.add(panel);
          }
View Full Code Here

TOP

Related Classes of org.openpnp.spi.NozzleTip

Copyright © 2018 www.massapicom. 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.