Saved results (updated source): exports retain complete JSON and meshes
alongside HTML/CSV. Saved single-board scenes also include a portable
.pocket-kivi.json companion. Live snapshots and multi-board scenes do not claim
a single saved-PCB binding; scene coordinates remain explicit.
Export workflow and limits.
| Start here | Link |
|---|---|
| Download and install | Latest release · Installation guide |
| First use | Getting started |
| Help | Offline help · Compatibility |
| Command line | wayricad tools run mechanical-check -- --help |
CLI scope: Saved-board 2D screening and optional exact-solid checks. The unified command requires the suite CLI installation; installing this PCM plugin alone does not install the complete CLI suite.
- Run a quick saved-board 2D footprint-envelope overlap and XY-clearance screen without FreeCAD.
- Use optional FreeCAD exact-solid intersection/distance checks with STEP models and enclosure geometry.
- Import a second saved PCB into the current board’s STEP coordinate frame, position it with X/Y/Z offset and Z rotation, and check exact interboard collisions or close approaches.
- Inspect each interboard finding in the 3D cutaway and exact X/Y/Z or custom-direction 2D section curves; the HTML/JSON report retains these sections.
- Review height/keepout rules, hardware and access envelopes, severity filters and reasoned waivers.
- Configure a circular PnP nozzle tip and wider head with a live dimensioned side view; review conservative tip/head access warnings in the offline report.
- Inspect local geometry/conflict surfaces and export HTML, JSON or CSV through the GUI or CLI.
- Measure any two modelled parts with exact surface witnesses, or use a point ruler between two picked surface locations. Hover shows the nearest measured part and its closest-approach line.
- Keep the whole board in view, switch between top/bottom/side/isometric views, and use reference labels, an orthographic scale, grid and persistent rulers.
- Quick 2D mode is always incomplete for mechanical sign-off: it omits height, enclosure and exact solids, and can flag harmless bounding-box overlaps.
- Exact 3D checks require FreeCAD and usable models; model gaps and unconfirmed mounting intent prevent a complete pass.
- Hardware and assembly-access checks use conservative envelopes; static fit does not validate manufacturing processes or electrical DRC.
- Analysis uses the saved board, not unsaved edits. Native KiCad 11 extraction remains unverified.
- Local measurement (Windows 11, KiCad 10.0.6 Python):
< 30 ssetup;17.68 swall-clock CLI run (including KiCad STEP export, solid/height/clearance audit, and HTML/JSON/CSV report generation) on an 18-part board. - Scope vs. commercial tools: Full MCAD tools (SolidWorks, NX, Altium MCAD) handle parametric assemblies; Mechanical Check runs local, license-free STEP and 2D envelope screening directly from KiCad.
Local, read-only board mechanical validation with actual STEP conflict surfaces and offline reports.
Install the independently built WayriCAD Mechanical Check ZIP with KiCad 10 Plugin and Content Manager. The IPC action opens a native window through installed KiCad 10 Python. Save PCB edits first: launch context identifies the saved file and does not capture unsaved changes. If context is unavailable, choose a board manually.
The compact Board → Rules → Run → Review → Report navigation retains clearances, hardware, enclosure/zone rules, search, severity filters, 3D inspection, reasoned waivers, and HTML/JSON/CSV exports. Advanced geometry settings stay behind one button. The canvas uses a neutral background with actual solid geometry and conflict volumes.
On Rules, enter the PnP tip radius, head radius, head setback above the pickup plane, and access travel in millimetres. The side-view diagram updates as values change. The head radius must be at least the tip radius, and setback cannot exceed travel. Exact 3D runs screen same-side obstacles against each circular section and identify which one triggered a warning. The HTML report shows the configured profile and a schematic obstacle for a selected nozzle warning; use the 3D viewer for actual locations. This is an access envelope, not a machine-path or certified nozzle simulation.
Launch from PCB Editor and choose a finding, then use Locate in KiCad to select its primary-board footprints by UUID. A mixed finding lists any comparison-board or enclosure objects separately. The editor must still be showing the reviewed board revision.
The saved-board window follows saves to the primary and comparison PCBs and their adjacent project/rule files. A change clears the old scene, findings and export, cancels a running check, and refreshes the primary footprint inventory. Mount settings follow surviving footprint UUIDs. Run checks again to rebuild the results.
The review workspace keeps board inspection and finding navigation together. Validation and screenshot provenance.
Actual KiCad/FreeCAD STEP-solid review of the public synthetic fixture. It deliberately has collisions, height violations and incomplete coverage; the picture is not a passed board audit.
| Task | Control |
|---|---|
| Give the board more room | Toggle Findings / tools to hide the sidebar, or drag its divider. Drag the divider between the findings list and selected details too. |
| Find an issue | Search for a reference, rule or description. Multiple search words must all match. Choose Errors, Warnings, Waived or Open, and sort by priority, parts or rule. |
| Review issues in order | Use Previous / Next. The selected issue remains selected after sorting when it still matches. |
| Inspect the contact | Double-click a finding or click Focus finding. Isolate parts hides unrelated components; Fit board restores the assembly context. |
| Preserve a manual camera view | Turn off Frame parts when selecting a finding. Search/sort keeps the camera when the same finding remains selected. |
| Cross-select from 3D | Click a part to select its first finding in the visible filtered list and show the part's dimension card. The camera stays where it is. |
| Measure geometry | Open Measure for part gaps, surface points, CAD edges or body centers. Display contains cutaway, transparency, sections and PNG export. |
| Use keyboard help | Ctrl+F opens findings search. F1 opens the bundled guide. In supported tables, Ctrl+Shift+Enter reads complete row values. |
Errors and Warnings show unwaived findings; Waived remains a separate review filter. Filtering to zero findings clears the old 3D highlight and disables issue actions. A clean filtered list does not establish a pass: coverage gaps and the overall report status remain visible.
Board, Rules and Report pages scroll on smaller screens. Compare another board and Hardware, nozzle and section options keep optional setup out of the main flow. Expand hardware options to confirm mounting intent; hiding that section does not waive any check.
- Save both KiCad boards. Open Mechanical Check from the current board and choose Exact 3D solids.
- On Board, choose the Comparison board. Enter its X/Y/Z translation in millimetres relative to the current board’s KiCad STEP export origin and its rotation about the CAD Z axis. This placement is an assembly assumption; the plugin does not infer connector mating or mounting-hole alignment.
- On Rules, set the minimum 3D clearance. Optionally enter a nonzero custom section-plane normal such as
1,1,0. Run the check. It exports each board independently, then applies the configured transform to the comparison board’s STEP solids. - In Review, select an
interboard.collisionorinterboard.clearancefinding. The comparison board is blue/orange and its references beginOther:. Enable Cutaway PCB, choose X, Y, Z or Custom and adjust the section offset to scan through the contact. 2D section… shows exact STEP intersection curves through the finding for that direction. - Export the HTML/JSON/CSV report. The HTML includes the selected finding’s exact 2D section curves and a cutaway control; JSON retains placement and section geometry without the comparison board’s local path. Re-run after changing either board or the placement.
The two source board files are read only and independently hashed. Missing STEP models or a missing board substrate are coverage gaps, never a pass. Only static placed solids are checked: mating alignment, motion during assembly, cables, flexible sections and manufacturing tolerances need separate review. The custom direction is set before Run so its exact section curves are generated by FreeCAD; the 3D cutaway offset can be adjusted afterward. Quick 2D mode does not accept a comparison board.
For CLI use, create a rules JSON file with "comparison_board": {"path": "C:/Projects/Example/other.kicad_pcb", "translation_mm": [0, 0, 8], "rotation_deg": 0} and "section_normal": [1, 1, 0], then run the usual python launch.py current.kicad_pcb --rules rules.json --output reports command. Relative comparison paths resolve from the current board’s directory.
Saved-board setup using a small validation fixture. Model coverage and exact-solid findings are assessed after Run.
The installed package includes offline help with its workflow and limitations.
Choose Quick 2D footprint screen (no FreeCAD) on the Board page, then Run. The saved originating board is screened for same-side footprint bounding-box overlap and XY clearance. DNP filtering, searchable findings, native geometry preview and HTML/JSON/CSV reports work in this mode. No STEP models are resolved or copied.
This conservative screen can report harmless bounding-box overlap, particularly for rotated parts. It is always INCOMPLETE for mechanical sign-off: height, enclosure, exact solid interference, hardware and assembly access are unchecked. Opposite-side components are not compared. Choose Exact 3D solids for the existing detailed FreeCAD workflow; that mode remains the default. CLI rules use "mode": "quick2d" or "mode": "exact3d".
The pictured synthetic fixture uses a 20 mm proximity warning threshold to demonstrate the markers: nine warnings across six footprint envelopes, including seven optional proximity findings. No STEP export or FreeCAD analysis runs in this mode, and the source hash remains unchanged.
- Python 3.10+ CLI; the IPC environment uses
kicad-python>=0.8,<0.9. - KiCad 10 Python with
pcbnew,wxPythonandPyOpenGLfor extraction/native UI, pluskicad-cliSTEP export. - Exact 3D mode only: FreeCAD Python with
FreeCAD,PartandImportfor Open CASCADE solid checks.
The following launcher correction is in development source; published 3.6.32 packages predate it. Validation.
The IPC launcher, standalone --gui/--review commands and optional native action
prepare PyOpenGL in a private dependency environment when needed, then open the
viewer in a separate process. KiCad's Python installation is not modified. Setup
checks both OpenGL.GL and OpenGL.GLU; a setup failure reports its log path.
See runtime setup for offline wheels and
proxy configuration. Saved-board command-line analysis does not require OpenGL.
python launch.py --doctor prints executable discovery. Set WAYRICAD_MECHANICAL_KICAD_CLI, WAYRICAD_MECHANICAL_KICAD_PYTHON, or WAYRICAD_MECHANICAL_FREECAD_PYTHON to override paths. The Windows auto-discovery intentionally selects KiCad 10 because the extraction worker uses SWIG. KiCad 11 live integration and extraction are unverified; installation metadata does not claim runtime certification.
python launch.py --init-rules rules.json
python launch.py board.kicad_pcb --rules rules.json --output reports
& 'C:/Program Files/KiCad/10.0/bin/python.exe' launch.py --guiExit codes: 0 passed/waived, 1 runtime/configuration failure, 2 review required, 3 incomplete coverage. Every completed run can produce a unique timestamped report folder; HTML contains its own viewer assets, without CDN/network access.
Exact solid intersection/distance, component-to-enclosure and PCB fit, top/bottom heights, regional heights and rectangular keepouts are included. Hardware/copper-pad proximity, screw/washer/tool/nozzle access and independent XY/Z allowances are conservative envelopes, visibly reported as such. Model gaps and unconfirmed mounting intent prevent a pass even if findings are waived. See local help for coordinates and workflow. Static fit checks do not replace electrical DRC or validate manufacturing processes.
| Method | Implementation and units | Evidence boundary and limits | Source and tests |
|---|---|---|---|
| Saved-board extraction | A native KiCad worker extracts footprint identity, side, 2D bounds, model transforms, board outline/thickness, pads and source hashes; kicad-cli exports STEP for the same saved revision. Missing/failed models remain coverage gaps. |
Unsaved editor state is outside the analysis. STEP placement is accepted as saved intent; material tolerances and flexible objects are not inferred. | extract.py, snapshot_worker.py, pipeline tests |
| Quick 2D screen | Same-side axis-aligned footprint envelopes use per-axis interval gaps and Euclidean gap sqrt(dx²+dy²) in mm. An adaptive sweep broad phase retains all pairs whose boxes can be within the requested XY threshold. |
This is deliberately conservative: rotated/concave bodies can be false positives; height, enclosure and solid intersection are unavailable and the result stays incomplete. | quick.py, findings.py, test_quick.py |
| Exact solid collision and clearance | Bounding boxes prune impossible pairs; FreeCAD/Open CASCADE distToShape returns minimum surface distance and witness points. At contact, Boolean common supplies intersection volume and conflict geometry; positive volume above volume_tolerance_mm3 is a collision, otherwise distance is compared with the mm clearance. Open CASCADE documents the underlying minimum-distance query and Boolean common. |
Kernel failure or missing finite witnesses remains unknown, never zero or pass. A zero surface distance without sufficient positive overlap is contact/clearance evidence, not invented penetration. | solid_worker.py, proximity.py, test_pipeline.py and test_measurements.py |
| Nearest-part proof | A longest-axis bounds tree is traversed by increasing AABB-distance lower bound. Exact/cached surface queries continue until every remaining lower bound is no better than the best witness; any failed query whose lower bound could win prevents a nearest claim. Full collision screening remains separate. | The tree accelerates queries but does not substitute box distance for solid distance. Eligibility filters exclude board/enclosure or opposite-side items where the workflow requires it. | proximity.py, brute-force/random/dense comparisons in test_measurements.py |
| Heights, keepouts and access envelopes | Top height is max(0, zmax − board_thickness) and bottom height is max(0, −zmin). Regional height/rectangular keepout checks use board/CAD coordinate transforms. Hardware allowances are cylinders/boxes; the PnP model is two coaxial circular sections (tip and head) over configured Z ranges, screened against obstacle bounds. |
Axis-aligned extents and nozzle/hardware envelopes are conservative; they do not model mass, compliance, assembly sequence or machine motion. | solid_worker.py, test_height_proximity.py and stepped-nozzle cases in test_core.py |
| Interboard transforms and sections | The comparison assembly receives the explicit XYZ translation and Z rotation before the same exact pair checks. For each finding, Open CASCADE sections each solid with X/Y/Z and optional custom planes; report curves remain in the placed assembly frame. | Connector mating and mounting alignment are user-entered assumptions. Sections are diagnostic slices, not swept-volume checks. | interboard_checks/sections_for_pair in solid_worker.py, test_interboard.py |
| Feature and point measurements | Minimum part/edge distances use immutable BREP curves/surfaces and kernel witnesses. Body centers are volume-weighted geometric centroids, Σ(Vᵢcᵢ)/ΣVᵢ, in mm; point rulers use Euclidean distance between picked tessellation points. |
Tessellation is only for display/picking; it is explicitly approximate. Geometric centroid is not center of mass. Invalid witness/distance disagreement is rejected. | feature_geometry.py, test_feature_measurements.py |
The exact distance, Boolean and section results come from the documented CAD kernel operations. Pair scheduling, bounds trees, access envelopes and review policy are WayriCAD-specific engineering heuristics; they are not presented as certified collision, tolerance-stack or process simulation research.
Integrated from the user-provided 3d-interference-check project (3Dvalid 0.1.0), with original MIT license preserved. Provenance records the import. No Marble checkout, source screenshots, third-party model libraries, generated reports or build artifacts are included. The small synthetic test board references external KiCad libraries.
Run python -m unittest discover -s mechanical_check_plugin/tests -v from the suite root. Pure checks run without CAD; native pipeline tests require KiCad, FreeCAD and the installed model library. Runtime verification details are reported by the suite validation record.
The Review workspace gives the board most of the window, with measurements and findings in a resizable sidebar. The toolbar identifies the loaded geometry. Load 3D models runs the exact STEP analysis from a Quick 2D result; after that, 3D view restores the orbitable solid assembly. If FreeCAD is missing, the action opens Board setup with an explanation. Changing camera views never turns 2D envelopes into component solids.
Drag to orbit, right-drag to pan and use the wheel to zoom. Hover over visible solid triangles for the component reference and XYZ position; click to select, or Ctrl-click to pin a surface probe. Section clipping and isolated-part visibility apply to picking. Offline HTML includes a clearable probe list. These coordinate probes do not alter either board or create new collision findings.
Native labels show the active ruler, hovered closest approach and selected/hovered parts. Saved ruler lines remain visible; label placement respects the viewport and scale bar, and omits crowded labels. Grid and PCB transparency start off. Display contains advanced view controls and Save view…, which exports the rendered view directly to an opaque PNG. Help images can be clicked to inspect their original pixels in a scrollable window.
Click a part in Select / orbit to open its dimension card: CAD X/Y/Z extents and ranges, solid volume, geometric volume centroid and edge count when available. Extents are axis aligned in the saved assembly coordinates; they are not a local oriented bounding box or manufacturing dimensions. Missing metrics remain unavailable.
The measurement selector includes Point → point, Edge → edge, Point → edge, Body center → center and Minimum part gap. In exact 3D, hover highlights selectable CAD edges; click two edges, or choose references and their one-based Edge A/B numbers in the sidebar. Two different edges of the same body are supported. For point-to-edge, click the first surface point, then click an edge or enter Part B / Edge B. For body centers, click two bodies or choose their references. Curved-edge distances use the CAD kernel and show the shortest witness line. Body centers are geometric volume centroids using uniform volume weighting, without density or mass properties. Minimum part gap remains a separate whole-surface query.
Picked surface points come from the display tessellation; their approximation is stated in the readout. Sampled CAD curves support highlighting/picking only, while exact edge indices resolve against immutable BREP copies. Display sampling is bounded; edges without display samples remain listed by number for manual queries. Older reports without feature inspection require a new native Run. Portable reports preserve and display saved feature rulers, but cannot create arbitrary new exact edge measurements without the native CAD cache.
After Run, choose Minimum part gap and click two different parts, or type their references in Part A / Part B and choose Measure. Exact 3D mode computes the shortest surface distance using the already transformed solid geometry; it does not re-export either PCB. The ruler joins the two closest witness points, and the readout includes distance, evidence and ΔX/ΔY/ΔZ in millimetres. A zero gap means touching or overlapping geometry; positive intersection volume is reported separately when available. Missing models or failed geometry queries remain unavailable.
Choose Point → point to click any two visible surface locations, including two points on one part. This measures the straight-line distance between the picked tessellated points; it is not a minimum part clearance. Green rulers persist until Clear, while the orange hover ruler shows the nearest eligible part found by the analysis. Hover information describes the saved analysis snapshot. Live part queries reject changed boards, models or enclosure files and request a new Run.
Fit restores the full assembly; Focus contact in Display centers a finding. Top, Bottom and Side use orthographic projection with a millimetre scale; 3D view restores perspective, whose scale is marked “at view center.” Selected/hovered reference labels can be toggled in Display. Isolate selected parts is optional. Rulers appear through surfaces so their witness positions remain visible; use cutaway or a section view to inspect the geometry around them.
Quick 2D shows the saved Edge.Cuts outline, including cutouts and sampled curves, as unfilled contour lines. It measures same-side axis-aligned footprint envelopes, not actual part surfaces. Invalid or missing outlines are reported as unavailable instead of inventing a rectangle. Exact 3D retains its STEP substrate and solid models.
Exported HTML/JSON preserves measured pairs and point rulers. The offline viewer can display saved pair distances and create new point rulers; an arbitrary uncached part pair requires a new native run. “Nearest known measured pair” in an older report is distinct from a proven nearest part. Imported reports do not retain the private live geometry cache.
On Rules → Global board limits, set Max top height and Max bottom height in millimetres. Heights are measured outward from the corresponding PCB face: top max(0, zmax − board thickness), bottom max(0, −zmin). Every primary component solid is checked on both sides, including through-hole tails and other opposite-side protrusions. Different sides have separate findings. The limits include model placement/standoff; a zero height limit permits no protrusion. Missing models remain unchecked coverage, and Quick 2D cannot establish height.
Violating parts appear red with an excess label such as J1 top +0.8 mm. Select the finding or hover/click the part to inspect the height, maximum and excess. Height markers show the CAD envelope beyond the threshold; curved geometry can have conservative bounds, and these markers are not closest-surface witnesses. Labels avoid overlap and are bounded on dense boards; every violation remains in the findings table, and selected/hovered parts get label priority. Display can hide Violation / proximity markers. Waived findings retain their recorded measurements but do not mark parts as active violations.
Proximity warning sets an optional soft gap threshold; 0 disables it. Exact 3D warns for component-to-component surface gaps below that threshold while preserving collision and hard-clearance findings. Quick 2D uses same-side footprint-envelope gaps and explicitly retains its conservative evidence. Warning parts appear amber; select a proximity finding for its measured witness line or hover for the gap and warning threshold. Comparison-board and enclosure checks keep their existing clearance rules. Settings and exports preserve the threshold as proximity_warning_mm.
The collision broad phase adapts its sweep axis to the assembly. Nearest-part search uses a bounds tree and cached surface distances; full collision screening still examines every potentially colliding pair. Native and offline picking use triangle indices, and viewers reuse GPU buffers. These optimizations preserve exact geometry checks rather than substituting bounding-box gaps for solid distances.
An 80-solid FreeCAD fixture produced the same nearest distances as an all-pairs reference, using 64 exact queries instead of 3,160 on the spaced arrangement. This is a nearest-search benchmark, not a whole-board runtime guarantee; dense collision analysis and expensive imported geometry can still take longer. See inspection validation for analytical, native and package checks.
Use the common report workflow to save HTML as PDF, or render this tool's saved JSON as readable HTML/PDF tables. The direct PDF exporter retains text, tables and embedded PNG/JPEG figures; interactive-only views are listed explicitly and remain available in HTML. Install the optional reports extra only in the interpreter performing PDF export.


