Skip to content
Shapemetry

Model - Entity

API reference for src/nodeMethods/entity on @huukhanhnguyen/model, reachable from ./compute.

See the Guide for the ModelJSON / evaluate pipeline.

API reference

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

applyLabel

function

Stamp entity label / group name (apply* family — renamed from bare name because the method writes .label on leaves, not a free-form name).

applyLabel(entity: Entity, text: string): Entity

applyLocked

function

Stamp the authoring lock (apply* family). A locked entity is immune to every LATER step of the fold it is flowing through — see EntityBase.locked and nodes/lockedFold.ts.

applyLocked(entity: Entity, enabled: number | boolean): Entity

applyPoint

function

Per-entity modifiers (domain "entity"). Each function takes 1 Entity and returns 1 Entity — cardinality invariant. Engine maps over the parent generator's batch.

Collection-level operations (array.*, container) live in entities.ts as generators, NOT here.

applyPoint(tr: Transformation, p: Point$1): Point$1

applyVector

function

applyVector(tr: Transformation, v: Point$1): Point$1

applyVisible

function

Stamp entity visibility (apply* family — renamed from bare visible).

applyVisible(entity: Entity, enabled: number | boolean): Entity

attribute

function

attribute(entity: Entity, key: string, value: unknown): Entity

curveSelfUnion

const

const curveSelfUnion: ((entities: unknown[]) => unknown[]) & { wholeArray: true

entitiesBoundingBox

function

entitiesBoundingBox(entities: Entity[]): BoundingBox | null

flatten

const

const flatten: ((entities: unknown[]) => unknown[]) & { wholeArray: true

flattenToXY

function

flattenToXY(entity: Entity): Entity

flip

function

flip(entity: Entity, plane: Plane): Entity

keepEntities

const

const keepEntities: ((entities: unknown[], keep: unknown) => unknown[]) & { wholeArray: true

layer

function

layer(entity: Entity, name: string): Entity

material

function

material(entity: Entity, name: string): Entity

move

function

move(entity: Entity, vector: Vector$1): Entity

moveMatrix

function

moveMatrix(vector: Vector$1): Transformation

reflectionMatrix

function

reflectionMatrix(plane: Plane): Transformation

resize

const

const resize: ((entities: unknown[], sizeX: number, sizeY: number, sizeZ: number) => unknown[]) & { wholeArray: true

reverse

function

reverse(entity: Entity, enabled?: number | boolean): Entity

rotate

function

rotate(entity: Entity, axis: Axis, degree: number): Entity

rotateMatrix

function

rotateMatrix(axis: Axis, degree: number): Transformation

solidSelfUnion

const

const solidSelfUnion: ((entities: unknown[]) => unknown[]) & { wholeArray: true

transformEntity

function

transformEntity(e: Entity, tr: Transformation): Entity

vertexDelete

const

Delete selected vertices.

const vertexDelete: ((entities: Entity[], filter: unknown) => Entity[]) & { wholeArray: true

vertexMove

const

Move selected vertices — curves (control points) or faces (welded mesh).

const vertexMove: ((entities: Entity[], filter: unknown, vector: number[]) => Entity[]) & { wholeArray: true

vertexRotate

const

Rotate selected vertices about an axis.

const vertexRotate: ((entities: Entity[], filter: unknown, axis: Axis, angle: number) => Entity[]) & { wholeArray: true

vertexScale

const

Scale selected vertices about a center.

const vertexScale: ((entities: Entity[], filter: unknown, center: number[], factor: number) => Entity[]) & { wholeArray: true

view

function

view(entity: Entity, family: string): Entity
Last updated: 📖 1 min readEdit on GitHub