Hi Jonathan,
I am pretty green in DXF not sure if I can help too much. But anyway, here is what I learned about polygons
Here are the entities in DXF and from the comments, it seems polygon in DXF can be treated as a POLYLINE. In netDXF each entity has a class with the same name, I think you can play with Hatch/Polyline, etc classes see if you can use to create a polygon.
Generically in GIS, a Polygon is made of one outer ring and none or multiple inner rings(holes). The first and last vertex of a ring must be identical, it might be used to identify if a polyline is a ring or a line. Also in some formats (such as shapefiles) whether it’s inner ring or outer ring is identified by the order of its verticies. Verticies in an outer ring are in clockwise while those in an inner ring are always in counterclockwise. DXF might use the same trick.
Hope that helps. Good luck!
Thanks,
Ben