Tessa · Developers
Build with Tessa
A Python package, a command line and an MCP server for your AI assistant. All three run the same core as the web app, so the same model and the same recipe give the same file.
- package tessa3d 0.1.0
- python 3.11+
- license LicenseRef-Proprietary
- textures 304
- MCP tools 17
- PythonTextures, heights and the whole texturing flow
- Command line
tessa texture vase.stl -t 1 - MCP serverClaude, Cursor or VS Code texture your models
- One coreRust, in the browser and on your machine
Get started
Install
Python 3.11 or newer. The package is called tessa3d; the command it installs is tessa.
From PyPI Coming soon
Not on PyPI yet. Once it is, this one line is all you need.
pip install tessa3dFrom a wheel
Given the release wheels? Put both in one folder and install from it.
pip install --find-links ./wheels "tessa3d[core,render]" # the folder holding both .whl files
tessa search knit --limit 2
From source
The source is private during the beta. With access and the GitHub CLI, the installer puts Tessa in ~/.tessa and builds the Rust core that texture_model runs (about a minute, needs Rust). Without Rust, heights and previews still work.
gh repo clone the3dg/tessa tessa -- --branch app --depth 1
sh tessa/scripts/install.sh # into ~/.tessa, with the Rust core
~/.tessa/venv/bin/tessa --version
Quickstart
Texture a model in Python
A demo vase in, a print-ready 3MF out, with the web app’s print guards on.
# Texture a model in three lines: a demo vase in, a print-ready 3MF out.
import tessa
from tessa.demos import demo_stl
open('vase.stl', 'wb').write(demo_stl('vase')) # or any STL, OBJ or 3MF of your own
result = tessa.texture_model('vase.stl', 'knit-stockinette', 'vase-knit.3mf', depth=0.8)
print(result.ok, result.path)
True vase-knit.3mf
result.checks holds the same checks the app shows before a download (watertight, depth, fit surfaces and more), and result.status sums them up in one line.
Examples
More examples
Each one ran when this page was made, and the output under it is what it printed.
Find and fit a texture
# Find a texture, read its printable ranges, and fit its repeat round a part.
import tessa
print(tessa.list('knits')[:3])
t = tessa.get('knit-stockinette')
print(t.name, tessa.number(t.id), t.family)
print(t.params['depth']) # (default, min, max, about), in mm
print(t.period()) # the exact repeat (along U, along V), mm
params = tessa.fit('knit-stockinette', 2 * 3.14159 * 30) # a whole number of repeats round a 60 mm cylinder
print(round(params['size'], 3))
['knit-stockinette', 'knit-garter', 'knit-seed'] Stockinette knit 1 knits (1.0, 0.5, 1.2, 'height (mm) of the tallest part above the lowest') (40.0, 34.0) 4.712
Heights on a grid
# Every texture is a height map h(U, V) in mm: evaluate it on any grid.
import numpy as np
import tessa
U, V = np.meshgrid(np.linspace(0, 20, 200), np.linspace(0, 20, 200))
h = tessa.height('weave-cane', U, V, depth=0.6)
print(h.shape, round(float(h.min()), 3), round(float(h.max()), 3))
print(tessa.backend()) # 'rust' with the core installed, else 'none'
(200, 200) 0.0 0.6 rust
Checks and recipes
# Read what the print checks found, and keep the recipe to reuse the look anywhere.
import tessa
from tessa.demos import demo_stl
open('cube.stl', 'wb').write(demo_stl('cube'))
r = tessa.texture_model('cube.stl', 'leather-pebble', 'cube-pebble.3mf', save_recipe='pebble.tessa.json')
for name, level, detail in r.checks[:3]:
print(level, name)
again = tessa.texture_model('cube.stl', recipe='pebble.tessa.json', out_path='cube-again.stl')
print(again.ok)
ok Watertight ok No bad numbers ok Depth True
Texture the demo cube
# Texture the demo cube with pebbled leather: an STL in, a print-ready 3MF out.
import tessa
from tessa.demos import demo_stl
open('cube.stl', 'wb').write(demo_stl('cube')) # or any STL, OBJ or 3MF of your own
result = tessa.texture_model('cube.stl', 'leather-pebble', 'cube-pebble.3mf', depth=0.5)
print(result.ok, result.path)
True cube-pebble.3mf
Reference
Python API
Code-first textures for 3D prints.
Find textures
tessa.get(id)The texture with this id (KeyError if there is none)
tessa.list(family=None)Texture ids in catalogue order, optionally of one family
tessa.families(){family id: display name}, in catalogue order
tessa.number(id)The texture's catalogue number (1-based, stable within a release)
tessa.by_number(n)The texture with this catalogue number (KeyError if there is none)
Heights and fitting
tessa.height(id, U, V, **params)Shortcut: tessa.get(id).height(U, V, **params)
tessa.fit(id, length_u, length_v=None, **over)Parameters (a dict) with the size nudged so a whole number of repeats fits length_u; pass the result to height(). Raises ValueError if no whole number of repeats fits within the size range, or for classic textures (they have no exact repeat). length_v is accepted for compatibility and ignored.
Texture a model
tessa.texture_model(model_path, texture=None, out_path=None, recipe=None, *, format=None, title=None, colour=None, units=None, bambu=True, progress=None, save_recipe=None, knobs=None, swatch=None, **settings)Texture model_path (STL, OBJ or 3MF) with texture and write out_path (.stl or .3mf; default next to the model as <name>-<texture>.3mf). recipe: a .tessa.json from the web app (path, text or dict); settings given here override it. progress(stage, fraction): 0 adding detail, 1 displacing, 2 slimming, 3 fit surfaces. save_recipe: also write the recipe used to this path. swatch: a .tessa-swatch file in place of a texture (docs/swatch-format.md). Returns a Result.
tessa.build_recipe(texture=None, recipe=None, knobs=None, swatch=None, **settings)The recipe the core runs: recipe (path, text or dict) with the texture and settings given here on top. swatch: your own tile in place of a texture, a .tessa-swatch file (path, Swatch, dict or text; docs/swatch-format.md); the recipe then carries it as texture {"id": "swatch", "swatch": {...}}
Your own tile
tessa.read_swatch(path)Read a .tessa-swatch file (version 1 or 2)
tessa.write_swatch(path, name, mm, data, w, h, depth=None, meta=None)Write a version 2 .tessa-swatch file: data = w x h bytes (or a (h, w) array in 0..1), row 0 at the top
Which engine
tessa.backend()The backend heights use now: 'rust', 'numpy' or 'none' (an installed package without the Rust core)
tessa.set_backend(name)'auto', 'rust' or 'numpy'
tessa.using(name)Use this backend inside a with block
Texture
What tessa.get() returns: one texture, its ranges, and its height function.
.id- The texture id, e.g. knit-stockinette
.name- Its display name
.family- Its family id
.tags- Search words
.good_for- What it suits
.notes- Print notes
.params- {name: (default, min, max, about)}: the printable ranges
.seeded- True when seed gives another arrangement
.classic- True for the classic set (no exact repeat)
Texture.height(self, U, V, raw=False, **over)Height in mm (>= 0): the Rust core by default (see tessa.backends), the numpy reference otherwise
Texture.reference_height(self, U, V, raw=False, **over)Height in mm from the numpy reference code, whatever the backend
Texture.unit(self, U, V, raw=False, **over)The pattern f in [0, 1]
Texture.period(self, raw=False, **over)The exact repeat in mm: (along U, along V)
Texture.tile(self, raw=False, **over)Tile in cell units (tx, ty) for these knobs
Texture.knobs(self, raw=False, **over)The defaults with over on top; ValueError for a value outside its range (unless raw=True)
Texture.defaults(self){parameter: default value}, seed 0 included
Texture.meta(self)A JSON-ready description: id, name, family, tags, good_for, notes, seeded and every parameter's default, min, max and meaning
Result
What texture_model did: path, status (one line), checks, report, seconds, ok (no failed check).
Reference
Command line
tessa: Code-first textures for 3D prints. Every command has --help.
tessa listList textures
| Option | What it does |
|---|---|
--family | (knits / weaves / leather / nature / animal / geometric / grip / architectural / tech / maker / organic / decorative / wood / stone / metal / ceramic / knurling / classic) |
--ids | Ids only |
--json | As JSON |
tessa searchFind textures by words (name, tags, uses)
| Option | What it does |
|---|---|
WORDS | E.g. basket weave |
--family | (knits / weaves / leather / nature / animal / geometric / grip / architectural / tech / maker / organic / decorative / wood / stone / metal / ceramic / knurling / classic) |
--limit | At most this many |
tessa textureTexture a model (STL, OBJ, 3MF) into an STL or 3MF: the web app's flow
Texture a model exactly as the web app does (same Rust core, same file). Settings not given come from --recipe, else the texture's defaults; print guards are on.
| Option | What it does |
|---|---|
MODEL | STL, OBJ or 3MF |
--texture, -t | Id or number |
--recipe, -r | A .tessa.json saved by the web app (or by --save-recipe) |
--swatch | Your own tile in place of a texture: a .tessa-swatch file (the web app's drawing pad exports one; docs/swatch-format.md) |
-o, --out | Output .stl or .3mf (default: MODEL-TEXTURE.3mf next to the model) |
--format | Default: from --out, else 3mf (stl / 3mf) |
--size | Cell size mm (classic textures: a scale) |
--depth | Mm |
--rotation | Degrees |
--seed | Another arrangement (seeded textures) |
--skip-top | % of the height kept plain at the top |
--skip-bottom | % of the height kept plain at the bottom |
--skip-angle | Keep faces within this many degrees of flat plain |
--sharpness | 0..100, 50 = as designed |
--balance | -100..100 |
--foot | Plain band above the bed, mm (1.5) |
--overhang-limit | Degrees from vertical (45) |
--invert | Swap raised and sunken |
--mix | A second texture: checker:plain:15, stripes:weave-twill, hex:dec-pearls, blend:plain:55:85 (fade by height), combine:max:dec-pearls:0.8, or the JSON of a recipe's look.mix |
--stamp | A name stamp: TEXT@WHERE[:HEIGHT[:DEPTH[:cut]]], e.g. HELLO@front:10:0.6 or OK@top:8:0.5:cut (WHERE = front, back, left, right, top, or x,y,z/nx,ny,nz), or the JSON of a recipe's stamp |
--mapping | (auto / box / wrap / field / field-bottom) |
--columns | Round models: straight, one count round the body (default: the pattern never shifts) or even cells (columns added where the model widens: even cell size, may show joins) (even / straight) |
--sphere-top | Patterns on a ball: auto (per texture), globe (rows of latitude, the count halving on row lines, a small plain disc on top) or wrapped (one grid over the whole ball) (auto / globe / wrapped) |
--detail | (draft / standard / fine) |
--detail-guard | Keep the finest detail at least this wide by raising the size (0.8; 0 = keep my size, with a warning) |
--overhang-depth | Depth on overhangs: auto (the texture fades where the model faces down), even (the whole surface at the depth the undersides keep) or full (no overhang guard: undersides may need supports or droop; the same as --no-overhang-safe) (auto / even / full) |
--inner-walls | Texture the inside of an open vessel (a vase, a cup) too; off by default |
--printer | Soften detail finer than the printer can make (default 0.4,0.2) |
--repair | Fix the model first (holes, flipped faces, bad triangles) |
--drop-colours | Don't keep a 3MF's own colours |
--edge-fade | Texture stops short of sharp edges by this many mm (0 = full height to the edge) |
--layer | A texture layer on top (up to 8, repeatable); FROM-TO = a height band in % of the model |
--parts | Each painted area of the mask as its own 3MF part |
--no-fit-plain | Texture pockets and holes too |
--no-overhang-safe | Allow new downward faces past --overhang-limit (may need supports) |
--no-slim | Don't slim the file under 950k triangles |
--param, -p | The texture's own knobs: name=value, e.g. -p tall=0.9 |
--units | The model file's unit (default: the recipe's, a 3MF's own, else mm) (mm / cm / in / m) |
--colour, --color | 3MF filament colour #rrggbb |
--title | The 3MF's object name |
--generic, --no-bambu | A Generic 3MF for any slicer (PrusaSlicer, OrcaSlicer, Cura): core spec only, no Bambu Studio settings, every part in place |
--save-recipe | Also write the recipe used (opens in the web app) |
--json | The full report as JSON |
-v, --verbose | List the checks |
tessa repairFix a broken model (STL, OBJ, 3MF): close small holes, flipped faces, bad triangles; coordinates stay exactly where they were
| Option | What it does |
|---|---|
MODEL | STL, OBJ or 3MF |
-o, --out | .stl or .3mf (default: MODEL-repaired beside it) |
tessa mcpRun the MCP server for AI apps (stdio); `tessa mcp-config` shows how to add it
| Option | What it does |
|---|---|
--root | The only folder the server may write files to (default: the current folder; ~/Tessa when started in / ) |
tessa mcp-configPrint the MCP set-up for Claude Code, Claude Desktop, Cursor and VS Code (this install's paths filled in; nothing is written)
| Option | What it does |
|---|---|
--client | (claude-code / claude-desktop / cursor / vscode / all) |
--root | The folder the server may write to (~/Tessa) |
--json | The snippets as JSON |
tessa infoOne texture: parameters, ranges, notes
| Option | What it does |
|---|---|
TEXTURE | Id or number |
--json | As JSON |
tessa cubeA test cube (STL + Bambu 3MF), the texture round all four sides
| Option | What it does |
|---|---|
TEXTURE | Id or number |
--size | Cube edge, mm (25) |
--depth | Texture depth, mm (within its printable range) |
--res | Mesh step, mm (0.2) |
--out | Output folder |
--template | A Bambu-saved .3mf to copy settings from |
tessa demoWrite a demo model STL to try Tessa on (vase, cube, sphere, pebble, cylinder, rolling-pin, wonky-pot)
| Option | What it does |
|---|---|
NAME | (vase / cube / sphere / pebble / cylinder / rolling-pin / wonky-pot) |
-o, --out | .stl to write (default: demo-NAME.stl) |
tessa patchworkA patchwork proof print: 2 to 4 textures in one layout on a 40 mm cube or small vase (--list: the layouts)
| Option | What it does |
|---|---|
LAYOUT | Checker, stripes, bands, ... (--list shows them all) |
TEXTURES | The first is the model's own; plain = smooth |
--shape | The proof shape (default: the one the layout suits) (cube / vase) |
--cell | Cell size, mm |
--grout | Plain line between cells, mm (0.8) |
--soft | Soft border, mm (0.4) |
--colour | 3MF filament colour #rrggbb |
-o, --out | .3mf to write |
--list | List the layouts |
--generic, --no-bambu | A Generic 3MF for any slicer, no Bambu Studio settings |
tessa renderA shaded preview PNG
| Option | What it does |
|---|---|
TEXTURE | Id or number |
--on | What to show it on (swatch) (swatch / cube / cylinder / sphere / vase / head) |
--px | Width in pixels (900) |
--out | .png to write (default: TEXTURE.png, or TEXTURE-SHAPE.png with --on) |
--param, -p | Name=value, e.g. -p size=6 -p depth=0.8 |
tessa proofProof cubes: 4 textures a cube, laid out on Bambu plates
| Option | What it does |
|---|---|
--out | Output folder (tessa-proofs) |
--size | Cube edge, mm (30) |
--per-plate | Cubes per plate (25) |
--res | Mesh step, mm (0.25) |
--template | A Bambu-saved .3mf to copy printer and filament settings from (needed for the all-plates project) |
--family | Only these families |
--textures | Only these ids or numbers |
MCP
The MCP server
Let your AI assistant find textures, check their print ranges and texture your models, on your machine.
- Local. It runs on your computer over stdio (newline-delimited JSON-RPC 2.0). Nothing is sent anywhere.
- Safe writes. It reads the files you point it at and writes only inside the folder you give it with
--root. - Plain answers. Replies say what was done in plain words, and a failed call says what to do next.
Install Tessa first (above), then run the line for your app. The server writes files only to ~/Tessa. ~/.tessa/venv/bin/tessa mcp-config prints the set-up for every app with your own paths.
claude mcp add tessa --scope user -- ~/.tessa/venv/bin/tessa mcp --root ~/Tessa
Then ask Claude: “find a knit texture and put it on a demo vase”.
~/.tessa/venv/bin/tessa mcp-config --client claude-desktop
Prints the JSON with your paths filled in. Paste it into Settings › Developer › Edit Config, then restart Claude.
~/.tessa/venv/bin/tessa mcp-config --client cursor
Prints the JSON for ~/.cursor/mcp.json (every project), with your paths filled in.
code --add-mcp "{\"name\":\"tessa\",\"type\":\"stdio\",\"command\":\"$HOME/.tessa/venv/bin/tessa\",\"args\":[\"mcp\",\"--root\",\"$HOME/Tessa\"]}"
Adds Tessa to your VS Code profile; use it from Copilot Chat in agent mode.
mcpServersPrefer to edit the file yourself? The JSON for Claude Desktop and Cursor
{
"mcpServers": {
"tessa": {
"command": "/Users/you/.tessa/venv/bin/tessa",
"args": [
"mcp",
"--root",
"/Users/you/Tessa"
]
}
}
}
Reference
MCP tools (17)
Every tool with its inputs, one example call and the start of the real reply it gave.
list_texturessearch_texturestexture_infotexture_modelpreview_pngmake_demo_modelsave_recipeshare_linkfit_sizepatchwork_partnerssearch_filamentsswatch_cardmake_proof_cubepatchwork_layoutsmake_patchwork_proofrepair_modelmake_seamless_tile
list_textures
List the texture library (304 textures): number, id, name and family of each (the classic set included), in catalogue order. Use it to browse a family; to find textures by what they look like or are for, use search_textures instead.
| Input | Type | What it is |
|---|---|---|
family | string | Only this family: knits, weaves, leather, nature, animal, geometric, grip, architectural, tech, maker, organic, decorative, wood, stone, metal, ceramic, knurling, classic |
limit | integer | At most this many |
{
"name": "list_textures",
"arguments": {
"family": "leather",
"limit": 3
}
}
OK: 3 textures in leather 47 leather-pebble Pebble grain leather (Leather & skins) 48 leather-saffiano Cross-hatch leather (Leather & skins) 49 leather-croc-belly Croc belly tiles (Leather & skins)
search_textures
Find textures by words, best match first (every word must match the name, tags, family or uses), e.g. "leather", "knit rib", "grip handle", "wood grain". Start here when the user describes a look.
| Input | Type | What it is |
|---|---|---|
queryrequired | string | A few words, e.g. "basket weave" |
family | string | Only this family (see list_textures) |
limit | integer | At most this many |
{
"name": "search_textures",
"arguments": {
"query": "knit",
"limit": 3
}
}
OK: 3 textures match 'knit' 1 knit-stockinette Stockinette knit (Knits & fabrics) 2 knit-garter Garter stitch (Knits & fabrics) 3 knit-seed Seed stitch (Knits & fabrics)
texture_info
Everything about one texture: what it is good for, print notes, its parameters with their printable ranges (size, depth and its own knobs) and its repeat in mm. Use it before texture_model to pick a size or depth inside the range.
| Input | Type | What it is |
|---|---|---|
texturerequired | string | Id (e.g. "knit-stockinette") or catalogue number (e.g. "12") |
{
"name": "texture_info",
"arguments": {
"texture": "knit-stockinette"
}
}
OK: Stockinette knit (knit-stockinette, no. 1), Knits & fabrics good for: mugs, plant pots, phone stands, anything that should look hand-knitted notes: The classic V stitch. Each stitch is nudged a little so it reads hand-made. tags: knit, sweater, yarn, cosy repeat: 40 x 34 mm at the default size parameters (default, printable range): …
texture_model
Put a texture on the user's own 3D model file (STL, OBJ or 3MF) and write a watertight, print-ready STL or 3MF, exactly as the Tessa web app does (same core, same file): adaptive detail, print guards (fit surfaces stay plain, overhang-safe, a plain foot), slimmed under 950k triangles. Give a texture, a recipe_path or a swatch_path. Returns the output path and the print checks. A small part takes a few seconds, a 150 mm vase about 25 s (settings.detail "draft" is about 3x faster). No model yet? make_demo_model writes one.
| Input | Type | What it is |
|---|---|---|
model_pathrequired | string | Absolute path of an existing file: the STL, OBJ or 3MF to texture (up to 200 MB) |
texture | string | Id or number (or give recipe_path / swatch_path instead) |
out_path | string | .stl or .3mf to write, inside the folder the server may write to (default: MODEL-TEXTURE.3mf there) |
recipe_path | string | A .tessa.json saved by the web app or save_recipe |
swatch_path | string | Your own tile in place of a texture: a .tessa-swatch file (the web app's drawing pad exports one; versions 1 and 2) |
settings | object | Look and print settings; anything not given comes from the recipe, else the texture defaults |
knobs | object | The texture's own knobs (texture_info lists them), e.g. {"tall": 0.9} |
units | mm | cm | in | m | The model file's unit (default mm) |
colour | string | 3MF filament colour #rrggbb |
save_recipe | string | Also write the recipe used to this .tessa.json path |
settingsEvery field of settings (29)
| Input | Type | What it is |
|---|---|---|
size | number | Cell size mm (classic textures: a scale 0.5..2) |
depth | number | Mm, within the texture's printable range |
rotation | number | Degrees |
seed | integer | — |
skip_top | number | % of the height kept plain at the top |
skip_bottom | number | % of the height kept plain at the bottom |
skip_angle | number | Faces within this many degrees of flat stay plain |
sharpness | number | 0..100, 50 = as designed |
balance | number | -100..100 |
invert | boolean | — |
mapping | auto | box | wrap | field | field-bottom | Auto picks; box / wrap project; field = even spreading on curvy models; field-bottom = even, swirl points at the bottom |
columns | even | straight | Round models: even = cells keep their size and shape (default); straight = one repeat count all the way up (ribs, stripes) |
detail | draft | standard | fine | — |
foot_mm | number | Plain band above the bed (1.5) |
fit_plain | boolean | Keep pockets, holes and grooves plain (true) |
overhang_safe | boolean | No new downward faces past the limit (true) |
overhang_limit | number | Degrees from vertical (45) |
slim | boolean | Slim the file under 950k triangles (true) |
overhang_depth | auto | even | full | Depth on overhangs: auto fades the texture where the model faces down; even = the whole surface at the depth the undersides keep; full = no overhang guard (undersides may need supports or droop; same as overhang_safe false) |
inner_walls | boolean | Texture the inside of an open vessel too (false: plain inside) |
detail_guard | number | Mm: the texture is baked larger when its finest detail is narrower than this (0.8); 0 = keep the size, with a warning |
parts | boolean | Each painted area of the recipe's mask as its own 3MF part (false) |
edge_fade | number | Texture stops short of sharp edges by this many mm; 0 = full height to the edge; unset = chosen from the texture size |
keep_colours | boolean | Keep a 3MF's own colours on the same parts of the model (true) |
printer | any | Soften detail finer than the printer can make: true (0.4 mm nozzle, 0.2 mm layers), or {"nozzle": mm, "layer": mm} |
repair | boolean | Fix the model first: small holes, flipped faces, bad triangles (false) |
stamp | object | A name stamp: {"text": "HELLO", "side": "front" | "back" | "left" | "right" | "top" (or "at": [x, y, z] and "normal": [nx, ny, nz]), "height": mm, "depth": mm, "mode": "raised" | "cut", "rotation": deg, "plate": true, "ring": false}; the result's checks say if it sits on a fit surface, faces down too steeply, is too small or runs off |
layers | array | Texture layers on top of the base, up to 8, in order: each a list or short form "TEXTURE[:DEPTH[:cover|add[:FROM-TO]]]" (FROM-TO = a height band in % of the model; none = everywhere) or {"id": ..., "depth": mm, "mode": "cover"|"add", "band": [from, to]}. Painted regions come from a recipe |
mix | object | More textures on the same model (or the short form "LAYOUT:TEXTURE[:CELL]", e.g. "checker:plain:15"): patchwork (cells take turns: {"mode": "patchwork", "layout": "checker" | "stripes" | "bands" | "diagonal" | "diamonds" | "hex" | "brick" | "rings" | "spiral" | "waves" | "dots" | "panels" | "wedges" (slices round a round model's axis), "textures": 1 to 3 patches after the model's own texture, each [{"id": "plain" or a texture id, "params": {"size": mm, ...}}] (3 textures in a checker: two entries), "cell": mm, "grout": mm, "otherDepth": percent (second texture height, 100 = same), "fade": mm (with skip_top: both textures fade out instead of stopping), "soft": mm}), a fade by height ({"mode": "blend", "textures": [...], "from": %, "to": %}) or the custom mixer ({"mode": "combine", "op": "add" | "max" | "mask" | "multiply" | "warp", "textures": [...], "amount": 0..1}). "plain" = smooth. |
{
"name": "texture_model",
"arguments": {
"model_path": "/Users/you/Tessa/demo-cube.stl",
"texture": "leather-pebble",
"out_path": "/Users/you/Tessa/cube-pebble.3mf",
"settings": {
"depth": 0.5
}
}
}
OK: demo-cube.stl textured with leather-pebble (box, 0.5 mm deep, standard) -> /Users/you/Tessa/cube-pebble.3mf (3MF, 0.3 MB) in 6.9 s; 26,748 triangles (slimmed from 533,824, within 0.020 mm); 10 checks ok path: /Users/you/Tessa/cube-pebble.3mf checks: ok Watertight: every edge shared by exactly two faces ok No bad numbers: no NaN or infinite coordinates ok Depth: the surface moved -0.50 to 0.50 mm (asked: 0.5 mm) …
preview_png
Show what a texture looks like: a shaded, flat grey swatch as a PNG image (light from the upper left), returned to you and saved to a file. Quick (under a second). For a card in a real filament colour, use swatch_card.
| Input | Type | What it is |
|---|---|---|
texturerequired | string | Id or number |
out_path | string | .png (default: TEXTURE.png) |
size_mm | number | Swatch width, mm (40) |
px | integer | Width in pixels, 32 to 2048 (400) |
params | object | Size, depth, seed or knobs, e.g. {"size": 6} |
{
"name": "preview_png",
"arguments": {
"texture": "weave-cane",
"out_path": "/Users/you/Tessa/weave-cane.png",
"px": 200
}
}
OK: weave-cane swatch, 40 mm wide, 200 px, saved /Users/you/Tessa/weave-cane.png (29 kB) [and the PNG, as an image]
make_demo_model
Write a demo model STL to try Tessa on when the user has no model of their own (the web app's own): vase (150 mm, hollow and open, a curvy body), cube (30 mm), sphere (an 80 mm ball on a flat base; add a brim), pebble (three twisting lobes), cylinder (a solid 60 x 70 mm cylinder), rolling-pin (a 140 x 45 mm barrel with plain handles, printed upright: use skip_bottom 19 and skip_top 20 to keep the handles plain; the pattern presses into dough reversed) or wonky-pot (a lumpy, leaning 95 mm pot). Returns its path for texture_model.
| Input | Type | What it is |
|---|---|---|
name | vase | cube | sphere | pebble | cylinder | rolling-pin | wonky-pot | Which model (vase) |
out_path | string | .stl (default: demo-NAME.stl) |
{
"name": "make_demo_model",
"arguments": {
"name": "cube"
}
}
OK: demo cube, 12 triangles, saved /Users/you/Tessa/demo-cube.stl
save_recipe
Save a look (a texture with its settings) as a recipe file (.tessa.json), to reuse it on any model in the web app, the command line, Python or texture_model(recipe_path=...). Writes no model.
| Input | Type | What it is |
|---|---|---|
texturerequired | string | Id or number |
out_path | string | .tessa.json (default: TEXTURE.tessa.json) |
settings | object | Look and print settings; anything not given comes from the recipe, else the texture defaults |
knobs | object | The texture's own knobs (texture_info lists them), e.g. {"tall": 0.9} |
settingsEvery field of settings (29)
| Input | Type | What it is |
|---|---|---|
size | number | Cell size mm (classic textures: a scale 0.5..2) |
depth | number | Mm, within the texture's printable range |
rotation | number | Degrees |
seed | integer | — |
skip_top | number | % of the height kept plain at the top |
skip_bottom | number | % of the height kept plain at the bottom |
skip_angle | number | Faces within this many degrees of flat stay plain |
sharpness | number | 0..100, 50 = as designed |
balance | number | -100..100 |
invert | boolean | — |
mapping | auto | box | wrap | field | field-bottom | Auto picks; box / wrap project; field = even spreading on curvy models; field-bottom = even, swirl points at the bottom |
columns | even | straight | Round models: even = cells keep their size and shape (default); straight = one repeat count all the way up (ribs, stripes) |
detail | draft | standard | fine | — |
foot_mm | number | Plain band above the bed (1.5) |
fit_plain | boolean | Keep pockets, holes and grooves plain (true) |
overhang_safe | boolean | No new downward faces past the limit (true) |
overhang_limit | number | Degrees from vertical (45) |
slim | boolean | Slim the file under 950k triangles (true) |
overhang_depth | auto | even | full | Depth on overhangs: auto fades the texture where the model faces down; even = the whole surface at the depth the undersides keep; full = no overhang guard (undersides may need supports or droop; same as overhang_safe false) |
inner_walls | boolean | Texture the inside of an open vessel too (false: plain inside) |
detail_guard | number | Mm: the texture is baked larger when its finest detail is narrower than this (0.8); 0 = keep the size, with a warning |
parts | boolean | Each painted area of the recipe's mask as its own 3MF part (false) |
edge_fade | number | Texture stops short of sharp edges by this many mm; 0 = full height to the edge; unset = chosen from the texture size |
keep_colours | boolean | Keep a 3MF's own colours on the same parts of the model (true) |
printer | any | Soften detail finer than the printer can make: true (0.4 mm nozzle, 0.2 mm layers), or {"nozzle": mm, "layer": mm} |
repair | boolean | Fix the model first: small holes, flipped faces, bad triangles (false) |
stamp | object | A name stamp: {"text": "HELLO", "side": "front" | "back" | "left" | "right" | "top" (or "at": [x, y, z] and "normal": [nx, ny, nz]), "height": mm, "depth": mm, "mode": "raised" | "cut", "rotation": deg, "plate": true, "ring": false}; the result's checks say if it sits on a fit surface, faces down too steeply, is too small or runs off |
layers | array | Texture layers on top of the base, up to 8, in order: each a list or short form "TEXTURE[:DEPTH[:cover|add[:FROM-TO]]]" (FROM-TO = a height band in % of the model; none = everywhere) or {"id": ..., "depth": mm, "mode": "cover"|"add", "band": [from, to]}. Painted regions come from a recipe |
mix | object | More textures on the same model (or the short form "LAYOUT:TEXTURE[:CELL]", e.g. "checker:plain:15"): patchwork (cells take turns: {"mode": "patchwork", "layout": "checker" | "stripes" | "bands" | "diagonal" | "diamonds" | "hex" | "brick" | "rings" | "spiral" | "waves" | "dots" | "panels" | "wedges" (slices round a round model's axis), "textures": 1 to 3 patches after the model's own texture, each [{"id": "plain" or a texture id, "params": {"size": mm, ...}}] (3 textures in a checker: two entries), "cell": mm, "grout": mm, "otherDepth": percent (second texture height, 100 = same), "fade": mm (with skip_top: both textures fade out instead of stopping), "soft": mm}), a fade by height ({"mode": "blend", "textures": [...], "from": %, "to": %}) or the custom mixer ({"mode": "combine", "op": "add" | "max" | "mask" | "multiply" | "warp", "textures": [...], "amount": 0..1}). "plain" = smooth. |
{
"name": "save_recipe",
"arguments": {
"texture": "knit-stockinette",
"out_path": "/Users/you/Tessa/knit.tessa.json",
"settings": {
"depth": 0.8,
"skip_bottom": 5
}
}
}
OK: recipe for knit-stockinette saved /Users/you/Tessa/knit.tessa.json (open it in the web app, `tessa texture --recipe` or texture_model recipe_path)
fit_size
The texture size that closes a whole number of repeats round a length in mm (e.g. a cylinder's circumference, pi x diameter), so the pattern meets itself with no seam. Pass the size to texture_model settings.size.
| Input | Type | What it is |
|---|---|---|
texturerequired | string | Id or number |
length_mmrequired | number | The length to fill, mm (more than 0) |
{
"name": "fit_size",
"arguments": {
"texture": "knit-stockinette",
"length_mm": 188.5
}
}
OK: knit-stockinette size 4.713 mm closes exactly 5 repeats round 188.5 mm
patchwork_partners
Textures that read next to a texture in a patchwork (they differ clearly in strength, size or shape, so the cells show at a glance), strongest contrast first; or, with other, the contrast of one pair. Use before a patchwork mix: twill next to pebble grain reads as noise.
| Input | Type | What it is |
|---|---|---|
texturerequired | string | Id or number |
other | string | A second texture, or "plain" |
limit | integer | How many partners (8) |
{
"name": "patchwork_partners",
"arguments": {
"texture": "knit-stockinette",
"limit": 3
}
}
OK: reads next to knit-stockinette (contrast, 1.0 or more reads): plain 5.02 maker-low-poly 2.73 earth-terraces 2.69
search_filaments
Find real filaments by words (maker, line, colour) and finish, with hex colours from each maker's own data (or marked approximate, with the source). Use the id with swatch_card. Brand names are facts; no affiliation.
| Input | Type | What it is |
|---|---|---|
query | string | Words, e.g. "bambu matte green" |
finish | matte | basic | silk | dual-silk | translucent | wood | marble | glow | — |
pastel | boolean | Pastel colours only |
limit | integer | At most this many (20) |
{
"name": "search_filaments",
"arguments": {
"query": "white",
"finish": "matte",
"limit": 3
}
}
OK: 2 filaments found polymaker-polyterra-pla-muted-white Polymaker PolyTerra PLA Muted White matte #bbada4 https://wiki.polymaker.com/polymaker-products/more-about-our-products/hex-codes-and-transmission-distances polymaker-polyterra-pla-cotton-white Polymaker PolyTerra PLA Cotton White matte #f4efeb https://wiki.polymaker.com/polymaker-products/more-about-our-products/hex-codes-and-transmission-distances
swatch_card
A PNG card showing a 30 mm tile of a texture in a filament colour, lit from the side, or from behind (lit="behind") to preview how it glows with a light inside (thin spots bright, thick spots dark). Saved to a file. For a quick grey look at the texture alone, use preview_png.
| Input | Type | What it is |
|---|---|---|
texturerequired | string | Id or number |
filament | string | A filament id from search_filaments |
colour | string | #rrggbb, when no filament is given |
lit | side | behind | — |
out_path | string | .png (default: TEXTURE-card.png) |
{
"name": "swatch_card",
"arguments": {
"texture": "scales-dragon",
"colour": "#40A874",
"out_path": "/Users/you/Tessa/honeycomb-card.png"
}
}
OK: swatch card for scales-dragon saved /Users/you/Tessa/honeycomb-card.png
make_proof_cube
A 30 mm proof cube as a Bambu 3MF to test-print up to four library textures side by side: one per side wall, each labelled with its catalogue number under it, ready to print standing. Not for the user's own model (that is texture_model).
| Input | Type | What it is |
|---|---|---|
idsrequired | string[] | 1 to 4 texture ids or numbers |
out_path | string | .3mf (default: proof-NUMBERS.3mf) |
colour | string | #rrggbb |
{
"name": "make_proof_cube",
"arguments": {
"ids": [
"knit-stockinette",
"leather-pebble",
"weave-cane",
"scales-dragon"
],
"out_path": "/Users/you/Tessa/proof-cube.3mf"
}
}
OK: proof cube 1, 47, 30, 90, 401786 triangles, watertight True, saved /Users/you/Tessa/proof-cube.3mf (4.9 MB)
patchwork_layouts
The patchwork layouts (several textures on one model, each cell taking its turn): name and what it looks like. Use with texture_model settings.mix or make_patchwork_proof.
{
"name": "patchwork_layouts",
"arguments": {}
}
OK: 13 layouts (2 to 4 textures; the first is the model's own) checker: checkerboard; on a round model the cells go in rings, near-square at every height (2 to 4 textures take turns) stripes: stripes running up the model bands: bands across: horizontal rings on a vase diagonal: diagonal bands diamonds: diamonds (harlequin): a checkerboard turned 45 degrees …
make_patchwork_proof
A patchwork proof print as a Bambu 3MF: 2 to 4 textures (the first is the model's own; "plain" = smooth after it) in one layout on a small proof shape (40 mm cube; a 36 x 45 mm vase for wedges, bands, rings and spiral), made by the same pipeline as texture_model. Returns the path and the checks. To patchwork the user's own model, use texture_model with settings.mix.
| Input | Type | What it is |
|---|---|---|
layoutrequired | checker | stripes | bands | diagonal | diamonds | hex | brick | rings | spiral | waves | dots | panels | wedges | — |
texturesrequired | array | Ids or numbers, or {"id": ..., "params": {"size": mm, ...}} per patch |
shape | cube | vase | — |
cell | number | Cell size, mm |
grout | number | Plain line between cells, mm (0.8) |
soft | number | Soft border, mm (0.4) |
out_path | string | .3mf |
colour | string | #rrggbb |
{
"name": "make_patchwork_proof",
"arguments": {
"layout": "checker",
"textures": [
"knit-stockinette",
"plain"
],
"out_path": "/Users/you/Tessa/checker-proof.3mf"
}
}
OK: tessa-patchwork-proof-cube.stl textured with knit-stockinette (box, 1 mm deep, standard, patchwork checker with plain) -> /Users/you/Tessa/checker-proof.3mf (3MF, 0.6 MB) in 10.9 s; 49,086 triangles (slimmed from 730,318, within 0.020 mm); 9 checks ok
repair_model
Fix a broken model file (STL, OBJ, 3MF) without texturing it: close small holes, make the faces agree, drop flat and duplicate triangles, stitch tiny gaps. Every coordinate stays exactly where it was. Reports in plain words what it fixed and what it could not. (texture_model can repair first too: settings.repair.)
| Input | Type | What it is |
|---|---|---|
model_pathrequired | string | Absolute path of an existing file: the STL, OBJ or 3MF (up to 200 MB) |
out_path | string | .stl or .3mf (default: MODEL-repaired, same type) |
{
"name": "repair_model",
"arguments": {
"model_path": "/Users/you/Tessa/demo-cube.stl"
}
}
OK: Nothing needed fixing path: /Users/you/Tessa/demo-cube-repaired.stl triangles: 12 -> 12 watertight: True
make_seamless_tile
Turn your own picture (PNG, JPEG, WebP; up to 20 MB, 4096 px a side) into a seamless height tile: opposite edges cross-faded, written as a grey PNG plus a 2 x 2 preview that would show any seam. Reports the pixels per mm. Draw it into a .tessa-swatch in the web app to texture a model with it.
| Input | Type | What it is |
|---|---|---|
image_pathrequired | string | Absolute path of an existing file: the picture |
tile_mm | number | Tile width, mm (40) |
band | number | Share of each edge cross-faded, 0.02 to 0.45 (0.12) |
out_path | string | .png (default: PICTURE-seamless.png) |
{
"name": "make_seamless_tile",
"arguments": {
"image_path": "/Users/you/Tessa/weave-cane.png",
"tile_mm": 30
}
}
OK: /Users/you/Tessa/weave-cane-seamless.png (176 x 176) and /Users/you/Tessa/weave-cane-seamless-2x2.png; 5.9 pixels per mm
Core
How it fits together
One Rust core does the work everywhere. The web app runs it as WebAssembly in your browser; Python, the command line and the MCP server run it natively.
| Crate | Its job |
|---|---|
tessa-core | The texture maths and the mesh engine. |
tessa-pipeline | The whole flow for Python, the CLI and MCP. |
tessa-core-wasm | The browser door (the web app). |
tessa-core-wasm-extras | The browser's lazy module: repair, the proof cube, test probes. |
tessa-core-py | The Python door (tessa_core). |
tessa-rs | A small native CLI used by the parity tests. |
The browser door exports 11 functions and classes, among them height, ids, grid, Model. The tests check the core’s heights against the Python reference: within a billionth of a millimetre for the library textures.
Generated from the Tessa code (commit 45eab44): the docstrings, the command line’s own help, the MCP server’s tool definitions and the core’s crates. Every example on this page ran when it was generated. Version 0.1.0. Pricing · Tessa