Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
70f16ab
feat(terrarium-jscad): add parametric enclosure envelope
cursoragent Aug 23, 2026
511ba08
feat(terrarium-tscircuit): add indexed coupon board
cursoragent Aug 23, 2026
70b3d73
feat(terrarium-tscircuit): compile the coupon with tsci build
cursoragent Aug 23, 2026
e1dfdde
feat(terrarium-tscircuit): add composite EE packet from tsci
cursoragent Aug 23, 2026
e9bb98f
chore(terrarium-tscircuit): ignore tsci export sidecar Circuit JSON
cursoragent Aug 23, 2026
4cec87b
feat(terrarium-jscad): project envelope views to generated SVG
cursoragent Aug 23, 2026
0e7a0d9
docs(terrarium-jscad): add DRAFT in-house Bambu print note
cursoragent Aug 23, 2026
dfaa970
feat(terrarium-jscad): author B01 corners and B05/B06 plates
cursoragent Aug 23, 2026
726d468
docs(terrarium-jscad): add DRAFT CAD review packet
cursoragent Aug 23, 2026
a87d8a9
revert(terrarium-jscad): remove PACKET.md from the CAD tree
cursoragent Aug 23, 2026
5ec7991
revert(terrarium-jscad): leave PACKET.md as already written
cursoragent Aug 23, 2026
95f71a3
revert(terrarium-jscad): delete PACKET.md
cursoragent Aug 23, 2026
eec9b0a
refactor(terrarium-tscircuit): drop packet/ for native tsci outputs
cursoragent Aug 23, 2026
d02e09f
docs(terrarium-tscircuit): drop admit-list wording from README
cursoragent Aug 23, 2026
4c70d05
fix(terrarium-jscad): serialize path2 stroke stills per solid
cursoragent Aug 25, 2026
23ee896
ci: run lab-tree-checks on this draft
creatifcoding Aug 25, 2026
4038654
ci: rerun terrarium checks after bun on runner
creatifcoding Aug 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions projects/biomemetics/labs/mantis/terrarium/cad/jscad/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# @tmnl/mantis-terrarium-jscad

TypeScript is the CAD authoring source. Leftover FreeCAD/OCCT under `cad/src/**` is emit only. PR 34 and PR 36 stay emit. Do not copy leftover OCCT as authority.

The tree still has one envelope cuboid: 250 x 250 x 500 mm, origin front-left-bottom. X right, Y back, Z up. The 202 x 202 x 427 mm animal-clear box is a keep-out record, not a subtracted void. PARAMS does not lock that void's Z origin.

B20 is the continuous animal/wet barrier. These solids are nonmetal. No animal-side copper, pogo, or metal mesh is authored here.

## Named solids

| solid | balloon | PARAMS rows | what is modeled | omitted |
| --- | --- | --- | --- | --- |
| enclosure envelope | — | `frame.exterior.width/depth/height` LOCK | one cuboid `[0,0,0]→[250,250,500]` | animal-clear void Z |
| `B01-corner-block` | B01 | `frame.band` REF; instances also use exterior 250/250/500 and pitch/span 250/500 | unique 24 mm cube; eight instances at the envelope corners | leftover pocket/inset cuts |
| `B05-view-cassette` | B05 | `panel.stock_thickness` 3.00 mm LOCK; `animal.clear.width/height` 202 x 427 CALCULATED | local plate 202 x 3 x 427 mm | world face and gasket Z; seat pocket |
| `B06-front-door` | B06 | `panel.stock_thickness` 3.00 mm LOCK; `animal.clear.width/height` 202 x 427 CALCULATED | local plate 202 x 3 x 427 mm | world face, swing, nymph-gap cut |

Cassette seat is `stock + 0.20 mm` TARGET (3.20 mm). It is recorded, not a pocket. Screen aperture `<=0.80 mm` nonmetal is LOCK on B11, not a cut in these plates. In-plane plate size is CALCULATED before gasket closure.

`npm run generate` projects each authored solid with `@jscad/modeling` `extrusions.project({axis, origin}, solid)`, converts the geom2 outlines to closed `path2` via `geom2.toOutlines` and `path2.fromPoints({closed: true})`, sets stroke with `colors.colorize([0, 0, 0, 1], path)`, then writes SVG with `@jscad/svg-serializer` `serialize({unit: 'mm'}, ...paths)`. Official serializer fills geom2 black and strokes path2. Generate never passes geom2 to serialize.

Those files are class generated, not shop-release. Leftover S01 stays the extract view. `generated/VIEWS.md` lists every file generate wrote.

Envelope still uses the short names `front.svg`, `side.svg`, and `top.svg`. Every solid also writes `{solid}-{view}.svg`.

| file | solid | view | axis | origin | plane |
| --- | --- | --- | --- | --- | --- |
| `generated/front.svg` | envelope | front | `[0, 1, 0]` | `[0, 0, 0]` | XZ |
| `generated/side.svg` | envelope | side | `[1, 0, 0]` | `[0, 0, 0]` | YZ |
| `generated/top.svg` | envelope | top | `[0, 0, 1]` | `[0, 0, 0]` | XY |
| `generated/envelope-front.svg` | envelope | front | `[0, 1, 0]` | `[0, 0, 0]` | XZ |
| `generated/envelope-side.svg` | envelope | side | `[1, 0, 0]` | `[0, 0, 0]` | YZ |
| `generated/envelope-top.svg` | envelope | top | `[0, 0, 1]` | `[0, 0, 0]` | XY |
| `generated/B01-corner-block-front.svg` | B01 | front | `[0, 1, 0]` | `[0, 0, 0]` | XZ |
| `generated/B01-corner-block-side.svg` | B01 | side | `[1, 0, 0]` | `[0, 0, 0]` | YZ |
| `generated/B01-corner-block-top.svg` | B01 | top | `[0, 0, 1]` | `[0, 0, 0]` | XY |
| `generated/B05-view-cassette-front.svg` | B05 | front | `[0, 1, 0]` | `[0, 0, 0]` | XZ |
| `generated/B05-view-cassette-side.svg` | B05 | side | `[1, 0, 0]` | `[0, 0, 0]` | YZ |
| `generated/B05-view-cassette-top.svg` | B05 | top | `[0, 0, 1]` | `[0, 0, 0]` | XY |
| `generated/B06-front-door-front.svg` | B06 | front | `[0, 1, 0]` | `[0, 0, 0]` | XZ |
| `generated/B06-front-door-side.svg` | B06 | side | `[1, 0, 0]` | `[0, 0, 0]` | YZ |
| `generated/B06-front-door-top.svg` | B06 | top | `[0, 0, 1]` | `[0, 0, 0]` | XY |

`axis` is the official `project()` plane normal. Front is the Y-normal plane. Side is the X-normal plane. Top is the Z-normal plane, the library default. B05 front is the 202 x 427 mm plate. B01 is the unique 24 mm cube. The eight instance origins live in `generated/VIEWS.md`.

STL and STEP emit throw. PNG/iso stay blank. `gl` created a context on this coupon. Official `@jscad/regl-renderer` `demo-cli.js` then failed with `Cannot find module '@jscad/img-utils'`. No PNG was written. Maturity is DRAFT.

## Draft in-house print

A local person has Bambu printers. Path is FDM on Bambu. Printer model is UNVERIFIED. Nozzle and bed size stay unnamed until that person names them.

Printed candidates are REF printed solids. Acrylic B05 and B06, screen B11, and bought Particle/ADI parts are not printed.

Filament (PETG/ASA on B01) stays REF until the local person names it.

Shop outreach is Tuesday 2026-08-25. This packet is DRAFT, not shop-release.

Leftover FreeCAD/OCCT stay emit. The SVG generate path above stays. No STL just to have a file. No cuboid shop drawing.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Generated orthographic views

class: generated. Not shop-release.
Leftover S01 stays the extract view.

Command: `npm run generate`
Each still is `extrusions.project({axis, origin}, solid)`, then `geom2.toOutlines`, closed `path2.fromPoints`, `colors.colorize([0, 0, 0, 1], path)`, then `svgSerializer.serialize({unit: 'mm'}, ...paths)`.
Official `@jscad/svg-serializer` fills geom2 black. path2 is stroke. Generate never passes geom2 to serialize.

B01 is one 24 mm cube. The eight instance origins are recorded below. Pocket cuts are omitted.
B05 and B06 are the local 202 x 3 x 427 mm plates. World face and gasket Z stay unverified.

| instance | origin mm |
| --- | --- |
| B01-corner-01 | [0, 0, 0] |
| B01-corner-02 | [226, 0, 0] |
| B01-corner-03 | [0, 226, 0] |
| B01-corner-04 | [226, 226, 0] |
| B01-corner-05 | [0, 0, 476] |
| B01-corner-06 | [226, 0, 476] |
| B01-corner-07 | [0, 226, 476] |
| B01-corner-08 | [226, 226, 476] |

| file | solid | view | axis | origin | plane |
| --- | --- | --- | --- | --- | --- |
| envelope-front.svg | envelope | front | [0, 1, 0] | [0, 0, 0] | XZ |
| front.svg | envelope | front | [0, 1, 0] | [0, 0, 0] | XZ |
| envelope-side.svg | envelope | side | [1, 0, 0] | [0, 0, 0] | YZ |
| side.svg | envelope | side | [1, 0, 0] | [0, 0, 0] | YZ |
| envelope-top.svg | envelope | top | [0, 0, 1] | [0, 0, 0] | XY |
| top.svg | envelope | top | [0, 0, 1] | [0, 0, 0] | XY |
| B01-corner-block-front.svg | B01-corner-block | front | [0, 1, 0] | [0, 0, 0] | XZ |
| B01-corner-block-side.svg | B01-corner-block | side | [1, 0, 0] | [0, 0, 0] | YZ |
| B01-corner-block-top.svg | B01-corner-block | top | [0, 0, 1] | [0, 0, 0] | XY |
| B05-view-cassette-front.svg | B05-view-cassette | front | [0, 1, 0] | [0, 0, 0] | XZ |
| B05-view-cassette-side.svg | B05-view-cassette | side | [1, 0, 0] | [0, 0, 0] | YZ |
| B05-view-cassette-top.svg | B05-view-cassette | top | [0, 0, 1] | [0, 0, 0] | XY |
| B06-front-door-front.svg | B06-front-door | front | [0, 1, 0] | [0, 0, 0] | XZ |
| B06-front-door-side.svg | B06-front-door | side | [1, 0, 0] | [0, 0, 0] | YZ |
| B06-front-door-top.svg | B06-front-door | top | [0, 0, 1] | [0, 0, 0] | XY |

PNG/iso: blank. `require("gl")(64, 64)` created a context. Official `@jscad/regl-renderer` `demo-cli.js` then failed with `Cannot find module '@jscad/img-utils'`. No PNG was written.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions projects/biomemetics/labs/mantis/terrarium/cad/jscad/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "@tmnl/mantis-terrarium-jscad",
"version": "0.1.0",
"private": true,
"type": "module",
"description": "TypeScript JSCAD authoring for the mantis terrarium enclosure envelope",
"exports": {
".": "./src/index.ts"
},
"scripts": {
"generate": "node --experimental-strip-types src/generate.ts",
"test": "node --test --experimental-strip-types test/*.test.ts",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@jscad/modeling": "^2.13.0",
"@jscad/svg-serializer": "^2.3.21"
},
"devDependencies": {
"@types/node": "^25.9.5",
"typescript": "^5.9.3"
}
}
Loading
Loading