Package org.openpnp.model

Examples of org.openpnp.model.Location.convertToUnits()


    logger.debug(String.format("dx %f, dy %f", dx, dy));
    Location boardLocation = new Location(Configuration.get()
        .getSystemUnits(), dx, dy, 0, angle );
   
    Location oldBoardLocation = jobPanel.getSelectedBoardLocation().getLocation();
    oldBoardLocation = oldBoardLocation.convertToUnits(boardLocation.getUnits());
   
        boardLocation = boardLocation.derive(null, null, oldBoardLocation.getZ(), null);

    jobPanel.getSelectedBoardLocation().setLocation(boardLocation);
    // TODO: Set Board center point when center points are finished.
View Full Code Here


            placementBLocation,
            visionA,
            visionB);
       
    Location oldBoardLocation = jobPanel.getSelectedBoardLocation().getLocation();
    oldBoardLocation = oldBoardLocation.convertToUnits(boardLocation.getUnits());
   
    boardLocation = boardLocation.derive(null, null, oldBoardLocation.getZ(), null);

    jobPanel.getSelectedBoardLocation().setLocation(boardLocation);
    jobPanel.refreshSelectedBoardRow();
View Full Code Here

    if (selectedNozzle == null) {
      return;
    }
   
    Location l = selectedNozzle.getLocation();
    l = l.convertToUnits(configuration.getSystemUnits());
   
    double x, y, z, c;
   
    x = l.getX();
    y = l.getY();
View Full Code Here

      double height = Math.abs(endY - startY);
      // Determine how many images are needed
      BufferedImage image = camera.capture();
      // Figure out how many units per image we are getting
      Location unitsPerPixel = camera.getUnitsPerPixel();
      unitsPerPixel = unitsPerPixel.convertToUnits(Configuration.get().getSystemUnits());
      double imageWidthInUnits = unitsPerPixel.getX() * image.getWidth();
      double imageHeightInUnits = unitsPerPixel.getY() * image.getHeight();
      logger.info(String.format("Images are %d, %d pixels, %2.3f, %2.3f %s",
          image.getWidth(),
          image.getHeight(),
View Full Code Here

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.