Documentation & page contents

Developer documentation

Architecture

Beforewear is a garment factory. Print-on-demand and personalization reuse a mapped Product. For a new cut, the intended outputs are draped 3D and a tech pack for manufacturing review. Pick an avatar and the cloth. Drape once.

These pages describe the SDK and MCP contract. v1 runs against an in-memory stub. Physics and hosted MCP land later.

The factory

After a Pattern exists, the jobs are the same. How you get that Pattern is the only fork. Color and print are not a second drape.

BlankProduct, or Pattern + Construction. Placements live on Construction — not on panels.
AvatarMHR. Sex, size, a library pose or a custom one.Catalog
ClothMaterial. From the library, or from a swatch. Material assumptions require review.
Physicscompile → arrange → drape. The Run is a blank: UVs, no artwork.
OutAn existing garment in 3D — print-on-demand, personalization, mockups — or a new garment and tech pack for manufacturing review.

Two jobs

A garment you already make, mapped in 3D. Or a new one, from scratch, for technical and manufacturing review.

Existing garment

Map what already exists. A known Product in the library. Then print-on-demand, personalization, mockups reuse that drape: on-avatar, ghost, lay-flat, on-model. Review print fidelity against the supplied artwork.

New garment

Develop a new garment from Pattern and Construction. The 3D asset and tech pack support review with your technical team and manufacturing partner.

Resources

ResourceWhat it is
ProductA library blank. SKU plus Pattern, Construction, and a size chart.
Pattern2D pieces at one size. Import, draft, sketch, photos, or grade from a chart.
ConstructionWhat sews to what, folds, pocket, bands, casing. Printable placements.
BodyThe avatar. MHR. Sex, size, a named pose or a custom pose. SMPL, SMPL-X, and related parametric bodies arrive through NVIDIA SOMA and become a Body. Selected, not sculpted. On-avatar stills use render(..., body="display").
MaterialThe cloth profile. A swatch can guide appearance; physical properties need measurements or explicitly reviewed assumptions.
RunAn immutable job result. Phases: arranged, draped, finished, presented.
MockupA presentation still of that Run: on-avatar, ghost, lay-flat, or on-model.

Artwork binds {placement: uri} from Construction. Placement is not panel.

Jobs

The Python client and the MCP tools are the same contract. Dotted names on the wire; namespaces in the SDK. The jobs are a graph, not a pipeline: inlets seal a blank, tech pack is 2D, physics drapes once, stamps fan out, mockups and cloth in space fork after present, gates loop back.

Factory job graph: pattern inlets feed Pattern and Construction with Body and Material. Techpack.export branches from Pattern and Construction before the Project. Compile, arrange, and drape are the physics spine. After present, mockups and cloth in space fork. Mockups are on-avatar, ghost, flat, or on-model. Motion is space.simulate then space.video.
Expand diagram ↗ · garment.drape does not take artwork. Color and print are children of an immutable blank. Mockups reference the garment’s artwork. Cloth in space continues that cloth off the avatar. The loop is the harness.

How a Pattern arrives

Stamps, not re-drapes

One physics Run, many presented children. Navy and black are colorway.apply. Artwork on an existing garment is graphic.apply. That is more_colorways. Mapping a library Product is dress_blank. Pictures of that garment are mockups.

Mockups

Color and artwork variations can reuse a drape. The intended contract carries the garment’s artwork into presentation views, including generated or photographic scenes. Review delivered imagery against the supplied artwork; the fixture checks do not establish print fidelity.

kindWhat it is
on_avatarA 3D view on the selected catalog avatar.
ghostGhost mannequin. Product shot, no visible human.
flatLay-flat product shot. Not table-cloth physics — that is space.simulate kind=flatlay.
on_modelOn a person. model=generated (identity around garment presentation) or model=photo (a real photograph). Send photo_uri for the latter. No prompts for the print.

garment.render is inspectable catalog views of a Run. mockup.render is the presentation job. See mockups.

Cloth in space

After a draped garment exists, the same cloth continues off the avatar: flat on a table, on a hanger, or a retail fold. space.simulate records frames. space.video encodes those frames. It does not invent in-between cloth. Agents send kind (flatlay, hanger, fold), not solver knobs. This is not a second on-body drape. See in_space.

Hand to manufacturing

A tech pack is the custom-garment handoff. It is a rendering of Pattern + Construction: cover, BOM, operations, points of measure, placements, graded nests. Optional run_id attaches measured POM. format is pdf, json, or dxf. Agents do not send layout knobs. Pair it with garment.export for the 3D. See techpack.

When the factory refuses

Propose–verify. Agents do not raise clearance bounds. They read GateError JSON — gate, phase, witnesses, hint — then pattern.revise or construction.revise. See revise_after_gate.