WC

wyuebei-cloud/detail-to-lsp

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

4 stars 품질 59 트렌드 19NOASSERTION

Rebuild a CAD detail from a PDF or screenshot as a generated AutoLISP script, gated by a LISP simulator before delivery.

개요

Rebuild an engineering/CAD detail shown in a PDF sheet or a screenshot as a single AutoLISP file that draws it 1:1 in model space - geometry, text, leaders, symbols and real DIMENSION objects on separate layers. The skill is meant to be executed by an AI coding agent: one Python model per detail, a fixed pre-verified LISP runtime, and numeric gates that must pass before anything is delivered. - Python 3.9 or newer. - pip install -r requirements.txt for intake and the overlay. The generation and verification chain itself (detail_model.py, emit_lsp.py, check_lsp.py, lisp_sim.py) is standard library only. - AutoCAD or Civil 3D . The generated runtime drives dimension styles and DIMENSION objects through ActiveX, which is Windows only. AutoCAD LT 2024 or newer is expected to work (LT 2024 added AutoLISP and supports most VLA/VLAX functions) but has not been tested. AutoCAD for Mac is not supported. - An agent with capability.

README

원문 README의 일부입니다. 원문 보기.

detail-to-lsp

Rebuild an engineering/CAD detail shown in a PDF sheet or a screenshot as a single AutoLISP file that draws it 1:1 in model space - geometry, text, leaders, symbols and real DIMENSION objects on separate layers.

The skill is meant to be executed by an AI coding agent: one Python model per detail, a fixed pre-verified LISP runtime, and numeric gates that must pass before anything is delivered.

source --probe--> extract/measure --calibrate--> model.py (Detail API)
   --> emit .lsp + report --> check_lsp (parens, lint, simulation) --> overlay + coverage
   --> fix model.py --> repeat --> deliver

Requirements

  • Python 3.9 or newer.
  • pip install -r requirements.txt for intake and the overlay. The generation and verification chain itself (detail_model.py, emit_lsp.py, check_lsp.py, lisp_sim.py) is standard library only.
  • AutoCAD or Civil 3D on Windows. The generated runtime drives dimension styles and DIMENSION objects through ActiveX, which is Windows only. AutoCAD LT 2024 or newer is expected to work (LT 2024 added AutoLISP and supports most VLA/VLAX functions) but has not been tested. AutoCAD for Mac is not supported.
  • An agent with vision capability. Phase 0 locates the detail in a rendered page, Phase 4 accepts the overlay by eye, and text drawn as glyph outlines or on a scanned sheet can only be read from the image. Coordinates never come from looking - they come from raster_measure.py and calibrate.py.

Quick start

pip install -r requirements.txt
python scripts/probe.py sheet.pdf --render page.png      # VECTOR / RASTER / MIXED
python tests/run_tests.py                                # both reference cases

SKILL.md is the operating procedure. references/ holds the model API and the vector and raster playbooks; references/autocad_notes.md lists what the generated file does and what cannot be verified outside AutoCAD.

How it works

  • One model.py per detail is the only place a coordinate exists. It records every key value with provenance (dim, derived, vector, measured, standard, assumed) and every dimension gets the source text it must reproduce (expect=).
  • emit_lsp.py writes a self-contained .lsp: identical runtime + one record list + one c: command. Pure ASCII, CRLF, real-valued group codes.
  • check_lsp.py is the delivery gate. It balances parentheses, lints, then executes the whole file in lisp_sim.py (an AutoLISP subset against an AutoCAD stub). Every entmake is validated against DXF group-code rules, so unknown functions, arity errors, missing text styles or linetypes and bad setvar calls fail before delivery. For files built on the runtime, the simulated run must also close at
GitHub에서 전체 README 보기

추천 도구

다른 키워드를 입력하거나 필터를 제거해 보세요.

설치

npx skillfish add wyuebei-cloud/detail-to-lsp
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →