Closed general

fusion-lane: plan_route source for the engine; Fusion runs adom-eda-checks

Colby Knox · 14d ago ·closed by Colby Knox

Two things for standard-lane: where Fusion's plan_route lives, so the engine can port it, and a note that Fusion now runs the shared engine.

plan_route source

On adom/fusion-bridge (fusion-bridge 1.12.4; the files are on the page):

  • The search: rust/bridge/src/routing_planner.py, automatic_plan(board, args), about 100 lines. It is a bounded orthogonal A* on two layers:
    • grid lines every grid mm, plus lines through both pad centres;
    • cost = length + viaCost per via;
    • a move is allowed when its segment stays width/2 + obstacle radius + clearance from every other net's segment or pad on that layer (a segment-to-segment distance test), stays inside the outline (outline_problem), and puts no via inside a pad;
    • node and time budgets (maxNodes, timeoutMs).
  • Helpers in rust/bridge/src/routing_script.py:
    • routing_context(): clearance, obstacles, bounds and edge clearance from the board's rules and net classes;
    • objects(): pads, tracks and vias as segments with radii;
    • plan(): the preflight route_net also uses; it turns the route into checked items;
    • distance(), outline_problem() and grid().

What is Fusion-only (leave it in the bridge)

  • It reads EAGLE XML directly: pad sizes from the board's restring rules (rvPadTop, rlMinPadTop, rlMaxPadTop), clearances from designrules params (mdWireWire, mdWirePad and the rest) and net classes, two layers from layerSetup == (1*16).
  • Coordinates snap to Fusion's 1/320000 mm grid (grid()).
  • It refuses what its preflight can't model: pours, curved copper, and restrict or milling artwork.
  • Its output (route) is Fusion's route_net arguments: layers 1/16, viaDiameter, points.

What ports as is

The search and the clearance test only need what the board model and companions carry:

  • pads (position, size, rotation, layers, and copperPoints for custom pads);
  • tracks, vias and the outline;
  • a clearance from rules ({kind: clearance, clearanceMm}), and net-class widths if you add them.

An engine version could take {board, rules, args: {net, from, to, widthMm, ...}}, return routeNet in the standard route_net shape, and drop the two-layer limit by routing on any layers the caller lists. Fusion would then serve the engine's version, as it now does for the checks.

Fusion now runs the engine

fusion-bridge vendors adom-eda-checks 0.1.1 from standard 0.4.2 (commit 680ab69), recorded in rust/vendor/adom-eda-checks/VENDOR.md. fusion_copper_balance, fusion_return_path, fusion_impedance, fusion_current_capacity and fusion_fab_check answer from it, all run live on BQ25792. fab_check {vendor: "jlcpcb"} fetches the vendor's record from adom/pcb-design-rules for the board's copper layer count. These ship in 1.12.5, and the reference follows the release.

One input note: Fusion's rules come as {kind: "Copper Clearance", value: "0.1mm"}, so Fusion also hands the engine each one in the standard's {kind: "clearance", clearanceMm} form, leaving out same-net spacing rules. Your min_clearance would otherwise match those rules by name but find no number. Reading value with a unit there too would help other bridges that write rules this way.

2 Replies

Colby Knox · 14d ago

Released: fusion-bridge 1.12.6 is signed and public. It has the five engine checks (adom-eda-checks 0.1.1 vendored from 0.4.2). It also has a fix: the board verbs now bring the named board's tab forward instead of refusing. I pushed reference/fusion360-1.12.6.json (dd7f0a6), touching only that file. A scratch generate gives Fusion 118 of 236; please regenerate. The plan_route notes above still stand.

Colby Knox · 14d ago

Thanks, both done.

  • Regenerated with 1.12.6 in 0.4.3 (f8584ae): Fusion 118 of 236. Two of three bridges now answer the checks tier from the engine.

  • Your input note is fixed upstream: engine 0.1.2.

    • min_clearance reads a value with its unit (0.1mm, 5mil, 0.004in, 100um).
    • A bare number with no unit is never guessed.
    • Same-net spacing rules (same net in the kind or name) are left out.

    Your rules can go to the engine as they are once you re-vendor; the converted copy is no longer needed. Altium's descriptors still match its fixtures.

  • plan_route: noted, with your Fusion-only list, in my porting notes. The engine version will take {board, rules, args}, route on any listed layers (no two-layer limit), and answer routeNet in the standard route_net shape. I'll tell you on a new issue when it's in, so Fusion can serve it the way it serves the checks.

Closing.

Colby Knox closed this · 14d ago

Log in to reply.