capwitf/mechanical-cad-skills/cad-region-compare

Claude Code and agent skill by capwitf/mechanical-cad-skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when a CAD drawing, SolidWorks drawing, FreeCAD output, DXF/DWG/PDF export, screenshot, scan, render, or mechanical reference image needs local crop/region comparison against a generated output before claiming visual similarity, reference matching, layout matching, linework matching, or drawing replication quality.

Install

npx vskill@latest install capwitf/mechanical-cad-skills/cad-region-compare

SKILL.md

CAD Region Compare

Overview

Compare the same local region from a reference and a current output. Use this to gather evidence for "matches the reference" claims beyond a whole-page preview.

Core Rule

Region metrics are evidence, not judgement. A high similarity score does not prove dimensions, tolerances, layers, or engineering correctness. A low score is a prompt to inspect the source drawing and classify the mismatch.

Use scripts/compare_regions.py to compare PDF/image crops. The script is read-only and outputs JSON with crop paths and metrics.

Script Usage

powershell
python .\.codex\skills\cad-region-compare\scripts\compare_regions.py `
--reference .\reference.pdf `
--candidate .\output.pdf `
--ref-page 0 `
--candidate-page 0 `
--crop 0.10,0.20,0.35,0.30 `
--output-dir .\deliverables\region-checks `
--label shaft-end

--crop accepts x,y,w,h. Values from 0 to 1 are treated as normalized fractions of the rendered page/image. Values above 1 are treated as pixels. Use separate --ref-crop and --candidate-crop when the matching regions are at different locations.

Metrics

The JSON report includes:

  • crop dimensions,
  • mean absolute error,
  • root mean square error,
  • normalized_similarity,
  • edge density for reference and candidate,
  • edge difference,
  • optional saved crop images and difference image.

Use metrics to prioritize manual review. Do not set a universal pass threshold across all CAD drawings because hatch density, text, scale, anti-aliasing, and scan quality vary.

Region Checklist

Compare high-risk regions:

  • main outline and proportions,
  • holes, shafts, shoulders, ribs, bosses, flanges, slots, ports, grooves, chamfers, fillets, threads,
  • section cuts and hatch behavior,
  • dimension chains, leaders, text, tolerances, surface symbols,
  • title block, BOM, notes, and scale fields,
  • any user-complained region.

Handoff

Use with:

  • cad-reference-match when the task requires reference similarity.
  • jixie-fuke for detailed mechanical replication rules.
  • cad-artifact-inspection before comparing generated PDF/image artifacts.
  • cad-evidence-ledger to record crop reports and saved crop images.
  • cad-final-verification before claiming a reference-matched deliverable is ready.

Common Mistakes

  • Comparing only full sheets and missing local geometry errors.
  • Comparing different regions or different scales without saying so.
  • Treating image similarity as proof of dimensions.
  • Ignoring a low-score crop because the whole sheet looks close.
  • Fixing only a screenshot instead of the CAD source.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/capwitf/mechanical-cad-skills/cad-region-compare/badge)](https://verified-skill.com/skills/capwitf/mechanical-cad-skills/cad-region-compare)

Something wrong with this skill or its page? Tell us.