Ejemplo n.º 1
0
 /// +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
 /// <summary>
 /// Flash the aperture
 /// </summary>
 /// <param name="isoPlotBuilder">the builder opbject</param>
 /// <param name="stateMachine">the statemachine</param>
 /// <param name="xyComp">the xy compensation factor</param>
 /// <param name="x1">the first x value</param>
 /// <param name="y1">the first y value</param>
 /// <returns>z success, nz fail</returns>
 public void FlashApertureForGCodePlot(IsoPlotBuilder isoPlotBuilder, GerberFileStateMachine stateMachine, int x1, int y1, int xyComp)
 {
     if (ADCodeAperture == null)
     {
         return;
     }
     try
     {
         // macros need to reset
         ADCodeAperture.ResetForFlash();
         // flash it
         ADCodeAperture.FlashApertureForGCodePlot(isoPlotBuilder, stateMachine, x1, y1, xyComp);
     }
     catch (Exception ex)
     {
         // rethrow with line number
         throw new Exception("Line Number:" + LineNumber.ToString() + ", " + ex.Message);
     }
 }
Ejemplo n.º 2
0
 /// +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
 /// <summary>
 /// If we fill a shape with the aperture at the current coordinates. This
 /// simulates the aperture flash of a Gerber plotter
 /// </summary>
 /// <param name="graphicsObj">a graphics object to draw on</param>
 /// <param name="workingBrush">a brush to draw with</param>
 /// <param name="x1">the x center value</param>
 /// <param name="y1">the y center value</param>
 /// <returns>z success, nz fail</returns>
 public void FlashApertureForGerberPlot(GerberFileStateMachine stateMachine, Graphics graphicsObj, Brush workingBrush, float x1, float y1)
 {
     if (ADCodeAperture == null)
     {
         return;
     }
     try
     {
         // macros need to reset
         ADCodeAperture.ResetForFlash();
         // flash it
         ADCodeAperture.FlashApertureForGerberPlot(stateMachine, graphicsObj, workingBrush, x1, y1);
     }
     catch (Exception ex)
     {
         // rethrow with line number
         throw new Exception("Line Number:" + LineNumber.ToString() + ", " + ex.Message);
     }
 }