Skip to main content

Create meshes from segmented imaging data for finite element simulations using Gmsh.

Project description

biomesh

pipeline

Installation

biomesh can be installed via pip as

pip install biomesh

If you want to generate a mesh with Gmsh, you also need to install the gmsh python library as

pip install gmsh

Usage

To generate a finite element mesh from multiple colored stl-files, you simply need to do

import biomesh

# note, this requires gmsh to be installed (pip install gmsh)
mesh = biomesh.mesh_colored_stl_files(
    "path/to/part1.stl",
    "path/to/part2.stl",
    "path/to/part3.stl",
    mesh_size=2.0
)
# alternatively, you can also just use meshio to load a mesh: mesh = meshio.read("path/to/mesh.vtu")

# make all elements quadratic
mesh = biomesh.lin_to_quad(mesh)

# reorder nodes to reduce bandwidth of matrix
mesh = biomesh.reorder(mesh)

The nodes of all stl-files are matched. Each stl-file will be considered as an own volume.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

biomesh-0.4.1.tar.gz (88.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

biomesh-0.4.1-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file biomesh-0.4.1.tar.gz.

File metadata

  • Download URL: biomesh-0.4.1.tar.gz
  • Upload date:
  • Size: 88.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.23

File hashes

Hashes for biomesh-0.4.1.tar.gz
Algorithm Hash digest
SHA256 5fcf375063fbb54a8dafc2df046566219b0890651eb042d9234c01591484e7d1
MD5 fedeb6c0770dbb11e5fa57395431d3da
BLAKE2b-256 40470a2b7ca0d47945efb4c6e6da6f79943aef9ea95c3cecc054409afdb9f7ae

See more details on using hashes here.

File details

Details for the file biomesh-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: biomesh-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.23

File hashes

Hashes for biomesh-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 13364cf149faf2f29d5436d51c299c8669912019f86ff550d17518c1cd8e5411
MD5 4585c939c4436400ce60c48233c7fa70
BLAKE2b-256 2dd1a78d7dd64484453a1dcf7d09376f81b1b8a1fba553f1d93808beeeffd651

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page