kicad2ems.core.meshes¶
Each solver's discretisation of the board, for the GUI's 3D view:
<name>_mesh_<solver>.npz in the output folder, model mm (y up, z = 0 the bottom
copper), written when the solver prepares (a preview too) or solves.
kind 'grid': x, y, z openEMS's mesh lines
kind 'tris': nodes (n, 3), tris (m, 3)
a surface mesh: mom25d's triangles on each layer; optional
hidden (k, 2): node pairs of edges not drawn (the diagonals
a run merged into quad cells)
A solver may also write the mesh a run solved on as <solver>-run (mom25d-run:
its quad cells), beside the preview's <solver> file; the GUI draws it over the
other.
save(run, 'openems', 'grid', x=..., y=..., z=...)
find(out_dir) -> {solver: path};
segments(path, box) -> (2 k, 3) line segment end points, for drawing
- kicad2ems.core.meshes.counts(path)[source]¶
A one-line size of a mesh file: grid lines, or triangles.
- kicad2ems.core.meshes.find(out_dir)[source]¶
{solver: path} of the mesh files of a results folder (the newest run's name first).
- kicad2ems.core.meshes.save(run, solver, kind, **arrays)[source]¶
A solver's mesh for the 3D view, as <name>_mesh_<solver>.npz (kind 'grid': x, y, z; 'tris': nodes, tris); returns its path.
- kicad2ems.core.meshes.segments(path, box=None, planes=None)[source]¶
A mesh file as line segments (2 k, 3) to draw, model mm. A grid: its x and y lines across the board (box: xmin, ymin, xmax, ymax, z0, z1) on each of `planes` (z, mm: the copper layers; default the box's bottom and top), and its lines on the box's four sides; a surface mesh: the edges of its triangles, each once.