morphogen.io.geometry

Explicit (“vector”) geometry: JSON descriptions, CSV tables and Gmsh scripts.

morphogen.io.geometry.CAP_ENLARGEMENT = 0.01

Relative enlargement of the spheres closing round-capped cylinders in Gmsh scripts.

morphogen.io.geometry.write_json(path, micro: Microstructure) → Path[source]

Full description of a realization; read_json() restores it exactly.

morphogen.io.geometry.read_json(path) → Microstructure[source]

A microstructure read from a JSON file (from_dict()).

morphogen.io.geometry.write_csv(path, micro: Microstructure) → list[Path][source]

Tables of primitives or cells: <stem>_spheres.csv, <stem>_segments.csv, <stem>_cells.csv (only the relevant ones are written).

morphogen.io.geometry.write_geo(path, micro: PrimitiveUnion, *, phase: int = 1, mesh_size: float | None = None)[source]

Gmsh (OpenCASCADE) script building phase 1 (the union of the primitives clipped by the box) or phase 0 (the box minus the union), for conforming tetrahedral meshing with gmsh -3 file.geo. Gmsh is an external program (GPL); nothing is linked.