CAD Compare

v0.2.1
com.cad-compare/cad-compare Checked 12 hours ago Published 25 days ago

Compare STEP CAD files locally: identical, moved, or different, and what changed.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

describe

Version and capabilities of this CAD comparison server. Call it once if you need to know which file types are supported.

compare

Compare two STEP part files (single parts, not assemblies) and say whether they are the same part. Use it when the user asks whether two CAD files differ, what changed between two versions of a part, or whether a part was only moved or mirrored. The files are read locally and never uploaded. Returns verdict (same / moved / different) and, when different, the changed features with sizes, e.g. {type: "through_hole", change: "modified", attr: "diameter", from: 6, to: 6.5, location: [150, 90, 10]}. Typical time: under a second for simple parts, 5–15 s for parts with several hundred faces. Multi-…

ParameterTypeDescription
a *stringAbsolute path to the first part file (A, usually the older version) (.step or .stp) on this computer. For a file the user attached to the chat, pass the path you have; if it is not on this computer, t…
b *stringAbsolute path to the second part file (B) (.step or .stp) on this computer. For a file the user attached to the chat, pass the path you have; if it is not on this computer, the file with the same name…
config_astringUnused (cadver compatibility)
config_bstringUnused (cadver compatibility)

fingerprint

Geometric fingerprint of one STEP part, independent of position and orientation (volume, area, principal sizes, face types). Use it to recognise the same part under different file names or to sort many files before comparing pairs; two parts with clearly different fingerprints are different, similar fingerprints still need compare.

ParameterTypeDescription
path *stringAbsolute path to a part file (.step or .stp) on this computer. For a file the user attached to the chat, pass the path you have; if it is not on this computer, the file with the same name in the user'…
configstringUnused (cadver compatibility)

compare_assembly

Compare two versions of a STEP assembly: which parts were added, removed, renamed or replaced, which parts changed shape (with the changed features, as in compare), quantity changes, and which parts or subassemblies moved or changed parent. Use it when the files are assemblies (compare reports them as unsupported) or the user asks what changed in a product structure. Also works when one side is a single part. Files are read locally and never uploaded. Typical time: a few seconds for tens of parts, up to a minute for hundreds. If warnings contains not_all_parts_compared, say so and offer to rer…

ParameterTypeDescription
a *stringAbsolute path to the first assembly file (A, usually the older version) (.step or .stp) on this computer. For a file the user attached to the chat, pass the path you have; if it is not on this compute…
b *stringAbsolute path to the second assembly file (B) (.step or .stp) on this computer. For a file the user attached to the chat, pass the path you have; if it is not on this computer, the file with the same…
max_detailed_partsintegerHow many changed-looking parts to compare geometrically (default 40; each takes about 0.1–5 s)

find_duplicates

Find STEP part files in a folder that are the same part: identical copies, re-exports, or the same part moved or rotated, whatever the file names. Also reports left/right (mirror-image) pairs. Use it to clean up a messy project folder, find which supplier file matches which drawing, or avoid making the same part twice. Files are read locally and never uploaded. Only files whose fingerprints match are compared in full, so large folders are feasible; typical time is 0.1–1 s per file plus 0.3–5 s per comparison. Assemblies are skipped (listed in skipped). Requires CAD Compare Pro (see describ…

ParameterTypeDescription
folder *stringAbsolute path to a folder on this computer
max_filesintegerCheck at most this many files (default 200), in name order
recursivebooleanInclude subfolders (default true)

export_report

Write a comparison report of two STEP files (parts or assemblies) as a self-contained HTML file that can be printed to PDF: verdict, the list of differences in plain language, key figures, and for assemblies the changed, added, removed and moved parts. By default it also contains an interactive 3D view (rotate, zoom, measure; click a difference in the list to show it), which works offline in any browser. Use it when the user wants something to keep, send to a colleague or supplier, or attach to a change request, or wants to see the change in 3D. It writes one file on this computer and never ov…

ParameterTypeDescription
a *stringAbsolute path to the first file (A, usually the older version), a part or an assembly (.step or .stp) on this computer. For a file the user attached to the chat, pass the path you have; if it is not o…
b *stringAbsolute path to the second file (B) (.step or .stp) on this computer. For a file the user attached to the chat, pass the path you have; if it is not on this computer, the file with the same name in t…
languagestringReport language: en, de or zh (Chinese); default en. Use the user's language
max_detailed_partsintegerFor assemblies, as in compare_assembly (default 40)
outputstringAbsolute path for the report, ending in .html (default: next to B, named <A>_vs_<B>.html)
overwritebooleanReplace an existing file at output (default false; ask the user first)
view_3dbooleanInclude the interactive 3D view (default true; makes the file a few MB). Set false for a small, print-only report

render_diff

Picture of where two STEP parts differ, as PNG images you can look at: an overview and, when there are differences, a close-up. Coloured as in the CAD Compare viewer: faces identical in both grey, differing faces of A red, of B green, and numbered markers whose meaning is in legend (the same differences compare lists). For parts that were only moved or mirrored, B is shown with A's outline on top. Use it when the user wants to see the change, or to check a result visually. Rendered locally without a GPU; files are never uploaded. Requires CAD Compare Pro (see describe → license).

ParameterTypeDescription
a *stringAbsolute path to the first part file (A, usually the older version) (.step or .stp) on this computer. For a file the user attached to the chat, pass the path you have; if it is not on this computer, t…
b *stringAbsolute path to the second part file (B) (.step or .stp) on this computer. For a file the user attached to the chat, pass the path you have; if it is not on this computer, the file with the same name…
heightintegerImage height in pixels (default 600)
output_dirstringAlso save the PNGs into this existing folder (absolute path)
viewstringViewing direction (default iso: from front-right, above)
widthintegerImage width in pixels (default 800)