hertzforge.service.mesh¶
mesh
¶
A geometry as the viz kit draws it: the nodes a triangle or a line uses, and the triangles and lines indexing them.
Functions:
| Name | Description |
|---|---|
triangulate |
Polygons (3 or 4 corners, as |
outline |
The edges of polygons (as |
element_highlights |
Each element of |
element_colors |
The elements in their own colors ( |
drawn_mesh |
(node rows drawn, triangles, lines), the last two indexing the drawn |
places_view |
A geometry with |
sides_view |
A geometry drawn see-through with two sets of places marked through it, each as |
Functions:¶
triangulate
¶
Polygons (3 or 4 corners, as element_cells draws faces and solid
skins) as triangles, fanned from each polygon's first corner.
outline
¶
The edges of polygons (as element_cells draws faces and solid
skins), each pair of corners once whichever face or way round it came:
the outline of every element face, without the diagonals the triangles
add.
element_highlights
¶
Each element of elements (rows of the geometry's elements) as the 3-D view
highlights it alone: (triangles, edges), a flat list of node rows per element, the
triangles fanned as triangulate fans them and the edges each polygon's sides, once,
and a line element's two ends. Built for every element at once, since an element
table's view carries one for each of its rows.
element_colors
¶
The elements in their own colors (elem_color, the palette color_rgb reads), as
element_cells draws them: triangles and lines by node row, and each one's color,
triangle_colors and line_colors (u8 RGB). With drawn, the geometry rows a view's
nodes are (drawn_mesh's first), the rows are places among those.
drawn_mesh
¶
(node rows drawn, triangles, lines), the last two indexing the drawn
nodes. Faces and lines are the drawing of the elements
(viz.geometry.element_cells: a face element by its corners, a solid by
its skin, a line by its two ends). The lines are the line elements and
the outline of every face drawn (outline), so each element's edges show
on the surface as the earlier toolset drew them (Brandon, 2026-11-11). Only
nodes a triangle or a line uses are sent, so a brick model's interior
nodes do not travel; a geometry with no faces or lines sends every
node.
places_view
¶
places_view(geometry: Any, name: str, op: str, params: dict[str, Any], places: list[int], out: set[int], hint: str) -> dict
A geometry with places (node ids) marked through it, as its first rows and those in
out last among them and dim, so a click on one reruns op with it in toggle.
sides_view
¶
sides_view(geometry: Any, name: str, op: str, params: dict[str, Any], picking: tuple[tuple[int, ...], set[int]], other: tuple[tuple[int, ...], set[int]], hint: str, pickable: bool = True) -> dict
A geometry drawn see-through with two sets of places marked through it, each as
(the nodes offered, those held): picking, whose nodes a click toggles in op's
toggle, as the first rows, those held first and the rest dim; then other, drawn in
a second colour and not clicked (pick.others: how many held, how many not). A mate's
two sides: coincident nodes of the two are told apart by which side is picked.