API & MCP

Everything a person can do on Ohmforge PCB Enclosure Generator (STL), a program or AI agent can do with the same inputs and get the identical result.

HTTP API

Ohmforge PCB Enclosure Generator (STL)

Describe a circuit board as JSON – outline, mounting holes, component boxes, edge connectors and keep-outs – and get a two-part 3D-printable enclosure: base with standoffs for heat-set inserts or self-tapping screws, connector cut-outs, and a lid with a snap-fit or friction lip or corner screws, optional vents and windows. Both STL files are checked to be watertight and manifold, cut-outs and standoffs are probed on the final mesh, and every part is tested for collisions. Includes a dimensioned drawing and an OBJ assembly.

Inputs of Ohmforge PCB Enclosure Generator (STL)
FieldTypeDefaultDescription
modeselect (enclosure, coupon)"enclosure"Output. Print the coupon once per printer and material, read the printer profile values off it, then enter them below.
boardtextarea"{\n \"format\": \"ohmforge-board\",\n \"version\": 1,\n \"name\": \"Sensor nodeBoard model (JSON). Fields: name, thickness, outline {shape: rect | rounded | polygon, width, height, radius, points}, holes [{id, x, y, diameter}], parts [{id, kind, x, y, width, depth, height, side}], connectors [{id, kind, edge: left | right | bottom | top, position, width, height, depth, overhang, offsetZ, side}], keepouts [{id, label, x, y, width, depth, heightAbove, lidOpening}]. Millimetres; part x and y are centres. Part kinds: smd-ic, dip-ic, electrolytic, pin-header, tactile-button, led-5mm, relay, radio-module, display-module, power-inductor, custom. Connector kinds: usb-c, micro-usb, usb-a, barrel-jack, header-right-angle, rj45, screw-terminal, micro-sd, custom. An Ohmforge project with a saved board also works.
wallnumber2Wall thickness
floornumber2Floor thickness
lidThicknessnumber2Lid thickness
clearancenumber1Gap between board and wall. Around the board's bounding box.
topClearancenumber2Space above the tallest part
cornerRadiusnumber3Outer corner radius. Drawn with straight facets on the arc.
standoffHeightnumber5Standoff height (under the board). Also the depth of the screw or insert holes.
screwselect (M2, M2.5, M3)"M3"Screw size
fixingselect (insert, self-tap)"insert"Board fixing
lidselect (snap, lip, screws)"snap"Lid
lipHeightnumber3Lip height
lipWidthnumber1.2Lip width
lipGapnumber0.2Gap between lip and wall. Per side; 0.15–0.3 mm suits most FDM printers.
snapDepthnumber0.4Snap bump depth. How far the bumps reach beyond the lip; the catch is this minus the lip gap.
connectorClearancenumber0.5Clearance around connectors
ventsbooleanfalseVentilation slots in the lid
ventWidthnumber2Vent slot width
ventPitchnumber4Vent slot pitch
circleSegmentsinteger32Facets per circle. Holes are drawn with their flats at the nominal diameter.
holeCompensationnumber0Printer profile: hole compensation. Added to every round hole diameter. Coupon: the offset of the smallest hole your screw passes freely.
xyClearancenumber0Printer profile: XY clearance. Added per side to connector openings and lid windows. Coupon: the first slot the test peg drops into freely.
lidFitOffsetnumber0Printer profile: lid fit offset. Added to the lip gap. Coupon: clearance of the slot with a firm push fit minus the lip gap.
insertHoleDiameternumber0Printer profile: insert hole (measured). 0 = typical value plus hole compensation. Coupon: the standoff sample that held the insert best.
stlFormatselect (binary, ascii)"binary"STL format

Every result contains

inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.

MCP (Model Context Protocol)

{
  "mcpServers": {
    "ohmforge-enclosure-generator": { "type": "http", "url": "https://ohmforgeenclosuregenerator.usefulweb.app/mcp" }
  }
}