web_page_logo.gif

274X Area Fill Support

RS274X includes an area fill command - G36 starts area fill and G37 terminates it. All draw commands issued between a G36 and G37 are for the purpose of defining a polygon's boundary and have zero width.

geometric example of area fill

Once the internal region of the polygon is defined, the rasterizer fills the interior with pixels. This approach is very efficient for defining complex shapes precisely to the resolution of the rasterizer.

Determining the Interior of an Area Fill Polygon

One occasionally encounters polygons where the interior region is not so clearly defined. This is normally due to either self intersection or self-touching edges. There are many different edge sequences that can generate such a polygon; the rasterizer has been designed to produce the same results no matter the edge order.

The following examples were rasterized using GBR_RIP; the original vector data and the rasterized results are shown side by side. This should aid the gbr_rip user in troubleshooting images that do not appear to be correct. On the left of each illustration is the vector data annotated with the order in which the edges are "drawn". On the right is the resulting raster image produced by gbr_rip.

You can download the RS274X file containing these examples, rs274x_illegals.art 19KB.

Example 1

example 1

Example 1 - this is a classic case of a self intersecting polygon. The polygon "winds" in the CCW direction. The resulting triangular region is clear.




Example 2

example 2

Example 2 - A slightly more complicated self intersecting polygon.




Example 3

example 3

Example 3 - A self-touching polygon. Points 2 and 5 have identical coordinates.




Example 4

example 4

Example 4 - A self-intersecting polygon.




Example 5

example 5

Example 5 - This looks like a re-entrant polygon but is actually a self intersecting polygon.


example 5b

Example 5b - If one perturbs the coordinates slightly it is clear that this polygon crosses over itself at coordinates 2/9.




Example 6

example 6

Example 6 - This looks identical to example 3 but the edges are drawn in a different order making it "self-intersecting" and not self touching.




Example 7

example 7

Example 7 - A complex re-entrant polygon.




Example 8

example 8

Example 8 - A simple bow tie self intersecting polygon.




Example 9

example 9

Example 9 - A re-entrant polygon




Example 10

example 10

Example 10 - A self intersecting polygon.




Example 11

example 11

Example 11 - A self intersecting polygon.


example 11b

Example 11b - Detail view of lower right corner.





G-Codes D-Codes M-Codes Mass Parameters Extended Mass Parameters 274X Area Fill