psd2live
레이어가 있는 PSD를 편집 가능한 Live2D 모델로 변환
Illustrator를 열지 않고도 Rhino에서 내보낸 색상 구분 벡터 도면에 건축 선두께 계층을 순식간에 적용
Apply architectural line-weight hierarchy to color-coded vector drawings (Rhino-exported .ai/.pdf) in seconds, without opening Illustrator.
디자인Python · SvelteGitHub @zohartito온라인운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기메이커가 쓴 소개는 위의 한 줄이 전부입니다. 더 자세한 내용은 저장소 README에서 읽을 수 있습니다. 저장소 README ↗
README 전체를 불러오는 중입니다.
README 전문 보기 ↗Apply architectural line-weight hierarchy, optional solid-black poché, and
material hatching to Rhino-exported .ai or .pdf drawings.
If you've ever exported a section, plan, or elevation from Rhino and watched all 340,000 strokes come out at a uniform 1.0 pt — and then tried to fix it inside Illustrator only to have ExtendScript hang for hours — this is for you.
.ai/.pdf drawings and reports stroke-color counts.apply-jsx or apply-saas; the fast legacy
apply command rewrites the PDF stream and can flatten Illustrator layers.section, plan, elevation, detail, and
studio workflows.$ arch-lw apply examples/sample-linework.pdf --auto --preset section
# 12 colors mapped using auto:section
applied 8,420 strokes across 12 color changes
wrote examples/sample-linework HIERARCHY.pdf
Runtime depends on drawing size, file format, and whether Illustrator-backed layer-preserving commands are used. Examples are workflow orientation only and are not public proof clearance.
Current source install:
git clone https://github.com/zohartito/arch-line-weights
cd arch-line-weights
python -m venv .venv
.venv/bin/python -m pip install -e ".[test]"
.venv/bin/arch-lw --help
The [test] extra pulls in PyYAML, which the test/proof suite needs; without
it the 15 proof tests fail with "PyYAML is required".
Optional global install if pipx is available:
pipx install git+https://github.com/zohartito/arch-line-weights
This installs the arch-lw CLI.
Do not assume arch-lw, uv, or uvx are globally on PATH in a fresh
studio shell; use .venv/bin/arch-lw from a source checkout or install with
pipx.
To wire up the Claude Code skill:
ln -s "$(pwd)/skills/apply-arch-hierarchy" ~/.claude/skills/apply-arch-hierarchy
After the symlink, ask Claude Code to "apply line weights to my section" and the skill will fire.
Always look at the color distribution before applying. Most Rhino-export files have ~10–50 unique stroke colors, one per Rhino layer:
arch-lw inspect drawing.ai > inspect.json
The JSON contains every stroke RGB and how many strokes use it. The dominant colors (highest counts) are almost always material hatch / texture — they should land in the lightest tier.
If a Rhino Make2D export opens off the Illustrator artboard, normalize the layout before running hierarchy or poché. In Rhino, first select the Make2D curves and run:
_-RunPythonScript "/path/to/integrations/rhino/export_selected_make2d_manifest.py"
That writes an .ai / .pdf export plus a .manifest.json sidecar. Then run:
arch-lw layout-jsx rhino-make2d.ai \
--artboard 24x36in \
--fit fit \
--margin 0.5in \
--report-json layout-report.json
This opens the export in Illustrator, sets the requested artboard size, centers
or fits visible unlocked artwork, saves <src> LAYOUT-jsx.ai, and writes a
layout report. Use --dry-run --jsx-path layout.jsx to inspect the generated
script without contacting Illustrator or writing output artwork.
For a single report that chains layout with optional hierarchy and poché:
arch-lw bridge-rhino-ai \
--input rhino-make2d.ai \
--artboard 24x36in \
--fit fit \
--margin 0.5in \
--preset studio \
--source rhino \
--for-print \
--apply-jsx \
--poche \
--report-dir proof
Layout success is not launch proof. The proof gate still depends on the verification reports and visual QA acceptance.
| Mode | Speed | Layers | Use when |
|---|---|---|---|
apply-jsx (default for .ai) | 3–15 min on 340K paths | preserves the original Rhino layers as Illustrator layers | You'll keep editing the file in Illustrator (almost always the right choice for studio work). |
apply | ~2 min on 340K paths | flattens to 1 layer (PieceInfo gets stripped) | You only need a final render and don't care about layer structure. |
# Layer-preserving (recommended for Rhino-export .ai files):
arch-lw apply-jsx drawing.ai
# pikepdf-fast (loses layer structure):
arch-lw apply drawing.ai --auto --preset studio
Day-1 layer-preserving dogfood path:
.venv/bin/arch-lw inspect drawing.ai
.venv/bin/arch-lw apply-saas drawing.ai \
--architectural --poche --preset studio --source rhino
Use basic apply for fast stroke-weight output. Use apply-saas --architectural --poche when Cursor 1 needs layer-preserving hierarchy plus
conservative black poché for Illustrator/Acrobat inspection.
Input caveats for that path:
apply-saas --poche requires a native Illustrator .ai with /NumBlock.[Converted] .ai files use apply-jsx, then arch-lw poche
on the HIERARCHY-jsx output..ai exports may need Illustrator File > Save As /
re-save before v1 can process them.Supported input matrix:
| Input kind | Recommended commands | Notes |
|---|---|---|
Native Illustrator .ai with /NumBlock | inspect, apply-saas, apply-saas --poche | Best headless, layer-preserving path. |
PDF-only or [Converted] .ai | inspect, apply-jsx, then poche | Use the Illustrator bridge when layers must be preserved. |
Plain .pdf | inspect, apply | Fast PDF-stream rewrite; no Illustrator layer editing claim. |
Reference/report/image-only .pdf | inspect diagnostic only | Not a line-weight output path; export a vector drawing sheet instead. |
Legacy Rhino PostScript .ai | Illustrator Save As first | Convert to modern/PDF-compatible .ai, then re-run inspect. |
Commands now preflight the input shape and return a diagnostic with the
detected kind, supported command map, and recommended next step when the wrong
file shape is used. If a PDF has no vector drawing marks or rewriteable strokes,
apply stops before writing a no-op output.
Use cleanup when a Make2D/Illustrator export has too little layer hierarchy
to classify by layer name, such as a single stair or axon layer:
arch-lw cleanup drawing.ai \
--output "drawing CLEANUP.ai" \
--report "drawing-cleanup-report.json"
The first version is conservative. It writes a new file, deletes only tiny high-confidence dust paths and exact duplicate paths, inserts per-path weights for short/detail, medium, and long/profile strokes, and writes JSON counts for what changed. It does not repair invalid Rhino source solids or make uncertain internal lines disappear; those remain review items in the report/workflow.
apply-jsx uses a semantic layer-name classifier: anything in a
Visible::ClippingPlaneIntersections::* OCG is the section cut (1.0 pt);
TEC_TIMBER_*, TEC_CLT_*, TEC_FOUNDATION etc. are structure (0.5 pt);
SHS_* are secondary steel (0.35 pt); WINDOW_GLASS is glazing (0.25 pt);
cladding (CU_*) is material (0.18 pt); EPDM and FLOOR_DATUMS are
reference (0.13 pt). See docs/POSTMORTEM.md for why this is better than
color-based classification for Rhino files.
apply (pikepdf mode) buckets colors into the preset's tier ladder by
luminance. Good fallback for non-Rhino files where layer names don't
encode semantics.
arch-lw apply drawing.ai --auto --preset studio --dry-run # preview
arch-lw apply drawing.ai --auto --preset studio # commit
Add --dry-run to either to print the planned mapping without writing.
When auto-mode misclassifies (e.g., it sticks "structural framing" in
the texture tier because it's the most common color), copy
examples/sample-mapping.json, edit, and pass it:
arch-lw apply drawing.ai --mapping my-mapping.json
A mapping file is just {"RGB(r,g,b)": weight_pt, ...}. Any color absent
from the mapping gets --default-width (0.25 pt unless overridden).
From a source checkout:
.venv/bin/arch-lw inspect examples/sample-linework.pdf
.venv/bin/arch-lw apply examples/sample-linework.pdf \
--mapping examples/sample-mapping.json \
-o /tmp/sample-linework-HIERARCHY.pdf
Optional freeze: set ARCH_LW_FREEZE_LEGACY_APPLY=1 to fail-close
legacy apply/inspect/poche/preview processors before they read input.
Default is off so the byte-idempotent apply path keeps working.
Public proof assets are not committed in this repository. Posting and public
proof remain NO-GO unless W5/W7 explicitly accepts the packet — the
NO-GO→GO path is tracked in issue #80. The synthetic public proof packet
(public_foundation_window_section_synthetic) materializes and validates
passed as of 2026-08-10, and its expected-fail/unsupported sentinels were
verified catching bad packets — that makes the harness green, but it does not
record acceptance, and the private reference regression stays private. The committed
hero image is a reproducible synthetic demo (see examples/), not a proof
packet. Use the local designer console or proof packet export for review
material that includes W5-W7-ACCEPTANCE-HANDOFF.json.
To inspect the proof manifest or validate a local proof packet, run:
.venv/bin/arch-lw proof-check tests/fixtures/make2d/manifest.yml --plan-only
.venv/bin/arch-lw proof-check tests/fixtures/make2d/manifest.yml --output-dir proof --write proof-check.json
.venv/bin/arch-lw proof-check tests/fixtures/make2d/manifest.yml \
--fixture public_foundation_window_section_synthetic \
--materialize-synthetic \
--output-dir /tmp/arch-lw-public-proof \
--write /tmp/arch-lw-public-proof/proof-check.json
--materialize-synthetic writes deterministic public synthetic artifacts for
eligible synthetic fixtures so the proof validator can be rehearsed without
committing proof images. It covers the public pass fixture plus expected-fail
and unsupported public sentinels. It does not materialize or clear
private/manual-review fixtures, does not record W5/W7 acceptance, and does not
close #30.
A .ai file is a PDF with extra. The PDF content stream has all the path
geometry; the .ai adds an /PieceInfo /Illustrator /Private block that
caches the same geometry in Adobe's native format. Illustrator reads from
the private block, ignoring the PDF stream when it can.
arch-lw apply does two things:
S, s,
B, B*, b, b*) it injects <width> w ahead, where <width> comes
from the per-color mapping. Tracks the most recent RG (set stroke RGB)
to know which color the stroke is./PieceInfo: so Illustrator has no choice but to re-parse the
modified PDF stream. Illustrator rebuilds its private cache on first save.This sidesteps ExtendScript entirely. Per-item iteration in ExtendScript on 340 K paths exhibits exponential slowdown from undo-history bloat — the same work in pikepdf is a single linear pass.
| Preset | Use it for |
|---|---|
studio | Studio sections calibrated from the reference drawing (usc is a deprecated alias). |
section | General building sections and wall sections. |
plan | Floor plans, roof plans, site plans. |
elevation | Elevations and projected views with no cut tier. |
detail | Wall details and connection details. |
Default screen-review weights:
| Preset | Cut / Heaviest | Profile | Edges | Material | Texture | Special |
|---|---|---|---|---|---|---|
studio | 1.0 | 0.5 | 0.3 | 0.18 | 0.08 | 0.25 |
section | 1.0 | 0.5 | 0.3 | 0.18 | 0.08 | 0.25 |
plan | 0.71 | 0.5 | 0.35 | 0.25 | 0.18 | 0.35 |
elevation | 1.0 | 0.71 | 0.5 | 0.25 | 0.18 | 0.35 |
detail | 1.5 | 1.0 | 0.5 | 0.35 | 0.25 | 0.42 |
The "Special" tier is for glazing / water / sky — anything not architectural that you want held back at a mid weight regardless of darkness.
Studio 1/4-inch print table:
| Tier | mm | pt | Goes Here |
|---|---|---|---|
cut | 0.70 | 1.985 | Section-cut walls, floors, roofs, ground. |
profile | 0.50 | 1.417 | Foreground profiles and primary structure. |
edges | 0.35 | 0.992 | Object edges, secondary structure, frames. |
material | 0.18 | 0.510 | Material indication and surface breaks. |
texture | 0.13 | 0.369 | Dense hatch, grain, surface texture. |
special | 0.25 | 0.709 | Glazing, water, sky, and middle-weight exceptions. |
The public studio print convention uses 0.13 mm as the lightest standard
surface/hatch weight, matching the project convention in
CONVENTIONS.md. The screen-review studio preset still keeps
0.08 pt for dense on-screen texture because monitor review is not print proofing.
apply path rewrites the visible PDF stream and can flatten
Illustrator layer structure when /PieceInfo is stripped.apply-jsx requires Adobe Illustrator on the machine running the command.apply-saas path preserves Illustrator private layer data and supports
native RGB XA and CMYK K stroke colors. It rewrites stroke operators only;
fill operators are intentionally left alone except for generated poché fills.apply-saas path is focused on Illustrator-saved .ai drawings..ai samples
are intentionally not committed.MIT.