jig3d 0.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: jig
3
+ description: Model a 3D object (.glb) using jig's procedural hard-surface CAD and QuadCage SubD API in a fast multi-view visual feedback loop (jig view / jig build / jig describe).
4
+ argument-hint: <description of the 3D object to model>
5
+ ---
6
+
7
+ Model this 3D object using `jig`: $ARGUMENTS
8
+
9
+ ## Workflow
10
+
11
+ 1. Read `SURFACE.md` and `AGENTS.md` (or run `uv run jig words` and `uv run jig materials`) if you haven't yet.
12
+ 2. Scaffold or create the script (`uv run jig new <path>.py`) defining `def model(p):` with `from jig import *`.
13
+ 3. Iterate in at least **4–6 visual rounds** using:
14
+ - `uv run jig view <path>.py -o out/<name>.png` — open and inspect the rendered contact sheet after EVERY edit.
15
+ - `uv run jig describe <path>.py [LINE]` — check bounding dimensions, `soft`/`deep`/`plain` metrics, face words/sizes, and zero flush/overhang warnings.
16
+ - `uv run jig cost <path>.py` — keep triangle counts disciplined (trim wasteful chamfers on tiny repeated parts).
17
+ - `uv run jig look out/<name>.glb [other.glb] --views 3q,front,side,back,top --slots` — check scale, silhouettes, and slots.
18
+ 4. Build discipline across rounds:
19
+ - **Silhouette first**: break the box with `body()`, `extrude(..., draft=)`, `rect(..., cut=)`, `loft()`, `lathe()`, or organic `QuadCage`.
20
+ - **Secondary form**: sunk panels (`p.inset`), frames, collars, ribs, and `.chamfer(b)` on every visible outer edge (target `soft` 0.55–0.75 on hero models).
21
+ - **Function & mechanics**: fasteners (`bolt().on(face.corners(...))`), vents (`p.slots`), cables (`sweep`), supports/feet, and restrained emissive indicators (`glow`/`lamp`/`led_*`).
22
+ - **Check all four sides**: fix flat backs, floating parts, and every warning reported by `jig describe`.
23
+ 5. Finish with `uv run jig build <path>.py -o out/<name>.glb` and report the `.glb` path, final preview PNG path, dimensions, triangle count, `soft`/`deep`/`plain` metrics, and rounds completed.
jig3d-0.1.2/.gitignore ADDED
@@ -0,0 +1,10 @@
1
+ .venv/
2
+ __pycache__/
3
+ *.pyc
4
+ .pytest_cache/
5
+ .ruff_cache/
6
+ .mypy_cache/
7
+ dist/
8
+ build/
9
+ *.egg-info/
10
+ out/
jig3d-0.1.2/AGENTS.md ADDED
@@ -0,0 +1,29 @@
1
+ # Agent Guide for `jig`
2
+
3
+ Read [SURFACE.md](SURFACE.md) before writing model scripts. Run `jig words` for live signatures + measured triangle counts, and `jig materials` for built-in PBR materials.
4
+
5
+ ## The Iterative Modelling Loop
6
+
7
+ Never one-shot a 3D model and call it done. Work in fast build-and-look rounds (2–5 seconds each):
8
+
9
+ ```bash
10
+ uv run jig new my_model.py
11
+ uv run jig view my_model.py -o out/my_model.png # inspect every round!
12
+ uv run jig describe my_model.py # faces, warnings, slots, metrics
13
+ uv run jig cost my_model.py # per-line triangle cost
14
+ uv run jig build my_model.py -o out/my_model.glb # final deterministic PBR .glb
15
+ ```
16
+
17
+ 1. **Round 1 — Primary silhouette**: establish proportions, draft/taper, cut corners, or orthographic `body()` / `QuadCage` shell. Never start and stop at a bare box.
18
+ 2. **Round 2 — Secondary form**: add housings, recessed panels (`p.inset`), bezels, flanges, ribs, mounting plates, and chamfer every visible outer edge (`.chamfer(b)` — aim for `soft` in `0.55–0.75` on hero models).
19
+ 3. **Round 3 — Functional engineering**: show how the object stands, mounts, opens, cools, or connects (feet, bolted brackets, louvers via `p.slots`, cables via `sweep`, indicators via `glow`/`led_*`).
20
+ 4. **Round 4+ — All-angle polish**: inspect the 4× three-quarter views, side elevation, eye-level shot, and close-ups on `out/<name>.png`. Fix flat backs, floating parts, overhanging seats, or flush overlap warnings from `jig describe`.
21
+ 5. **Final check**: zero warnings from `jig describe`, within triangle budget, `jig build` writes clean deterministic `.glb`.
22
+
23
+ ## Craft Rules
24
+
25
+ - **Real, not toy**: proportions, fastener sizes, indicator lamps, and wall thicknesses should read as engineered objects, not oversized cartoon props.
26
+ - **Colour restraint**: neutrals carry the form; 1–2 tones for body/frame, dark recessed trim/ink for contrast, one accent color used sparingly, glow only where light has a purpose.
27
+ - **Use semantic faces, not raw math**: write `bezel.on(shell.face("front").at(0, -0.02))` and `p.mirror("x")` instead of hand-computing trig and offsets.
28
+ - **Use `QuadCage` for compound curves**: don't approximate organic shells or rounded canopies with stacked boxes — sculpt a `QuadCage`, crease openings, `.subdivide(1)`, and `.thicken(..., bevel=...)`, then add hard-surface CAD hardware with `p.put(...)`.
29
+ - **Inspect warnings**: if `jig describe` prints `lies flush over line N` or `stands X mm past the face it sits on`, fix the sink/lift/inset directly in the script.