Skip to content
Shapemetry

Model - OBJ

API reference for src/export/obj, src/import/obj on @huukhanhnguyen/model, reachable from ..

See the Guide for the ModelJSON / evaluate pipeline.

API reference

Signatures are generated from the live package .d.ts - not hand-written.

entitiesToObj

function

Pre-bake Entity → OBJ. meshEntity faces emit as n-gon f lines (design topology); faceEntity tessellates to triangles via render(), then scene emit.

entitiesToObj(entities: Entity[], options?: ObjOptions): ObjResult

importObjEntities

function

importObjEntities(text: string): ImportedEntities

sceneToObj

function

A render frame (Model.sceneFrame()) → OBJ. Same bake law as sceneToDxf: slice leaves are world-space; block placement matrices bake into each leaf.

sceneToObj(frame: RenderFrameSlice[], options?: ObjOptions): ObjResult
Last updated: 📖 1 min readEdit on GitHub