solver

Solve

Find optimal PCB stackup configurations for the given constraints.

Enumerates material/thickness/copper combinations, applies hard constraints (impedance feasibility, total thickness, DFM limits), scores on soft objectives (cost, insertion loss, manufacturability), and returns ranked solutions. Progressively relaxes constraints if no solution is found.

post/api/solver/solve

Request

  • Base URL: https://api.pcbgenerator.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.pcbgenerator.com/api/solver/solve
  • Auth: none declared

Request body

layer_countinteger required

Total copper layers (must be even)

frequencynumber required

Operating frequency in GHz

target_thickness_mmnumber

Desired finished board thickness in mm

thickness_tolerance_mmnumber nullable

Allowable deviation from the target thickness (mm). OMIT IT and the solver allows 10% of the target, with no minimum. A stated value is used exactly as given, including 0.0 (hit the target exactly). The tolerance the solve used comes back on SolverResult.

allowed_core_materialsstring[] nullable

If set, restrict cores to these materials only

allowed_prepreg_materialsstring[] nullable

If set, restrict prepregs to these materials only

allowed_inner_core_materialsstring[] nullable

Materials a HYBRID board may use for its inner cores (every core but the outer two). A hybrid is searched beside core-outer on 6+ layers when a core outside the FR-4 family is named, or when this is given; omitted, the inner cores are the FR-4 family (FR370HR, VT47, EM827). See solver/stackup/hybrid.py.

copper_weight_oznumber nullable

If set, restrict the search to this copper weight (oz). Omit to let the solver optimize copper weight freely. This is the FINISHED thickness, with outer-layer plating already included (1 oz = 0.035 mm finished, plated up from 0.5 oz starting foil). A spec written as '0.5 oz base foil + plating, 1.7 mil finished' uses the OTHER convention — pass 1, not 0.5.

cost_priority'low' | 'balanced' | 'performance'
build_typestring

single | hdi1 | hdi2 | hdi3 | hdi4

max_solutionsinteger

Max solutions to return

reflow_process'leaded' | 'lead_free'
construction'foil' | 'core_outer' | 'auto' nullable

Lamination: 'foil' (prepreg outermost) or 'core_outer' (a core outermost, so an outer microstrip rides on the core). Omitted, the board is built foil, unless allowed_core_materials names a core, which builds core-outer where core-outer can be built (4+ layers, build_type 'single'); frequency does not change it. 'auto' searches BOTH and lets the score decide. Naming 'foil' or 'core_outer' PINS it — an explicit choice always wins. Each solution reports the construction it was built as.

Response

Successful Response

total_evaluatedinteger required
total_feasibleinteger required
diagnosticsstring[]
skin_depth_umnumber nullable

Copper skin depth at the solve frequency in µm, to 6 decimal places: conductor_loss_equations.calculate_skin_depth, the value the insertion-loss score's roughness term used. Set on every solve, feasible or not.

materialsobject

Catalog facts for each core or prepreg material named in solutions, keyed by name; empty when no solution is returned.

thickness_tolerance_mmnumber

The thickness tolerance this solve actually used, resolved from the request (_constraints.resolve_thickness_tolerance). ⚡ Every surface shows THIS value, never its own default: the tolerance also reorders boards through the thickness-deviation score, so a caller that printed a different number would be describing a ranking it did not get.

Changes

No recorded changes to this operation across all 1 revision of this API.