Skip to content

wholeboard.dxf

Read a board outline from a DXF drawing: the largest closed shape is the board, circles are holes.

Handles LINE, ARC, CIRCLE, LWPOLYLINE (with bulges) and POLYLINE/VERTEX, in millimetres or inches ($INSUNITS). Coordinates come back in WholeBoard's convention: mm from the board's top-left, y down.

read(text)

{"outline": [[x, y], ...], "width_mm", "height_mm", "holes": [{"x_mm", "y_mm", "diameter_mm"}], "notes"}.