# Export Sketchup

> Prepare and export the Rhino model to SketchUp (.skp) — optionally strip block/point/curve/hatch/dim, check that every object is a closed solid (SketchUp has no true solids, so open surfaces become loose faces), turn each object into its own block (exports as a SketchUp component), then export .skp targeting SketchUp 2013. Asks whether to work on a copy, dry-runs first, then applies. Trigger when the user wants to export/hand off to SketchUp / .skp / SU. Fire on Korean or English requests, e.g. "스케치업으로 내보내기", "skp export", "스케치업 2013", "블록으로 만들어서 내보내", "export to sketchup", "save as skp".

- Skill: `hongikarchi/export-sketchup` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add hongikarchi/export-sketchup`
- Raw SKILL.md: https://api.skillmd.com/api/skills/hongikarchi/export-sketchup/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Web & Frontend
- Author: hongikarchi (https://skillmd.com/u/hongikarchi)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/hongikarchi/export-sketchup

---


# export-sketchup

Prep + export the model to SketchUp .skp. Scripts: the shared `export-common/strip_prep.py` (strip by
type) and `exportsu_prep.py` next to this file (closed-check + one-block-per-object, `SU_APPLY=True` to
apply). Export is a `run_command` step.

## Steps
1. **Model safety — ask each run**: SaveAs copy vs current doc (prep is destructive: strip + block-ify).
2. **Strip — ask which types** (spec "옵션으로 물어보기"). Glob `**/export-common/strip_prep.py`,
   dry-run, confirm, then apply:
   ```python
   STRIP_WHOLE_DOC=True; exec(open(r"<ABS>\strip_prep.py").read())                 # dry-run counts
   STRIP_CURVE=True; STRIP_HATCH=True; STRIP_DIM=True; STRIP_POINT=True; STRIP_BLOCK=False
   STRIP_WHOLE_DOC=True; STRIP_APPLY=True; exec(open(r"<ABS>\strip_prep.py").read())  # apply chosen
   ```
   (Typically keep blocks — they become SU components — and strip 2D curve/hatch/dim clutter. Let the
   user decide.)
3. **Closed-check + block-ify.** Select the objects to export, then:
   ```python
   exec(open(r"<ABS>\exportsu_prep.py").read())                    # report open solids + counts
   SU_APPLY=True; exec(open(r"<ABS>\exportsu_prep.py").read())     # each object -> its own block
   ```
   Report OPEN solids first (fix or accept — they'll be loose faces in SU). Then block-ify.
4. **Export .skp.** `run_command('_-Export "C:\\out\\model.skp" _Enter')` on the selection.

## Gotchas (verified where noted)
- **MODAL-DIALOG gotcha (must set up once on this machine).** The SKP export options — "Export file as"
  version dropdown (set to **SketchUp 2013**) and "Export planar regions as polygons" — appear as a
  MODAL DIALOG that will HANG an automated `-Export`. Fix: run one SKP export interactively, set the
  version to 2013, and tick **"Always use these settings. Do not show this dialog again"**. After that
  `-Export` runs silently. Rhino 7/8 write .skp up to 2021, so 2013 is available.
- **Block API verified** live: `rs.AddBlock([id], base_pt, name, True)` + `rs.InsertBlock(name, base_pt)`
  → `rs.IsBlock` true, net-zero on cleanup. Rhino blocks map to SketchUp components on export.
- **Strip classification verified** live: block/point/curve/hatch/dim counts matched the document
  exactly (curve = LINE+CURVE+POLYLINE+CIRCLE, dim = AnnotationBase — checked before Curve).
- **SketchUp has no NURBS/solids** — everything meshes on export; open surfaces = loose faces, so the
  closed-check matters. Set a sensible render-mesh density before export to control face count.
- **Prep is destructive** (strip deletes; block-ify replaces objects with instances) → copy-vs-current
  prompt in step 1.

## Not yet implemented
- Auto-suppressing the SKP dialog (no scriptable token — one-time manual setup above).
- Per-object mesh-density tuning.

## Reference
Built 2026-07-01 (task 5 of the 6-task suite). Block + strip APIs verified live on
`260629 main ms.3dm`. See memory `rhino-export-mechanics` and the plan.

