OpenClaw PDF to CAD
This is an OpenClaw Agent Skill. It is not a subagent, not a web platform, not
a quoting system, and not a 3D/SolidWorks converter. It is a callable local
skill that OpenClaw/Jarvis can invoke when a PDF engineering drawing is
provided and a CAD-oriented delivery package is requested.
Role
Act as an automation assistant for PDF engineering drawing conversion. Produce
a CAD candidate package and clearly report review risk. Do not replace a
human engineer's final judgment.
Inputs
Supported baseline input:
.pdf engineering drawings, with best results on vector PDFs.
Risky or review-required input:
- scanned PDFs
- image-based PDFs
- mixed vector/raster PDFs
- blurry drawings
- drawings with missing, cropped, or unreadable dimensions
- PDF pages containing embedded JPG/PNG drawing images
Unsupported input for this skill:
.jpg, .jpeg, .png as standalone source files
- STEP, IGES, STL, SLDPRT, SLDASM, SolidWorks, assemblies
- 3D-to-2D drawing generation
If a user asks for JPG/PNG/scanned drawing conversion, explain that this skill
prioritizes PDF engineering drawings. Scanned or raster content can only be
handled as a review-required candidate when present in a PDF workflow.
Processing Contract
- Treat OpenClaw as the primary runtime for this skill.
- Verify that the source file is a PDF before running the script.
- Run the bundled script from this skill folder.
- Extract vector geometry and text where available.
- Use OCR only as fallback for scanned/image text and report OCR usage.
- Preserve Chinese/CJK text as Unicode where possible.
- Preserve text baseline/origin, font size, rotation, and width factor when available.
- Never invent dimensions, tolerances, materials, annotations, title-block values, or scale values.
- Never present uncertain OCR text, garbled text, or placeholder text as final engineering truth.
- Never send a raw DXF alone when the delivery folder exists.
- Return the delivery folder, zip path, recommended CAD file, preview PDF, and quality status.
Required needs_review Conditions
Set or preserve needs_review when any of the following are true:
- The PDF is scanned, image-based, mixed, blurry, low-confidence, or raster-heavy.
- The drawing contains embedded JPG/PNG content that affects geometry or text.
- OCR fallback was used for text that may affect dimensions, annotations, title blocks, or process notes.
- Extracted text contains
??, replacement glyphs, missing characters, or other garbled markers.
- Dimensions, scale, tolerances, hole notes, bend notes, material notes, or title-block fields are missing or uncertain.
- DWG was generated but Unicode/CJK text fidelity has not been opened and verified in CAD software.
- The output is intended for quotation, production, cutting, machining, bending, or manufacturing review.
When needs_review is true, say the output is a CAD candidate requiring manual
review, not a final production drawing.
Command
./scripts/run_pdf_to_cad.sh /absolute/path/to/drawing.pdf --output-dir /absolute/path/to/outputs
Optional fields:
./scripts/run_pdf_to_cad.sh /absolute/path/to/drawing.pdf \
--output-dir /absolute/path/to/outputs \
--customer-name "Customer" \
--project-name "Project" \
--label "delivery-name"
Output Package
Baseline delivery package:
<label>_cad_delivery/
├── <source>.dxf
├── <source>.dwg # optional, only if converter is configured
├── preview.png
├── preview.pdf
├── quality_report.json
└── README.md
<label>_cad_delivery.zip
The package may be mapped into Lite, Pro, Plus/Studio, or Enterprise offerings
outside this public skill. This repository does not implement billing,
licensing, customer portals, private training, or enterprise API services.
Output Interpretation
The script prints JSON. Use these fields in the agent response:
status: ok, needs_review, or error
delivery_dir: folder containing all deliverables
zip_path: zipped delivery package
recommended_cad_file: prefer DWG only if present and safe to recommend, otherwise DXF
dxf_path: baseline DXF path
dwg_path: optional DWG path when conversion is configured
preview_png: visual preview image
preview_pdf: human-readable preview
quality_report: detailed machine-readable report
source_type: vector, scanned, mixed, or unknown/low-confidence
cjk_text_count: number of preserved Chinese/CJK text entities
garbled_text_count: number of unresolved text entities that extracted as question marks or replacement glyphs
ocr_text_count: number of text entities recovered by OCR fallback
findings: limitations and review notes
When dwg_path exists but recommended_cad_file remains DXF, tell the user
that the DWG was generated but Unicode/CJK fidelity needs manual CAD
verification before customer delivery.
When OCR text is present, tell the user the text was recovered from image/OCR
and should be checked against the original PDF before quotation, production, or
manufacturing use.
Handoff Message Template
PDF-to-CAD conversion finished.
Recommended CAD file: <recommended_cad_file>
Delivery ZIP: <zip_path>
Preview PDF: <preview_pdf>
Quality status: <status>
Review required: <yes/no>
Review notes: <findings or none>
If status is needs_review, include:
This is an automatically generated CAD candidate. Please manually verify geometry,
dimensions, annotations, material notes, and title-block information before using
it for quotation, production, cutting, machining, or manufacturing.
1---2name: openclaw-pdf-to-cad3description: OpenClaw Agent Skill for converting PDF engineering drawings into CAD-oriented delivery packages. Use this skill when an OpenClaw user provides a PDF engineering drawing and wants DXF/CAD output, preview files, a delivery package, and a quality report. Do not use it for JPG/PNG-only conversion promises, STEP, IGES, STL, SLDPRT, SLDASM, SolidWorks, assemblies, or other 3D model conversion tasks.4---56# OpenClaw PDF to CAD78This is an OpenClaw Agent Skill. It is not a subagent, not a web platform, not9a quoting system, and not a 3D/SolidWorks converter. It is a callable local10skill that OpenClaw/Jarvis can invoke when a PDF engineering drawing is11provided and a CAD-oriented delivery package is requested.1213## Role1415Act as an automation assistant for PDF engineering drawing conversion. Produce16a CAD candidate package and clearly report review risk. Do not replace a17human engineer's final judgment.1819## Inputs2021Supported baseline input:2223- `.pdf` engineering drawings, with best results on vector PDFs.2425Risky or review-required input:2627- scanned PDFs28- image-based PDFs29- mixed vector/raster PDFs30- blurry drawings31- drawings with missing, cropped, or unreadable dimensions32- PDF pages containing embedded JPG/PNG drawing images3334Unsupported input for this skill:3536- `.jpg`, `.jpeg`, `.png` as standalone source files37- STEP, IGES, STL, SLDPRT, SLDASM, SolidWorks, assemblies38- 3D-to-2D drawing generation3940If a user asks for JPG/PNG/scanned drawing conversion, explain that this skill41prioritizes PDF engineering drawings. Scanned or raster content can only be42handled as a review-required candidate when present in a PDF workflow.4344## Processing Contract45461. Treat OpenClaw as the primary runtime for this skill.472. Verify that the source file is a PDF before running the script.483. Run the bundled script from this skill folder.494. Extract vector geometry and text where available.505. Use OCR only as fallback for scanned/image text and report OCR usage.516. Preserve Chinese/CJK text as Unicode where possible.527. Preserve text baseline/origin, font size, rotation, and width factor when available.538. Never invent dimensions, tolerances, materials, annotations, title-block values, or scale values.549. Never present uncertain OCR text, garbled text, or placeholder text as final engineering truth.5510. Never send a raw DXF alone when the delivery folder exists.5611. Return the delivery folder, zip path, recommended CAD file, preview PDF, and quality status.5758## Required needs_review Conditions5960Set or preserve `needs_review` when any of the following are true:6162- The PDF is scanned, image-based, mixed, blurry, low-confidence, or raster-heavy.63- The drawing contains embedded JPG/PNG content that affects geometry or text.64- OCR fallback was used for text that may affect dimensions, annotations, title blocks, or process notes.65- Extracted text contains `??`, replacement glyphs, missing characters, or other garbled markers.66- Dimensions, scale, tolerances, hole notes, bend notes, material notes, or title-block fields are missing or uncertain.67- DWG was generated but Unicode/CJK text fidelity has not been opened and verified in CAD software.68- The output is intended for quotation, production, cutting, machining, bending, or manufacturing review.6970When `needs_review` is true, say the output is a CAD candidate requiring manual71review, not a final production drawing.7273## Command7475```bash76./scripts/run_pdf_to_cad.sh /absolute/path/to/drawing.pdf --output-dir /absolute/path/to/outputs77```7879Optional fields:8081```bash82./scripts/run_pdf_to_cad.sh /absolute/path/to/drawing.pdf \83 --output-dir /absolute/path/to/outputs \84 --customer-name "Customer" \85 --project-name "Project" \86 --label "delivery-name"87```8889## Output Package9091Baseline delivery package:9293```text94<label>_cad_delivery/95├── <source>.dxf96├── <source>.dwg # optional, only if converter is configured97├── preview.png98├── preview.pdf99├── quality_report.json100└── README.md101<label>_cad_delivery.zip102```103104The package may be mapped into Lite, Pro, Plus/Studio, or Enterprise offerings105outside this public skill. This repository does not implement billing,106licensing, customer portals, private training, or enterprise API services.107108## Output Interpretation109110The script prints JSON. Use these fields in the agent response:111112- `status`: `ok`, `needs_review`, or `error`113- `delivery_dir`: folder containing all deliverables114- `zip_path`: zipped delivery package115- `recommended_cad_file`: prefer DWG only if present and safe to recommend, otherwise DXF116- `dxf_path`: baseline DXF path117- `dwg_path`: optional DWG path when conversion is configured118- `preview_png`: visual preview image119- `preview_pdf`: human-readable preview120- `quality_report`: detailed machine-readable report121- `source_type`: vector, scanned, mixed, or unknown/low-confidence122- `cjk_text_count`: number of preserved Chinese/CJK text entities123- `garbled_text_count`: number of unresolved text entities that extracted as question marks or replacement glyphs124- `ocr_text_count`: number of text entities recovered by OCR fallback125- `findings`: limitations and review notes126127When `dwg_path` exists but `recommended_cad_file` remains DXF, tell the user128that the DWG was generated but Unicode/CJK fidelity needs manual CAD129verification before customer delivery.130131When OCR text is present, tell the user the text was recovered from image/OCR132and should be checked against the original PDF before quotation, production, or133manufacturing use.134135## Handoff Message Template136137```text138PDF-to-CAD conversion finished.139Recommended CAD file: <recommended_cad_file>140Delivery ZIP: <zip_path>141Preview PDF: <preview_pdf>142Quality status: <status>143Review required: <yes/no>144Review notes: <findings or none>145```146147If status is `needs_review`, include:148149```text150This is an automatically generated CAD candidate. Please manually verify geometry,151dimensions, annotations, material notes, and title-block information before using152it for quotation, production, cutting, machining, or manufacturing.153```