Tessaby The3DG

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 linetessa 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 tessa3d

From a wheel

Given the release wheels? Put both in one folder and install from it.

Terminal
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.

Terminal
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.

quickstart.py
# 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)
Output
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

browse.py
# 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))
Output
['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

heights.py
# 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'
Output
(200, 200) 0.0 0.6
rust

Checks and recipes

checks.py
# 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)
Output
ok Watertight
ok No bad numbers
ok Depth
True

Texture the demo cube

cube.py
# 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)
Output
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
Options for tessa list
OptionWhat it does
--family(knits / weaves / leather / nature / animal / geometric / grip / architectural / tech / maker / organic / decorative / wood / stone / metal / ceramic / knurling / classic)
--idsIds only
--jsonAs JSON
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.

Options for tessa texture
OptionWhat it does
MODELSTL, OBJ or 3MF
--texture, -tId or number
--recipe, -rA .tessa.json saved by the web app (or by --save-recipe)
--swatchYour own tile in place of a texture: a .tessa-swatch file (the web app's drawing pad exports one; docs/swatch-format.md)
-o, --outOutput .stl or .3mf (default: MODEL-TEXTURE.3mf next to the model)
--formatDefault: from --out, else 3mf (stl / 3mf)
--sizeCell size mm (classic textures: a scale)
--depthMm
--rotationDegrees
--seedAnother arrangement (seeded textures)
--skip-top% of the height kept plain at the top
--skip-bottom% of the height kept plain at the bottom
--skip-angleKeep faces within this many degrees of flat plain
--sharpness0..100, 50 = as designed
--balance-100..100
--footPlain band above the bed, mm (1.5)
--overhang-limitDegrees from vertical (45)
--invertSwap raised and sunken
--mixA 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
--stampA 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)
--columnsRound 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-topPatterns 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-guardKeep the finest detail at least this wide by raising the size (0.8; 0 = keep my size, with a warning)
--overhang-depthDepth 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-wallsTexture the inside of an open vessel (a vase, a cup) too; off by default
--printerSoften detail finer than the printer can make (default 0.4,0.2)
--repairFix the model first (holes, flipped faces, bad triangles)
--drop-coloursDon't keep a 3MF's own colours
--edge-fadeTexture stops short of sharp edges by this many mm (0 = full height to the edge)
--layerA texture layer on top (up to 8, repeatable); FROM-TO = a height band in % of the model
--partsEach painted area of the mask as its own 3MF part
--no-fit-plainTexture pockets and holes too
--no-overhang-safeAllow new downward faces past --overhang-limit (may need supports)
--no-slimDon't slim the file under 950k triangles
--param, -pThe texture's own knobs: name=value, e.g. -p tall=0.9
--unitsThe model file's unit (default: the recipe's, a 3MF's own, else mm) (mm / cm / in / m)
--colour, --color3MF filament colour #rrggbb
--titleThe 3MF's object name
--generic, --no-bambuA Generic 3MF for any slicer (PrusaSlicer, OrcaSlicer, Cura): core spec only, no Bambu Studio settings, every part in place
--save-recipeAlso write the recipe used (opens in the web app)
--jsonThe full report as JSON
-v, --verboseList the checks
tessa repairFix a broken model (STL, OBJ, 3MF): close small holes, flipped faces, bad triangles; coordinates stay exactly where they were
Options for tessa repair
OptionWhat it does
MODELSTL, 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
Options for tessa mcp
OptionWhat it does
--rootThe 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)
Options for tessa mcp-config
OptionWhat it does
--client(claude-code / claude-desktop / cursor / vscode / all)
--rootThe folder the server may write to (~/Tessa)
--jsonThe snippets as JSON
tessa infoOne texture: parameters, ranges, notes
Options for tessa info
OptionWhat it does
TEXTUREId or number
--jsonAs JSON
tessa cubeA test cube (STL + Bambu 3MF), the texture round all four sides
Options for tessa cube
OptionWhat it does
TEXTUREId or number
--sizeCube edge, mm (25)
--depthTexture depth, mm (within its printable range)
--resMesh step, mm (0.2)
--outOutput folder
--templateA 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)
Options for tessa demo
OptionWhat 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)
Options for tessa patchwork
OptionWhat it does
LAYOUTChecker, stripes, bands, ... (--list shows them all)
TEXTURESThe first is the model's own; plain = smooth
--shapeThe proof shape (default: the one the layout suits) (cube / vase)
--cellCell size, mm
--groutPlain line between cells, mm (0.8)
--softSoft border, mm (0.4)
--colour3MF filament colour #rrggbb
-o, --out.3mf to write
--listList the layouts
--generic, --no-bambuA Generic 3MF for any slicer, no Bambu Studio settings
tessa renderA shaded preview PNG
Options for tessa render
OptionWhat it does
TEXTUREId or number
--onWhat to show it on (swatch) (swatch / cube / cylinder / sphere / vase / head)
--pxWidth in pixels (900)
--out.png to write (default: TEXTURE.png, or TEXTURE-SHAPE.png with --on)
--param, -pName=value, e.g. -p size=6 -p depth=0.8
tessa proofProof cubes: 4 textures a cube, laid out on Bambu plates
Options for tessa proof
OptionWhat it does
--outOutput folder (tessa-proofs)
--sizeCube edge, mm (30)
--per-plateCubes per plate (25)
--resMesh step, mm (0.25)
--templateA Bambu-saved .3mf to copy printer and filament settings from (needed for the all-plates project)
--familyOnly these families
--texturesOnly 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.

Terminal
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”.

mcpServersPrefer to edit the file yourself? The JSON for Claude Desktop and Cursor
claude_desktop_config.json
{
  "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_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.

Inputs for list_textures
InputTypeWhat it is
familystringOnly this family: knits, weaves, leather, nature, animal, geometric, grip, architectural, tech, maker, organic, decorative, wood, stone, metal, ceramic, knurling, classic
limitintegerAt most this many
call
{
  "name": "list_textures",
  "arguments": {
    "family": "leather",
    "limit": 3
  }
}
Output
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.

Inputs for search_textures
InputTypeWhat it is
queryrequiredstringA few words, e.g. "basket weave"
familystringOnly this family (see list_textures)
limitintegerAt most this many
call
{
  "name": "search_textures",
  "arguments": {
    "query": "knit",
    "limit": 3
  }
}
Output
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.

Inputs for texture_info
InputTypeWhat it is
texturerequiredstringId (e.g. "knit-stockinette") or catalogue number (e.g. "12")
call
{
  "name": "texture_info",
  "arguments": {
    "texture": "knit-stockinette"
  }
}
Output
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.

Inputs for texture_model
InputTypeWhat it is
model_pathrequiredstringAbsolute path of an existing file: the STL, OBJ or 3MF to texture (up to 200 MB)
texturestringId or number (or give recipe_path / swatch_path instead)
out_pathstring.stl or .3mf to write, inside the folder the server may write to (default: MODEL-TEXTURE.3mf there)
recipe_pathstringA .tessa.json saved by the web app or save_recipe
swatch_pathstringYour own tile in place of a texture: a .tessa-swatch file (the web app's drawing pad exports one; versions 1 and 2)
settingsobjectLook and print settings; anything not given comes from the recipe, else the texture defaults
knobsobjectThe texture's own knobs (texture_info lists them), e.g. {"tall": 0.9}
unitsmm | cm | in | mThe model file's unit (default mm)
colourstring3MF filament colour #rrggbb
save_recipestringAlso write the recipe used to this .tessa.json path
settingsEvery field of settings (29)
The fields of settings for texture_model
InputTypeWhat it is
sizenumberCell size mm (classic textures: a scale 0.5..2)
depthnumberMm, within the texture's printable range
rotationnumberDegrees
seedinteger—
skip_topnumber% of the height kept plain at the top
skip_bottomnumber% of the height kept plain at the bottom
skip_anglenumberFaces within this many degrees of flat stay plain
sharpnessnumber0..100, 50 = as designed
balancenumber-100..100
invertboolean—
mappingauto | box | wrap | field | field-bottomAuto picks; box / wrap project; field = even spreading on curvy models; field-bottom = even, swirl points at the bottom
columnseven | straightRound models: even = cells keep their size and shape (default); straight = one repeat count all the way up (ribs, stripes)
detaildraft | standard | fine—
foot_mmnumberPlain band above the bed (1.5)
fit_plainbooleanKeep pockets, holes and grooves plain (true)
overhang_safebooleanNo new downward faces past the limit (true)
overhang_limitnumberDegrees from vertical (45)
slimbooleanSlim the file under 950k triangles (true)
overhang_depthauto | even | fullDepth 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_wallsbooleanTexture the inside of an open vessel too (false: plain inside)
detail_guardnumberMm: the texture is baked larger when its finest detail is narrower than this (0.8); 0 = keep the size, with a warning
partsbooleanEach painted area of the recipe's mask as its own 3MF part (false)
edge_fadenumberTexture stops short of sharp edges by this many mm; 0 = full height to the edge; unset = chosen from the texture size
keep_coloursbooleanKeep a 3MF's own colours on the same parts of the model (true)
printeranySoften detail finer than the printer can make: true (0.4 mm nozzle, 0.2 mm layers), or {"nozzle": mm, "layer": mm}
repairbooleanFix the model first: small holes, flipped faces, bad triangles (false)
stampobjectA 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
layersarrayTexture 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
mixobjectMore 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.
call
{
  "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
    }
  }
}
Output
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.

Inputs for preview_png
InputTypeWhat it is
texturerequiredstringId or number
out_pathstring.png (default: TEXTURE.png)
size_mmnumberSwatch width, mm (40)
pxintegerWidth in pixels, 32 to 2048 (400)
paramsobjectSize, depth, seed or knobs, e.g. {"size": 6}
call
{
  "name": "preview_png",
  "arguments": {
    "texture": "weave-cane",
    "out_path": "/Users/you/Tessa/weave-cane.png",
    "px": 200
  }
}
Output
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.

Inputs for make_demo_model
InputTypeWhat it is
namevase | cube | sphere | pebble | cylinder | rolling-pin | wonky-potWhich model (vase)
out_pathstring.stl (default: demo-NAME.stl)
call
{
  "name": "make_demo_model",
  "arguments": {
    "name": "cube"
  }
}
Output
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.

Inputs for save_recipe
InputTypeWhat it is
texturerequiredstringId or number
out_pathstring.tessa.json (default: TEXTURE.tessa.json)
settingsobjectLook and print settings; anything not given comes from the recipe, else the texture defaults
knobsobjectThe texture's own knobs (texture_info lists them), e.g. {"tall": 0.9}
settingsEvery field of settings (29)
The fields of settings for save_recipe
InputTypeWhat it is
sizenumberCell size mm (classic textures: a scale 0.5..2)
depthnumberMm, within the texture's printable range
rotationnumberDegrees
seedinteger—
skip_topnumber% of the height kept plain at the top
skip_bottomnumber% of the height kept plain at the bottom
skip_anglenumberFaces within this many degrees of flat stay plain
sharpnessnumber0..100, 50 = as designed
balancenumber-100..100
invertboolean—
mappingauto | box | wrap | field | field-bottomAuto picks; box / wrap project; field = even spreading on curvy models; field-bottom = even, swirl points at the bottom
columnseven | straightRound models: even = cells keep their size and shape (default); straight = one repeat count all the way up (ribs, stripes)
detaildraft | standard | fine—
foot_mmnumberPlain band above the bed (1.5)
fit_plainbooleanKeep pockets, holes and grooves plain (true)
overhang_safebooleanNo new downward faces past the limit (true)
overhang_limitnumberDegrees from vertical (45)
slimbooleanSlim the file under 950k triangles (true)
overhang_depthauto | even | fullDepth 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_wallsbooleanTexture the inside of an open vessel too (false: plain inside)
detail_guardnumberMm: the texture is baked larger when its finest detail is narrower than this (0.8); 0 = keep the size, with a warning
partsbooleanEach painted area of the recipe's mask as its own 3MF part (false)
edge_fadenumberTexture stops short of sharp edges by this many mm; 0 = full height to the edge; unset = chosen from the texture size
keep_coloursbooleanKeep a 3MF's own colours on the same parts of the model (true)
printeranySoften detail finer than the printer can make: true (0.4 mm nozzle, 0.2 mm layers), or {"nozzle": mm, "layer": mm}
repairbooleanFix the model first: small holes, flipped faces, bad triangles (false)
stampobjectA 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
layersarrayTexture 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
mixobjectMore 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.
call
{
  "name": "save_recipe",
  "arguments": {
    "texture": "knit-stockinette",
    "out_path": "/Users/you/Tessa/knit.tessa.json",
    "settings": {
      "depth": 0.8,
      "skip_bottom": 5
    }
  }
}
Output
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.

Inputs for fit_size
InputTypeWhat it is
texturerequiredstringId or number
length_mmrequirednumberThe length to fill, mm (more than 0)
call
{
  "name": "fit_size",
  "arguments": {
    "texture": "knit-stockinette",
    "length_mm": 188.5
  }
}
Output
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.

Inputs for patchwork_partners
InputTypeWhat it is
texturerequiredstringId or number
otherstringA second texture, or "plain"
limitintegerHow many partners (8)
call
{
  "name": "patchwork_partners",
  "arguments": {
    "texture": "knit-stockinette",
    "limit": 3
  }
}
Output
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.

Inputs for search_filaments
InputTypeWhat it is
querystringWords, e.g. "bambu matte green"
finishmatte | basic | silk | dual-silk | translucent | wood | marble | glow—
pastelbooleanPastel colours only
limitintegerAt most this many (20)
call
{
  "name": "search_filaments",
  "arguments": {
    "query": "white",
    "finish": "matte",
    "limit": 3
  }
}
Output
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.

Inputs for swatch_card
InputTypeWhat it is
texturerequiredstringId or number
filamentstringA filament id from search_filaments
colourstring#rrggbb, when no filament is given
litside | behind—
out_pathstring.png (default: TEXTURE-card.png)
call
{
  "name": "swatch_card",
  "arguments": {
    "texture": "scales-dragon",
    "colour": "#40A874",
    "out_path": "/Users/you/Tessa/honeycomb-card.png"
  }
}
Output
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).

Inputs for make_proof_cube
InputTypeWhat it is
idsrequiredstring[]1 to 4 texture ids or numbers
out_pathstring.3mf (default: proof-NUMBERS.3mf)
colourstring#rrggbb
call
{
  "name": "make_proof_cube",
  "arguments": {
    "ids": [
      "knit-stockinette",
      "leather-pebble",
      "weave-cane",
      "scales-dragon"
    ],
    "out_path": "/Users/you/Tessa/proof-cube.3mf"
  }
}
Output
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.

call
{
  "name": "patchwork_layouts",
  "arguments": {}
}
Output
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.

Inputs for make_patchwork_proof
InputTypeWhat it is
layoutrequiredchecker | stripes | bands | diagonal | diamonds | hex | brick | rings | spiral | waves | dots | panels | wedges—
texturesrequiredarrayIds or numbers, or {"id": ..., "params": {"size": mm, ...}} per patch
shapecube | vase—
cellnumberCell size, mm
groutnumberPlain line between cells, mm (0.8)
softnumberSoft border, mm (0.4)
out_pathstring.3mf
colourstring#rrggbb
call
{
  "name": "make_patchwork_proof",
  "arguments": {
    "layout": "checker",
    "textures": [
      "knit-stockinette",
      "plain"
    ],
    "out_path": "/Users/you/Tessa/checker-proof.3mf"
  }
}
Output
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.)

Inputs for repair_model
InputTypeWhat it is
model_pathrequiredstringAbsolute path of an existing file: the STL, OBJ or 3MF (up to 200 MB)
out_pathstring.stl or .3mf (default: MODEL-repaired, same type)
call
{
  "name": "repair_model",
  "arguments": {
    "model_path": "/Users/you/Tessa/demo-cube.stl"
  }
}
Output
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.

Inputs for make_seamless_tile
InputTypeWhat it is
image_pathrequiredstringAbsolute path of an existing file: the picture
tile_mmnumberTile width, mm (40)
bandnumberShare of each edge cross-faded, 0.02 to 0.45 (0.12)
out_pathstring.png (default: PICTURE-seamless.png)
call
{
  "name": "make_seamless_tile",
  "arguments": {
    "image_path": "/Users/you/Tessa/weave-cane.png",
    "tile_mm": 30
  }
}
Output
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.

tessa-coretexture maths + mesh engine (Rust)
WebAssemblythe web app, in your browser
tessa_core (Python)tessa3d, the CLI, the MCP server
Same model + same recipe → the same STL, byte for byte, through every door.
The core’s crates
CrateIts job
tessa-coreThe texture maths and the mesh engine.
tessa-pipelineThe whole flow for Python, the CLI and MCP.
tessa-core-wasmThe browser door (the web app).
tessa-core-wasm-extrasThe browser's lazy module: repair, the proof cube, test probes.
tessa-core-pyThe Python door (tessa_core).
tessa-rsA 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