Ir al contenido principal

raygeo.ops.material.spec

Fold input types: the stock, the entries, and the grid budget.

FoldEntry

One compute node's contribution to a fold.

effects

effects: list[Any]

The effects this entry contributes.

placement

placement: geo.Matrix

Workpiece-local to world-mm placement of the effects.

source_key

source_key: str

Node key of the source (for provenance).

GridBudget

Resolution budget for stock-grid outputs.

max_px

max_px: int

Per-side pixel cap; px_per_mm is scaled down to fit.

px_per_mm

px_per_mm: float

Requested grid density in pixels per millimetre.

GridSpec

Grid placement of raster outputs in world mm.

origin_mm

origin_mm: tuple[float, float]

World-mm origin of the grid's (0, 0) pixel corner.

px_per_mm

px_per_mm: tuple[float, float]

Grid density in pixels per millimetre (x, y).

size_px

size_px: tuple[int, int]

Grid size in pixels (width, height).

MaterialFoldSpec

Full input to fold_effects.

entries

entries: list[FoldEntry]

Effect-bearing entries, in any order.

grid

grid: GridBudget

Grid budget for raster outputs.

stock

stock: PrismaticStock

The stock to fold against.

PrismaticStock

A prismatic stock: 2D outline extruded over a thickness.

Z convention: top surface at z = 0, bottom at z = -thickness.

polygons

polygons: list[list[tuple[float, float]]]

Stock outline polygons in world mm.

thickness

thickness: float

Stock thickness in mm.