Skip to main content

Microgen logo

Microgen is a Python library designed to facilitate microstructure generation and meshing. Here are its core features:

  • Repeated cells: Generation of lattice structures such as octet trusses and honeycombs.
  • Triply Periodic Minimal Surfaces (TPMS): TPMS-based lattice generation known for favorable physical (mechanical, thermal, ...) properties like low density and large surface area.
  • Virtual composites microstructures: Generation of basic reinforcement geometries, including spheres, cylinders, ellipsoids, and more.
  • 3D Voronoi tessellation: Simulation of granular materials and polycrystalline metals.
  • Meshing: Regular and periodic meshing using Gmsh, remeshing using Mmg.

Generation of 3D objects is achievable through functions that utilize Open CASCADE (via Cadquery) or VTK (using PyVista). Neper offers tools for 3D tessellation, while Gmsh handles the generation of both regular and periodic meshes, with Mmg handling remeshing tasks.

Gyroid TPMS

PyPI package PyPI
Conda forge package Conda
Documentation Documentation
Status Status
Citation DOI
License License
Website Website
Binder Binder

Installation

With pip:

pip install microgen

With conda:

conda install conda-forge::microgen

To modify the sources, clone this repository and install microgen:

git clone https://github.com/3MAH/microgen.git
cd microgen
pip install -e .[all]
pre-commit install

The -e or --editable option allows to modify the sources without having to reinstall the package and [all] installs the optional development dependencies.

Run tests with pytest:

pytest tests -n auto

Examples

Click on the image to be redirected to the corresponding example on Microgen's documentation

Basic shapes

Repeated cells

Triply Periodic Minimal Surfaces (TPMS)

3D operations

Mesh

Metadata

Release files for microgen 1.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for microgen 1.3.2
File Size Uploaded
microgen-1.3.2.tar.gz 66.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for microgen 1.3.2
File Interpreter ABI Platform
microgen-1.3.2-py3-none-any.whl Python 3 none any Details

Total release size: 129.7 kB

Release files / microgen-1.3.2.tar.gz

Download URL microgen-1.3.2.tar.gz
Size 66.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d64874c852a38225159188b2454bf22b9fb18d1ddd12540b0fa7eb4606a77157
BLAKE2b-256 checksum
How to use checksums
c0163d329d38f8bdc907e507575611ec5657871ae08e03dc3cef5e9c8504c8bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.8

Release files / microgen-1.3.2-py3-none-any.whl

Download URL microgen-1.3.2-py3-none-any.whl
Size 63.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5b844f74da87c95bced2130a29f1f2c37c273366a6e83c2f0d66393d64f4b9e6
BLAKE2b-256 checksum
How to use checksums
702ba887a0660292ca2ed0dc8c461afdfab6bbd4b666ac2494934115ffadb363
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.8
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page