@huukhanhnguyen/types / evaluate/frame
evaluate/frame
ComponentBody
ComponentBody = {
data:ObjectData;flat:boolean;isFlat:boolean;opening:BrepData[]; }
data
data:
ObjectData
flat
flat:
boolean
DECLARED flatness — Component.flat. Wins over isFlat, and when set the WHOLE body (data) is the 2D representation.
isFlat
isFlat:
boolean
INFERRED flatness — the resolved body's bbox has no z extent at the current parameter values. A fallback: it can flip under a slider.
opening
opening:
BrepData[]
GeometryPlacement
GeometryPlacement = {
attributes?:Record<string,unknown>;layer?:string;material?:string;name?:string;transformation:Transformation;visible?:boolean; }
Placement matrix + props for one block placement in a render frame.
attributes?
optionalattributes?:Record<string,unknown>
layer?
optionallayer?:string
material?
optionalmaterial?:string
name?
optionalname?:string
transformation
transformation:
Transformation
visible?
optionalvisible?:boolean
RenderFrameBlock
RenderFrameBlock = {
definition?:string;leaves:ObjectData[];placement:GeometryPlacement; }
definition?
optionaldefinition?:string
leaves
leaves:
ObjectData[]
The placement's shared content, LOCAL to it — the consumer composes placement.transformation itself. N placements of one object hand back the SAME array by reference, so a diff host tessellates it once.
placement
placement:
GeometryPlacement
RenderFrameSlice
RenderFrameSlice = {
blocks:RenderFrameBlock[];id:string;key:string;leaves:ObjectData[];object?:SceneObject; }
blocks
blocks:
RenderFrameBlock[]
id
id:
string
key
key:
string
leaves
leaves:
ObjectData[]
World-space leaves, PRE-BAKE: nested block placements are exploded and their matrices baked into the geometry, but nothing is tessellated — a curve is still a CurveData, a solid still a BrepData. That is what an exact-B-rep consumer needs — a tessellation cannot be un-tessellated — and what keeps attributes readable by a table. A consumer that wants triangles calls render()/tessellateScene() itself.
EVERY kind rides here — curve, brep, mesh, point cloud, text, dimension, hatch, section, light, skeleton. Narrowing this to one kind silently drops the rest of the scene out of the frame.
object?
optionalobject?:SceneObject
Typed object for this slice when the model has an objects[] entry. Leaves stay the flat snapshot; this is the scene-stream handle.
Resolved
Resolved<
T> = {key:string;label?:string;value:T; }
Common envelope for every Model.evaluate* result.
Type Parameters
T
T
key
key:
string
label?
optionallabel?:string
value
value:
T
ScenePull
ScenePull = {
frame:RenderFrameSlice[];slices:Map<string,ObjectData[]> |null; }
Fold slices + render frame — ONE SceneNode resolve produces both. A slice holds the root fold's own value, unbaked: frameFromSlices and modelCombinationFromSlices each derive their own tier from it.
frame
frame:
RenderFrameSlice[]
slices
slices:
Map<string,ObjectData[]> |null