Class Rs274xParser


  • public class Rs274xParser
    extends java.lang.Object
    A simple RS-274X parser. Not intended to be a general parser, but implements only OpenPnP specific functionality.
    • Constructor Summary

      Constructors 
      Constructor Description
      Rs274xParser()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static void main​(java.lang.String[] args)  
      java.util.List<BoardPad> parseSolderPastePads​(java.io.File file)
      Parse the given File for solder paste pads.
      java.util.List<BoardPad> parseSolderPastePads​(java.io.Reader reader)
      Parse the input from the Reader extracting individual pads to be used for solder paste application.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Rs274xParser

        public Rs274xParser()
    • Method Detail

      • parseSolderPastePads

        public java.util.List<BoardPad> parseSolderPastePads​(java.io.File file)
                                                      throws java.lang.Exception
        Parse the given File for solder paste pads.
        Parameters:
        file -
        Returns:
        Throws:
        java.lang.Exception
        See Also:
        parseSolderPastePads(Reader)
      • parseSolderPastePads

        public java.util.List<BoardPad> parseSolderPastePads​(java.io.Reader reader)
                                                      throws java.lang.Exception
        Parse the input from the Reader extracting individual pads to be used for solder paste application. It is expected that the input is is an RS-274X Gerber solder paste layer. Currently this code only parses out single flashes of rectangular, circular and oblong apertures. Ideas for future versions include rendering the entire file and uses blob detection and contour finding to create polygon pads. Another option is to consider each operation it's own element/shape. This is how gerbv seems to do it.
        Parameters:
        reader -
        Returns:
        Throws:
        java.lang.Exception
      • main

        public static void main​(java.lang.String[] args)
                         throws java.lang.Exception
        Throws:
        java.lang.Exception