holiday-ornament

Community@netahandiness649/holiday-ornament
Community skill — not reviewed. It was shared by MerryMateo and has not been checked by Neta. Read SKILL.md below before letting an agent use it.
Installation
npx -y @neta-art/neta-search-cli@latest skills add @netahandiness649/holiday-ornament
Summary

Turn a character or symbol from your world into a holiday ornament you can actually 3D print and hang.

  • Pick a holiday, from Christmas, Halloween and Lunar New Year to Diwali, weddings and memorials, and a subject from your world or a simple symbol.
  • Choose a look: a carved round medal, a cut-out silhouette for a matching set, or a precise drawn shape like a snowflake, star or heart.
  • You get print-ready files, one for slicers and one with the size and print notes built in, plus a report on whether it can be printed.
  • A turnable 3D page lets you spin the ornament and download both files, and a card for it goes on your board.
  • Characters with a bold, chunky outline work best, since fine filigree and thin details don't survive printing.
SKILL.md
# Holiday Ornament

An ornament is a manufactured part: one thickness, a way to hang, a mass a branch can carry,
and a file a slicer opens without complaint.

The world decides **what** it is. The calendar decides **how it hangs**. The report decides
**whether it can be printed**.

## Language

Reply in the user's language, whatever language this file is written in. Translate what the
scripts print; don't paste their output. Everything the user reads in the deliverable follows
the user's language too: the Work title, the page's title, buttons, labels and status lines.
Keep one locale dictionary in the page and pick it at build time (`?lang=`, falling back to
English) — never hard-code one language into the template.

## What it makes

| Thing | Where |
|---|---|
| `STL` — the mesh a slicer takes | `build/<name>/<name>.stl` → also in the work |
| `3MF` — millimetres stated, notes attached | `build/<name>/<name>.3mf` |
| print report — every measurement, pass or fail | `build/<name>/<name>.print-report.json` |
| a page — turnable model, both downloads | `works/webs/<slug>/` |
| the card on the Board | via **board-ops** |

A file that fails its checks is not an ornament yet.

## Setup, once per world

```bash
python3 .agents/skills/holiday-ornament/scripts/setup.py
python3 .agents/skills/holiday-ornament/scripts/doctor.py   # says whether it can run here
```

Installs into `<world>/.pylibs` — inside the world, no root, survives a rebuilt sandbox.
The scripts find the world root themselves by walking up for `.agents/` or `world/`, so the
skill works unzipped into `.agents/skills/` or one folder deeper.

**When something fails, run `doctor.py` first.** It prints the resolved world root, the
library path, which imports fail, whether the Studio CLI answers, and a tiny build that must
pass. Its output names the cause without guessing.

---

## The default road

**One image → Meshy image-to-3D with the remesh OFF → weld → cut to a disc → hole → check.**

That is the whole pipeline. It is short on purpose: every step I added beyond it was
compensating for damage the provider's remesh does, and the file that came off the printer
(the 72 mm dragon medal) used exactly this.

### 1 · Look at the world

`world/WORLD.md` for premise and palette; `neta atom list` / `neta find` for characters.
Shortlist 3–4 subjects that read at 70–90 mm — a silhouette that survives simplification.

### 2 · Ask, once

Load **questionnaire** and ask together (skip anything the ask already fixes):

1. **Occasion** — the holiday (see [`reference/occasions.md`](reference/occasions.md)).
2. **Subject** — 3–4 world options + "a symbol instead".
3. **Route** — `relief medal` (default), `pierced silhouette` (a matching set), `drawn`
   (snowflake, star, heart — exact geometry).
4. **Size** — 70 mm filler · **72 mm standard** · 90 mm statement.
5. **Colour** — silk white, holly red, antique gold, frosted ice, matte black, "I'll paint it".

### 3 · Draw the reference

`image-to-3d` reconstructs one subject from one view, so the input *is* the design:

- one subject, centred, whole silhouette, nothing cropped, **front view**
- plain light background, even light, no cast shadow, no text, no border
- the occasion's form in words: *"a round carved medal with an integral raised rim and a
  hanging hole at the top centre"*
- **chunky** — "nothing thinner than 2 mm"; filigree arrives as spaghetti

A character's atom cover is the reference when it exists (`neta find images "<name>"`).
Show the image and get a go-ahead before the 3D spend. One image is cheap; a bad mesh is not.

### 4 · Build it

```bash
node /mods/neta/neta generate 3d --async \
  --param operation=image-to-3d --param ai_model=latest \
  --param should_texture=true --param should_remesh=false \
  --param target_formats=glb \
  --image "<reference url>" --work-title "<Ornament title>"
```

- **`should_remesh=false`. Not optional.** The remesh is what shatters a surface into
  hundreds of fragments; the raw mesh is sound. This one flag saves the whole repair loop.
- Always `--async` — a 3D task runs for minutes; end the turn saying it is being sculpted.
- `target_formats=glb`; `should_texture=false` when only the shape matters.
- Next turn, check once with `generate status <taskRunId>`; only `GENERATION_FAILED` is
  resubmitted.

### 5 · Make it printable — **verify first, rebuild only on request**

The generator usually hands back a **finished ornament**: a loop, a hole, sometimes a tassel
hole, already the right size. The default is therefore to *pass it through*:

```bash
python3 .agents/skills/holiday-ornament/scripts/prep_printable.py \
  --glb "world/media/studio/works/<Title>.glb" --out build/<name> --name <name>
```

That welds, measures, writes the STL and the report, and **changes nothing else**: no rescale,
no disc cut, no second hole.

Surgery is opt-in, and every flag that changes the shape must be named:

| flag | what it does | when to use |
|---|---|---|
| `--form medallion` | flatten the back, cut to `--diameter`, punch `--hole` | the model is a raw relief, not an ornament |
| `--form figurine` | keep the whole model, stand it up, weld a ring | a sculpted figure |
| `--height 72` | rescale to that height | only when the size is wrong |
| `--diameter 72` | **fit and trim to a disc** | only when the outline is ragged |
| `--hole 2.8` | punch a hole | only when the model has none |

**Why this matters.** A finished ornament put through the rebuild path gets the top of its
loop trimmed by the disc cut, a second hole punched beside the first, and its tassel hole and
base removed — a mess, from a file that was already correct. If the GLB looks right in a
slicer, the skill's job is to prove it and leave it alone.

### What pass-through is allowed to touch

The rule is one line: **repair the file, never the shape.**

| allowed | why it is invisible |
|---|---|
| weld duplicate vertices | the exporter split them; sharing them changes no position |
| drop zero-area faces | they carry no surface |
| make winding consistent, flip inverted normals | direction only, vertices unmoved |
| leave cracks open | the slicer closes them; capping on a *copy* is what measures |

Never on the pass-through path: `voxel_fuse`, any pitch, Laplacian smoothing, decimation,
`--diameter` trimming, `punch_hole`, `fit_height`, or dropping small shells. A tassel hole is
2 mm across; a marching-cubes pass at 0.2 mm pitch eats it, rounds the loop and shifts every
edge by up to a pitch. This ran *before* the form gate once, and it is the reason a correct
GLB came out cut, off-centre and hole-less.

**Keep the source.** Every run copies the incoming file beside the STL as
`<name>.source.glb` and records its sha256 in the report. A generated mesh exists in exactly
one place when it arrives, and a cleared cache takes it with it; the copy is what lets you
compare a regenerated design against the one that failed.

`geometry_unmodified` in the report is a measurement, not a claim: the bounding box is
recorded on load and compared at the end, and the step log shows both numbers. If it is
`false` while no reshaping flag was given, the run is a bug — read `steps` to find it.

Cracks in the input are reported, not hidden: openings are only measured on a closed
surface, because a missing face reads as an opening twice the real size. For the 3MF,
`to_3mf.py --seal` caps cracks (adds faces, moves no vertex); if gaps remain it refuses
rather than ship a shape it had to guess.

```bash
python3 .agents/skills/holiday-ornament/scripts/prep_printable.py \
  --glb "world/media/studio/works/<Title>.glb" \
  --out build/<name> --name <name> \
  --height 72 --form medallion --diameter 72 --hole 2.8
```

In order, and why each exists:

| Step | Why |
|---|---|
| weld + fix windings | STL/GLB arrives with split vertices; a slicer calls that "not watertight" |
| **salvage** — only if the surface is shattered | the fragments are fused back into one solid. A fallback, not the road |
| scale to millimetres | a generated model has no idea how big an ornament is |
| **cut to a disc** (`--diameter`) | one clean circular edge for every piece — this is what makes a set read as a set |
| **hanging hole** (`--hole`) | punched straight through the plate. If the model already has one, it is left alone — punching beside it makes a blob |
| measure | the report is the only honest answer to "can I print it?" |

Exit 0 only when every check passes. Thresholds: watertight · one body · no open edges ·
flat on the bed · bed contact ≥ 40 mm² · overhang ≤ 8 % · hanging hole ≥ 2.5 mm.

### 6 · 3MF, page, board

```bash
python3 .agents/skills/holiday-ornament/scripts/to_3mf.py \
  --in build/<name>/<name>.stl --out build/<name>/<name>.3mf \
  --title "<Title>" --designer "<world>" --notes "0.4 nozzle · 0.2 layers · 3 walls · 15% infill"

python3 .agents/skills/holiday-ornament/scripts/publish_work.py \
  --work works/webs/<slug> --src build/<name> --name <name> \
  --title "<Title>" --blurb "<one paragraph in the world's voice>"
```

Then the card, per **board-ops**.

---

## The other two roads

### Pierced silhouette — for a matching set

Nine relief reconstructions give nine different rims, faces and depths. A pierced silhouette
cannot: the ring **is** the rim, and every piece is built from a black-on-white stencil.

```bash
python3 .agents/skills/holiday-ornament/scripts/silhouette_medallion.py \
  --image "world/media/studio/works/Silhouette — <Name>.jpg" \
  --out build/<name> --name <name> --diameter 80 --thickness 5
```

Draw the stencil first: *"a flat solid black silhouette of <subject>, pure white background,
single flat colour, no shading, no internal detail, sharp stencil edges, whole animal centred,
nothing cropped, vector stencil artwork."*

The script traces the mask, closes features thinner than a nozzle, fits the animal inside the
ring, and welds it on a thin inner bezel — a pointed tip alone is a knife edge that snaps.
Its report checks `weld_area_mm2 ≥ 10` instead of a wall gap, because at a wing tip the gap
between two openings is air on both sides, not a thin wall.

### Symbols — generate first, draw second

A star, a snowflake, a tree: `image-to-3d` handles them well, and it handles them *light*.
Three checked here came back **72 mm tall, 3.2 mm thick, 4–6 g, 1.8k–6.1k faces, watertight,
one body, 0 % overhang, ~1200 mm² on the bed** — pierced outlines with a hole at the top, all
passing this skill's checks as they arrived.

So for a symbol the order is: ask for it as an image (same reference rules, "a pierced flat
ornament, outline only, hanging hole at the top"), pass it through `image-to-3d` with the
remesh off, and only fall back to the drawn route when the generated outline is untidy. The
drawn route still wins when you need an exact count of points, exact symmetry, or a shape the
provider keeps fumbling — and it is the only route that puts text on the piece.

### Drawn — for symbols

```bash
python3 .agents/skills/holiday-ornament/scripts/cad_medallion.py \
  --out build/<name> --name <name> --motif snowflake   # or star, heart, egg, pumpkin, lantern, disc
```

Exact symmetry, exact holes, no repair loop. Also the fallback when a relief will not pass.

---

## A figure is not a plate

Check the shape before choosing the step: **depth ÷ height**. A plate is under ~0.15; a
character reconstruction is around 0.2. Keeping the front slice of a *figure* gives a bust
with no disc, no rim and no circle — an ornament that looks broken because it is one.

`prep_printable.py` measures this itself and, for a figure, **mounts** it: the front 6.5 mm
slice is set on a disc of `--diameter`, the pair is trimmed to a circle, and the hanging hole
is punched in the plate above the relief. A plate goes the direct route: flatten the back,
cut to the disc, punch.

The hole is punched 4–5 mm in from the edge, never 3: at 3 mm the bore sits so close to the
rim that only a paper-thin band is left over it.

## A figurine is the opposite of a plate

A generator asked for an ornament sometimes hands back a **standing figure with its own loop
at the top** — 76 mm tall, upright, one body, watertight. That is a finished ornament too:
pass it through, print it upright, and let the slicer add supports under the arms and chin.

Two numbers matter on a figure and neither is on a plate:

- **Mass.** A 58 cm³ figure is **72 g solid** and about **27 g** at three perimeters and 15 %
  infill. Both numbers are in the report (`grams_pla`, `grams_pla_infill15`). Quote the
  second when someone asks whether a branch will hold it.
- **The loop.** On a plate the bore is read in the plane of the disc; on a figure it is a
  small ring above the head, read across the tallest axis. The measurement picks the
  arrangement the surface agrees with and reports a **range**, because a bore read through
  sculpted relief varies with the plane. A 2.1 mm wire with a 2.1 mm bore takes a thin
  ribbon, not a cord.

Do not shrink a figure to plate thickness or cut it to a disc: `--form medallion` on a figure
keeps only its front slice, which is the bust-with-no-rim failure. If a *disc* is what was
asked for, that is a remount (`mount_relief`), not a pass-through.

## The 3MF trap — read this once

An STL is a **triangle soup**: every face carries its own three vertices, and slicers weld it
on import, which is why an STL prints. A 3MF **shares vertices by index**, so writing a soup
straight into a 3MF gives a model whose triangles never touch. A slicer that cannot find a
closed volume may fill the inside and print the **negative** — the ring and figure come out
as voids in a solid disc.

`to_3mf.py` now welds first and **refuses** to write a package with open edges. Proof it
worked, on a real ornament: `45,876 verts / 15,292 tris` (3.0 per triangle, a soup) became
`7,638 / 15,292` (0.5, shared) with all 22,938 edges used by exactly two faces.

If a 3MF ever prints inverted again: open it, count vertices against triangles. A ratio near
3.0 means soup; near 0.5 means a real solid.

## Deliver

The kind is **3D print files** — an STL, a 3MF and the print report that vouches for both. The
page is optional and is a **web Work**.

1. `prep_printable.py` writes `build/<name>/<name>.stl` and `<name>.print-report.json`.
2. `to_3mf.py` writes `<name>.3mf` beside them.
3. `node scripts/verify.mjs build/<name>` writes `verify-report.json`. Not deliverable until it
   exits 0.
4. For a page: `publish_work.py` → `neta work publish web works/webs/<slug>`, and the publish
   prints the Work id.
5. **Hand over**: each file as a link, and — when a page exists — an interaction-components
   card whose `target` is `{ "type": "work", "workId": "<id from the publish output>" }`. Never
   a guessed id, never a bare path. The run is not delivered until this step is done.

## Out of scope

- Do not change world settings: `WORLD.md` config, `visualStyle`, the world's slug, the phone theme.
- Do not delete or overwrite files that existed before the run — sources, other Works, other materials.
- Do not edit installed skills, character cards, memory, or a Work this run did not make.
- Do not print a part that is not an ornament (a mould, a functional bracket, a toy with joints) — say what this skill makes and stop.
- Nothing beyond the one deliverable: no shop listing, no packaging, no marketing copy unless asked.

## When to stop

- No subject and no occasion: ask once — what it is and which holiday — then stop.
- The source image is missing and the world gives no subject: ask once for the image or the subject, then stop.
- Asked for something that is not an ornament: say this skill makes printable ornaments and stop.
- Never invent a subject, an occasion or a size to keep going.

## Rules of the trade

Full numbers in [`reference/print-rules.md`](reference/print-rules.md); the ones that bite:

- **Wall ≥ 1.2 mm** (three perimeters at 0.4). Below that, resin, not FDM.
- **Hole ≥ 2.5 mm**; 2.8–3 mm is kinder.
- **Mass 15–45 g** at 70–90 mm. A 70 g ornament pulls a small branch down.
- **Print flat, back down** — no supports, no brim.
- **Text** is drawn geometry, never generated lettering: ≥ 3 mm cap height on a flat face.
- **Fire**: never a PLA part for a flame. Diwali diyas and lanterns get an LED recess.

## QA — the one command

```bash
node .agents/skills/holiday-ornament/scripts/verify.mjs build/<name>
```

Reads the print report and the files beside it and writes `build/<name>/verify-report.json`:
files present, report passing, thickness and mass in range, hanging opening usable, 3MF
closed. Exit code 0 = every check passed. Run it before you hand anything over; a part that
fails it is not an ornament yet.

## Failure contract

| Signal | Do | Say |
|---|---|---|
| `GENERATION_FAILED` | read the error; a bad source image is usual — redraw cleaner, resubmit once | one line naming the cause |
| `mesh is shattered` | the salvage fuses it (default); if it fails twice, switch route | the shape is too fragmented to rebuild, so it is drawn instead |
| still not watertight | try `--form figurine`, or rebuild a simpler reference | the shape is too fine to become one printable shell |
| overhang > 8 % | thinner plate, or a smaller relief | the relief undercuts itself at this depth |
| the creator rejects the reference | regenerate the image only; no mesh was made | one line |

Two misses on the same target and stop: name what is in the way.