export-d5
Prep the model for D5 Render. Scripts: shared export-common/strip_prep.py (strip by type) and
exportd5_prep.py next to this file (match mapping, D5_APPLY=True to apply). The D5 transfer
itself is manual — D5's Rhino plugin (D5 Sync / LiveSync) exposes only panel buttons, no scriptable
command, so this skill does the Rhino-side prep and then hands off.
Steps
- Model safety — ask each run: SaveAs copy vs current doc (prep is destructive: strip + mapping).
- Strip — ask which types (spec "옵션으로 물어보기"). Glob
**/export-common/strip_prep.py, dry-run counts, confirm, apply the chosen types (usually strip point/curve/hatch/dim, KEEP blocks and solids). Same as export-sketchup step 2. - Match mapping. Select the objects, then:
Unmapped =exec(open(r"<ABS>\exportd5_prep.py").read()) # dry-run: mapped vs unmapped counts # primary: copy an existing mapped object's mapping onto the unmapped ones EXEMPLAR_ID="<guid-of-a-mapped-object>"; D5_APPLY=True; exec(open(r"<ABS>\exportd5_prep.py").read()) # or fallback (no exemplar): box 1000^3 mapping on the world origin D5_APPLY=True; exec(open(r"<ABS>\exportd5_prep.py").read())RhinoObject.GetTextureChannels()empty. Primary path copiesGetTextureMapping(ch)from the exemplar; fallback builds aCreateBoxMapping(WorldXY, ±500³, capped)(size =BOX_SIZE, default 1000) — all objects share onePlaneso "원점이 동일하게" holds. - Hand off. Tell the user to click Sync / LiveSync in the D5 panel. This cannot be scripted.
Gotchas (verified where noted)
- D5 is not scriptable. No
_D5*command / dash macro;.d5afile export is also plugin-driven. The skill stops at prep + a manual "click Sync" instruction. - Mapping API verified live:
GetTextureChannels()empty → no mapping;CreateBoxMapping+SetTextureMapping(1, tm)(returns the channel ≥0) +CommitChanges()→ channel appears;GetTextureMapping(1)reads it back (used for the exemplar-copy path). Net-zero on the test object. - Namespace is
Rhino.Render.TextureMapping, notRhino.Geometry. - PBR BaseColor from
clean-rhino's material step maps most predictably to D5's albedo — runclean-rhino(material stage) before D5 for white-plaster defaults. - Prep is destructive (strip deletes; mapping writes) → copy-vs-current prompt in step 1.
_MatchMappingcommand needs interactive picks, so the skill replicates it viaGetTextureMapping→SetTextureMappinginstead.
Not yet implemented
- Any automated D5 push (blocked — no D5 command surface).
- Auto-choosing the best exemplar (the caller passes
EXEMPLAR_ID, or the box fallback is used).
Reference
Built 2026-07-01 (task 4 of the 6-task suite). Mapping + strip APIs verified live on
260629 main ms.3dm. See memory rhino-export-mechanics and the plan.