import cadquery as cq

PARAMETERS = {
    "length_mm": 40.0,
    "width_mm": 30.0,
    "height_mm": 12.0,
    "corner_radius_mm": 3.0,
    "hole_diameter_mm": 5.0,
    "hole_spacing_mm": 24.0,
}

result = (
    cq.Workplane("XY")
    .box(
        PARAMETERS["length_mm"],
        PARAMETERS["width_mm"],
        PARAMETERS["height_mm"],
    )
    .edges("|Z")
    .fillet(PARAMETERS["corner_radius_mm"])
    .faces(">Z")
    .workplane()
    .pushPoints([
        (-PARAMETERS["hole_spacing_mm"] / 2, 0),
        ( PARAMETERS["hole_spacing_mm"] / 2, 0),
    ])
    .hole(PARAMETERS["hole_diameter_mm"])
)
