blender-motion-state-inspection
AFaffaan-m/ECC315k近 7 天新增 4,381 个 star
Convert raster drawing references—including screenshots, scans, photos, sketches, exported PNG/JPG files, and photographed plans—into structured, editable AutoCAD DWG/DXF drawings with explicit evidence tracking, input preflight, specification validation, output inspection, and visual comparison. Use for dimension-driven redraws, hybrid reconstruction, visual tracing, or geometry-only redraws when the source is an image rather than a trustworthy source DWG.
Reconstruct an image as an auditable CAD drawing. Treat the image as evidence, not as ground truth. If a trustworthy source DWG exists, use autocad-dwg-redraw instead.
known, scaled, inferred, or unreadable.needs_review or blocked.strict-dimensioned: engineering deliverable; requires readable units and enough known or calibrated anchors to constrain the geometry.general: balanced default for plans, sketches, screenshots, and mixed-quality references.hybrid: use dimensions where available and calibrated proportions elsewhere; label inferred geometry.visual-trace: reproduce visible linework without asserting real-world scale.geometry-only: retain object geometry and useful construction layers; omit dimensions, leaders, notes, and table text.If the source lacks a unit or scale anchor, choose visual-trace or use unitless. Do not default to millimeters merely because the drawing looks technical.
Use Windows with AutoCAD and pywin32 for DWG generation/inspection. Preflight and comparison require Pillow, NumPy, and OpenCV; DXF preview requires ezdxf and PyMuPDF:
python -m pip install pywin32 pillow numpy opencv-python ezdxf pymupdf
Copy the source into the project, compute a hash, and inspect readability before interpreting it:
python scripts\preflight_image_redraw.py --image input.jpg --mode general --output reports\input-preflight.json
Review rotation, crop, resolution, contrast, blur, perspective, occlusion, visible units, and available scale anchors. A quality warning is not automatically a blocker; it becomes a blocker when the selected profile requires evidence the image cannot provide.
Use references/image-redraw-spec.md. Create stable entity IDs, identify each view, record calibration anchors and evidence, and encode constraints rather than relying on raw pixel coordinates.
Keep source and CAD coordinate systems separate:
python scripts\validate_image_redraw_spec.py --spec redraw-spec.json --profile general --report reports\spec-validation.json
Resolve errors, impossible geometry, duplicate IDs, missing required fields, invalid units, and constraint failures. In strict-dimensioned, missing units or calibration evidence must block drawing.
python scripts\draw_image_spec.py --spec redraw-spec.json --output outputs\redraw.dwg
For Chinese text:
python scripts\draw_image_spec.py --spec redraw-spec.json --output outputs\redraw.dwg --text-style CN_TEXT --text-font "C:\Windows\Fonts\simhei.ttf"
For geometry-only output:
python scripts\draw_image_spec.py --spec redraw-spec.json --output outputs\redraw-geometry.dwg --geometry-only
When multiple AutoCAD instances or the Start page confuse COM, use --attach-document with a readable DWG. Use --dry-run before connecting to AutoCAD.
For rough, open-source visual tracing without AutoCAD, use image_to_dxf_open_source.py. For vector PDFs, use pdf_vector_to_dxf.py before raster tracing. Neither path converts uncertain pixels into authoritative dimensions.
python scripts\inspect_dwg_output.py --dwg outputs\redraw.dwg --report reports\dwg-inspection.json
Verify the file opens, ModelSpace is nonempty, units match the spec, expected layers and entity classes exist, and forbidden annotation classes are absent in geometry-only mode. Export an auditable DXF from AutoCAD, then audit and render it:
python scripts\render_dxf_preview.py --dxf outputs\redraw.dxf --png reports\cad-preview.png --pdf reports\cad-preview.pdf
Create an anchors JSON containing corresponding source-image and CAD-preview points, then run:
python scripts\compare_redraw.py --source input.jpg --cad-preview reports\cad-preview.png --anchors anchors.json --output-dir reports\comparison
Inspect the side-by-side image, registered overlay, difference view, edge coverage, and edge-distance statistics. Use the comparison to find omitted walls, shifted holes, incorrect arcs, text collisions, and view-layout errors. Do not use it to validate physical dimensions.
Fix the highest-impact failure, regenerate, and rerun validation. Finish with one status:
pass: selected profile and all required checks passed;pass_with_warnings: deliverable is usable with documented noncritical uncertainty;needs_review: a human decision is required, usually due to conflicting or inferred evidence;blocked: required source evidence is missing;fail: output is corrupt or violates a mandatory check.Deliver as applicable:
references/image-redraw-spec.md: generalized spec, evidence, views, calibration, constraints, and entities.references/image-redraw-validation.md: acceptance policies, checks, metrics, statuses, and report contract.scripts/preflight_image_redraw.py: source-image quality and evidence gate.scripts/validate_image_redraw_spec.py: semantic and constraint validation.scripts/draw_image_spec.py: JSON-to-DWG AutoCAD renderer.scripts/inspect_dwg_output.py: read-only DWG structure inspection through AutoCAD COM.scripts/render_dxf_preview.py: DXF audit and deterministic fixed-page preview.scripts/compare_redraw.py: registered visual comparison and edge metrics.scripts/image_to_dxf_open_source.py: rough raster-to-DXF baseline.scripts/pdf_vector_to_dxf.py: vector-PDF extraction path.AFaffaan-m/ECC315k近 7 天新增 4,381 个 star
ANanthropics/skills203k近 7 天新增 3,265 个 star
HAharry0703/MoneyPrinterTurbo147k近 7 天新增 1,608 个 star
SHShubhamsaboo/awesome-llm-apps147k近 7 天新增 907 个 star
GAgarrytan/gstack143k近 7 天新增 598 个 star