microgen


Namemicrogen JSON
Version 1.1.0 PyPI version JSON
download
home_pageNone
SummaryMicrostructure generation and meshing
upload_time2024-03-26 16:59:35
maintainerNone
docs_urlNone
authorNone
requires_python<3.12,>=3.8
licenseGPLv3
keywords microstructure lattice periodic tpms mesh
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
    <img src="https://github.com/3MAH/microgen/blob/main/docs/_static/microgen.png?raw=true" alt="Microgen logo" width="100%"/>
</p>

**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.

<p align="center">
    <img src="https://raw.githubusercontent.com/3MAH/microgen/main/docs/_static/gyroid.gif" alt="Gyroid" width="49%"/>
    <img src="https://raw.githubusercontent.com/3MAH/microgen/main/docs/_static/fischerKoch.gif" alt="TPMS" width="49%"/>
</p>

|        |            |
| -------------- | ---------------- |
| PyPI package   | [![PyPI](https://badge.fury.io/py/microgen.svg)](https://pypi.org/project/microgen/) |
| Conda package  | [![Conda](https://anaconda.org/set3mah/microgen/badges/version.svg)](https://conda.anaconda.org/set3mah/microgen) |
| Documentation  | [![Documentation](https://readthedocs.org/projects/microgen/badge/?version=latest)](https://microgen.readthedocs.io/en/latest/?badge=latest) |
| Status         | [![Status](https://github.com/3MAH/microgen/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/3MAH/microgen) |
| Citation       | [![DOI](https://zenodo.org/badge/380437028.svg)](https://zenodo.org/badge/latestdoi/380437028) |
| License        | [![License](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) |
| Website        | [![Website](https://img.shields.io/badge/website-3MAH-blue)](https://3mah.github.io/) |
| Binder         | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/3MAH/microgen/HEAD?urlpath=lab%2Ftree%2Fexamples%2Fjupyter_notebooks) |

## Installation

With pip:

```bash
pip install microgen
```

With conda:

```bash
conda install -c conda-forge -c set3mah microgen
```

-------------------------------------------------------------------------------------------------------

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

```bash
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

<a href="https://microgen.readthedocs.io/en/latest/examples/basic_shapes.html#basic-shapes">
    <img src="https://raw.githubusercontent.com/3MAH/microgen/main/docs/_static/examples/shapes.png" height="250">
</a>
<a href="https://microgen.readthedocs.io/en/latest/examples/basic_shapes.html#platon-polyhedra">
    <img src="https://raw.githubusercontent.com/3MAH/microgen/main/docs/_static/examples/platon.png" height="250">
</a>

### Repeated cells

<a href="https://microgen.readthedocs.io/en/latest/examples/lattices.html#octet-truss">
    <img src="https://raw.githubusercontent.com/3MAH/microgen/main/docs/_static/examples/octettruss.png" height="250">
</a>
<a href="https://microgen.readthedocs.io/en/latest/examples/lattices.html#honeycomb">
    <img src="https://raw.githubusercontent.com/3MAH/microgen/main/docs/_static/examples/honeycomb.png" height="250">
</a>

### Triply Periodic Minimal Surfaces (TPMS)

<a href="https://microgen.readthedocs.io/en/latest/examples/tpms.html#gyroid">
    <img src="https://raw.githubusercontent.com/3MAH/microgen/main/docs/_static/examples/gyroid.png"height="250"></a>
<a href="https://microgen.readthedocs.io/en/latest/examples/tpms.html#tpms-available">
    <img src="https://raw.githubusercontent.com/3MAH/microgen/main/docs/_static/examples/tpms.png" height="250"></a>
<a href="https://microgen.readthedocs.io/en/latest/examples/tpms.html#spherical-gyroid">
    <img src="https://raw.githubusercontent.com/3MAH/microgen/main/docs/_static/examples/tpms_sphere.png" height="250">
</a>
<a href="https://microgen.readthedocs.io/en/latest/examples/tpms.html#shell">
    <img src="https://raw.githubusercontent.com/3MAH/microgen/main/docs/_static/examples/tpms_shell.png" height="250">
</a>

### 3D operations

<a href="https://microgen.readthedocs.io/en/latest/examples/3d_operations.html#repeating-unit-geometry">
    <img src="https://raw.githubusercontent.com/3MAH/microgen/main/docs/_static/examples/repeated_geometry.png" height="250">
</a>
<a href="https://microgen.readthedocs.io/en/latest/examples/3d_operations.html#raster-ellipsoid">
    <img src="https://raw.githubusercontent.com/3MAH/microgen/main/docs/_static/examples/rasterEllipsoid.png" height="250">
</a>
<a href="https://microgen.readthedocs.io/en/latest/examples/3d_operations.html#voronoi">
    <img src="https://raw.githubusercontent.com/3MAH/microgen/main/docs/_static/examples/Voronoi.png" height="250">
</a>
<a href="https://microgen.readthedocs.io/en/latest/examples/3d_operations.html#voronoi-gyroid">
    <img src="https://raw.githubusercontent.com/3MAH/microgen/main/docs/_static/examples/Gyroid-voro.png" height="250">
</a>

### Mesh

<a href="https://microgen.readthedocs.io/en/latest/examples/mesh.html#id1">
    <img src="https://raw.githubusercontent.com/3MAH/microgen/main/docs/_static/examples/Mesh.png" height="250">
</a>
<a href="https://microgen.readthedocs.io/en/latest/examples/mesh.html#periodic-mesh">
    <img src="https://raw.githubusercontent.com/3MAH/microgen/main/docs/_static/examples/meshPeriodic.png" height="250">
</a>
<a href="https://microgen.readthedocs.io/en/latest/examples/mesh.html#mmg">
    <img src="https://raw.githubusercontent.com/3MAH/microgen/main/docs/_static/examples/mmg.png" height="250">
</a>
<a href="https://microgen.readthedocs.io/en/latest/examples/mesh.html#mmg-voronoi">
    <img src="https://raw.githubusercontent.com/3MAH/microgen/main/docs/_static/examples/mmg-voro.png" height="250">
</a>
<a href="https://microgen.readthedocs.io/en/latest/examples/mesh.html#periodic-remeshing">
    <img src="https://raw.githubusercontent.com/3MAH/microgen/main/docs/_static/examples/remeshed_mesh.png" height="250">
</a>

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "microgen",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.12,>=3.8",
    "maintainer_email": null,
    "keywords": "microstructure, lattice, periodic, TPMS, mesh",
    "author": null,
    "author_email": "3MAH <set3mah@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/0f/8e/060ef1de5d4d3335dfda41da8902e87ca0db2fdee17b2fa8788dbd9fb47a/microgen-1.1.0.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\n    <img src=\"https://github.com/3MAH/microgen/blob/main/docs/_static/microgen.png?raw=true\" alt=\"Microgen logo\" width=\"100%\"/>\n</p>\n\n**Microgen** is a Python library designed to facilitate microstructure generation and meshing. Here are its core features:\n\n- **Repeated cells**: Generation of lattice structures such as octet trusses and honeycombs.\n- **Triply Periodic Minimal Surfaces (TPMS)**: TPMS-based lattice generation known for favorable physical (mechanical, thermal, ...) properties like low density and large surface area.\n- **Virtual composites microstructures**: Generation of basic reinforcement geometries, including spheres, cylinders, ellipsoids, and more.\n- **3D Voronoi tessellation**: Simulation of granular materials and polycrystalline metals.\n- **Meshing**: Regular and **periodic** meshing using Gmsh, **remeshing** using Mmg.\n\nGeneration 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.\n\n<p align=\"center\">\n    <img src=\"https://raw.githubusercontent.com/3MAH/microgen/main/docs/_static/gyroid.gif\" alt=\"Gyroid\" width=\"49%\"/>\n    <img src=\"https://raw.githubusercontent.com/3MAH/microgen/main/docs/_static/fischerKoch.gif\" alt=\"TPMS\" width=\"49%\"/>\n</p>\n\n|        |            |\n| -------------- | ---------------- |\n| PyPI package   | [![PyPI](https://badge.fury.io/py/microgen.svg)](https://pypi.org/project/microgen/) |\n| Conda package  | [![Conda](https://anaconda.org/set3mah/microgen/badges/version.svg)](https://conda.anaconda.org/set3mah/microgen) |\n| Documentation  | [![Documentation](https://readthedocs.org/projects/microgen/badge/?version=latest)](https://microgen.readthedocs.io/en/latest/?badge=latest) |\n| Status         | [![Status](https://github.com/3MAH/microgen/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/3MAH/microgen) |\n| Citation       | [![DOI](https://zenodo.org/badge/380437028.svg)](https://zenodo.org/badge/latestdoi/380437028) |\n| License        | [![License](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) |\n| Website        | [![Website](https://img.shields.io/badge/website-3MAH-blue)](https://3mah.github.io/) |\n| Binder         | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/3MAH/microgen/HEAD?urlpath=lab%2Ftree%2Fexamples%2Fjupyter_notebooks) |\n\n## Installation\n\nWith pip:\n\n```bash\npip install microgen\n```\n\nWith conda:\n\n```bash\nconda install -c conda-forge -c set3mah microgen\n```\n\n-------------------------------------------------------------------------------------------------------\n\nTo modify the sources, clone this repository and install microgen:\n\n```bash\ngit clone https://github.com/3MAH/microgen.git\ncd microgen\npip install -e .[all]\npre-commit install\n```\n\nThe `-e` or `--editable` option allows to modify the sources without having to reinstall the package and `[all]` installs the optional development dependencies.\n\n\nRun tests with pytest:\n```\npytest tests -n auto\n```\n\n## Examples\n\nClick on the image to be redirected to the corresponding example on Microgen's documentation\n\n### Basic shapes\n\n<a href=\"https://microgen.readthedocs.io/en/latest/examples/basic_shapes.html#basic-shapes\">\n    <img src=\"https://raw.githubusercontent.com/3MAH/microgen/main/docs/_static/examples/shapes.png\" height=\"250\">\n</a>\n<a href=\"https://microgen.readthedocs.io/en/latest/examples/basic_shapes.html#platon-polyhedra\">\n    <img src=\"https://raw.githubusercontent.com/3MAH/microgen/main/docs/_static/examples/platon.png\" height=\"250\">\n</a>\n\n### Repeated cells\n\n<a href=\"https://microgen.readthedocs.io/en/latest/examples/lattices.html#octet-truss\">\n    <img src=\"https://raw.githubusercontent.com/3MAH/microgen/main/docs/_static/examples/octettruss.png\" height=\"250\">\n</a>\n<a href=\"https://microgen.readthedocs.io/en/latest/examples/lattices.html#honeycomb\">\n    <img src=\"https://raw.githubusercontent.com/3MAH/microgen/main/docs/_static/examples/honeycomb.png\" height=\"250\">\n</a>\n\n### Triply Periodic Minimal Surfaces (TPMS)\n\n<a href=\"https://microgen.readthedocs.io/en/latest/examples/tpms.html#gyroid\">\n    <img src=\"https://raw.githubusercontent.com/3MAH/microgen/main/docs/_static/examples/gyroid.png\"height=\"250\"></a>\n<a href=\"https://microgen.readthedocs.io/en/latest/examples/tpms.html#tpms-available\">\n    <img src=\"https://raw.githubusercontent.com/3MAH/microgen/main/docs/_static/examples/tpms.png\" height=\"250\"></a>\n<a href=\"https://microgen.readthedocs.io/en/latest/examples/tpms.html#spherical-gyroid\">\n    <img src=\"https://raw.githubusercontent.com/3MAH/microgen/main/docs/_static/examples/tpms_sphere.png\" height=\"250\">\n</a>\n<a href=\"https://microgen.readthedocs.io/en/latest/examples/tpms.html#shell\">\n    <img src=\"https://raw.githubusercontent.com/3MAH/microgen/main/docs/_static/examples/tpms_shell.png\" height=\"250\">\n</a>\n\n### 3D operations\n\n<a href=\"https://microgen.readthedocs.io/en/latest/examples/3d_operations.html#repeating-unit-geometry\">\n    <img src=\"https://raw.githubusercontent.com/3MAH/microgen/main/docs/_static/examples/repeated_geometry.png\" height=\"250\">\n</a>\n<a href=\"https://microgen.readthedocs.io/en/latest/examples/3d_operations.html#raster-ellipsoid\">\n    <img src=\"https://raw.githubusercontent.com/3MAH/microgen/main/docs/_static/examples/rasterEllipsoid.png\" height=\"250\">\n</a>\n<a href=\"https://microgen.readthedocs.io/en/latest/examples/3d_operations.html#voronoi\">\n    <img src=\"https://raw.githubusercontent.com/3MAH/microgen/main/docs/_static/examples/Voronoi.png\" height=\"250\">\n</a>\n<a href=\"https://microgen.readthedocs.io/en/latest/examples/3d_operations.html#voronoi-gyroid\">\n    <img src=\"https://raw.githubusercontent.com/3MAH/microgen/main/docs/_static/examples/Gyroid-voro.png\" height=\"250\">\n</a>\n\n### Mesh\n\n<a href=\"https://microgen.readthedocs.io/en/latest/examples/mesh.html#id1\">\n    <img src=\"https://raw.githubusercontent.com/3MAH/microgen/main/docs/_static/examples/Mesh.png\" height=\"250\">\n</a>\n<a href=\"https://microgen.readthedocs.io/en/latest/examples/mesh.html#periodic-mesh\">\n    <img src=\"https://raw.githubusercontent.com/3MAH/microgen/main/docs/_static/examples/meshPeriodic.png\" height=\"250\">\n</a>\n<a href=\"https://microgen.readthedocs.io/en/latest/examples/mesh.html#mmg\">\n    <img src=\"https://raw.githubusercontent.com/3MAH/microgen/main/docs/_static/examples/mmg.png\" height=\"250\">\n</a>\n<a href=\"https://microgen.readthedocs.io/en/latest/examples/mesh.html#mmg-voronoi\">\n    <img src=\"https://raw.githubusercontent.com/3MAH/microgen/main/docs/_static/examples/mmg-voro.png\" height=\"250\">\n</a>\n<a href=\"https://microgen.readthedocs.io/en/latest/examples/mesh.html#periodic-remeshing\">\n    <img src=\"https://raw.githubusercontent.com/3MAH/microgen/main/docs/_static/examples/remeshed_mesh.png\" height=\"250\">\n</a>\n",
    "bugtrack_url": null,
    "license": "GPLv3",
    "summary": "Microstructure generation and meshing",
    "version": "1.1.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/3MAH/microgen/issues",
        "Documentation": "https://microgen.readthedocs.io/en/latest",
        "Source Code": "https://github.com/3MAH/microgen"
    },
    "split_keywords": [
        "microstructure",
        " lattice",
        " periodic",
        " tpms",
        " mesh"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cc4487835fdec8974e09a425dbbc8388079c79fd239c70c64ae1132138b6df27",
                "md5": "568e11646eb741fdd28c540d9618eb07",
                "sha256": "64ef270c5d15e4344c3c520370cb206404e2d701bc02b39ba431c1baefe34c15"
            },
            "downloads": -1,
            "filename": "microgen-1.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "568e11646eb741fdd28c540d9618eb07",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.12,>=3.8",
            "size": 57782,
            "upload_time": "2024-03-26T16:59:31",
            "upload_time_iso_8601": "2024-03-26T16:59:31.612871Z",
            "url": "https://files.pythonhosted.org/packages/cc/44/87835fdec8974e09a425dbbc8388079c79fd239c70c64ae1132138b6df27/microgen-1.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0f8e060ef1de5d4d3335dfda41da8902e87ca0db2fdee17b2fa8788dbd9fb47a",
                "md5": "2d0664d0789843f03c6859c78b667fbc",
                "sha256": "408697434de5445e56b822d675e005d384744e08540aecb549e67eab9a1afdaa"
            },
            "downloads": -1,
            "filename": "microgen-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "2d0664d0789843f03c6859c78b667fbc",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.12,>=3.8",
            "size": 24323584,
            "upload_time": "2024-03-26T16:59:35",
            "upload_time_iso_8601": "2024-03-26T16:59:35.467903Z",
            "url": "https://files.pythonhosted.org/packages/0f/8e/060ef1de5d4d3335dfda41da8902e87ca0db2fdee17b2fa8788dbd9fb47a/microgen-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-26 16:59:35",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "3MAH",
    "github_project": "microgen",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "microgen"
}
        
Elapsed time: 0.24389s