跳转到主要内容

raygeo.ops.material.spec

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

CylinderStock

A cylindrical (rotary) stock, folded in unrolled space.

The axial coordinate maps to world x in [0, length]; the circumference (arc length) maps to world y in [-pi * diameter / 2, pi * diameter / 2].

diameter

diameter: float

Workpiece diameter in mm.

length

length: float

Axial length in mm.

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.

max_power_watts

max_power_watts: float

Optical output power in watts at full power (0 = unconfigured).

stock

stock: Any

The stock to fold against.

wavelength_nm

wavelength_nm: float

Emission wavelength in nm (0 = unconfigured).

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.