Skip to main content

Module cam_sim

Module cam_sim 

Source
Expand description

CAM simulation player rendering (lane C17, row 2): the viewport overlay groups of the simulated stock (with an optional deviation colour map and its legend), the tool with shank and holder at a scrub pose along any tool axis, and collision / gouge markers. Pure functions over the brep_cam payloads; the panel in BREP_app pushes the groups through WidgetRegistry::set_overlay_json.

Structs§

Marker
A collision or gouge marker.

Constants§

BELOW_PART_COLOR
COLLISION_COLOR
Marker colours.
EXCESS_COLOR
EXCESS_HIGH_COLOR
Remaining-stock colours beyond the deviation ones: excess far above the tolerance, and stock below the part (never attributed to a face).
GOUGE_COLOR
GOUGE_MARK_COLOR
MARKS_GROUP
STOCK_COLOR
Stock surface colour (no deviation map).
STOCK_GROUP
Overlay group names.
TOOL_GROUP
WITHIN_COLOR
Deviation colours: within tolerance, excess stock, gouge.

Functions§

deviation_color
Colour of a deviation value: blended toward the class colour by how far it sits beyond the tolerance (saturated at scale beyond it).
deviation_legend
The legend of a deviation map: stops from the largest gouge to the largest excess with their colours, and the tolerance.
marks_group
The markers as a point group; none removes the group.
remaining_color
Remaining-stock bands, by signed remaining material v (mm) and the operation tolerance tol: gouge red below -tol, within green in ±tol, excess blue up to 10·tol, yellow above (and where the part is out of reach).
remaining_group
The stock surface coloured by remaining material, vertex by vertex (see remaining_color), in MODEL coordinates. An empty mesh removes the group.
remaining_legend
The remaining-stock legend: the four bands with their edges in mm and colours, the tolerance, the vertex counts per class and per band, and the largest finite excess and the deepest gouge.
stock_group
The stock surface as a triangle overlay group in MODEL coordinates (to_model is the setup’s machine-to-model transform). With a deviation map each vertex takes the colour of the column under it; without one the stock colour. An empty mesh removes the group.
stock_stl
ASCII STL of the stock mesh in MODEL coordinates.
tool_group
The tool’s wireframe (cutting part, shank, holder in their colours) with its tip at tip along the unit axis, in machine coordinates, mapped to the model by to_model.