Constructive Solid helper for Gmsh
This project is an opinionated helper tool that aims to provide a high level Python API for 2D/3D Constructive Solid Geometry modelling, which is a very convenient way of defining geometries using boolean operations. A typical script looks like this:
from csgmsh import mesh, shape, field
rect = shape.Rectangle()
circ = shape.Circle(center=[1,1], radius=.5)
mesh.write(
output_path = "demo.msh",
physical_groups = {
"domain": rect - circ,
"top-right": rect.top | circ.boundary | rect.right,
"bottom-left": rect.left | rect.bottom,
},
mesh_size = field.Threshold(
d=field.Distance(rect.bottom),
dmin=0, vmin=.01,
dmax=.5, vmax=.1),
)
Context: gmsh supports GSG modelling via its OpenCASCADE kernel. Unfortunately
it is set up in a way that makes it difficult to keep track of boundary
segments, which is crucial for computational applications. Csgmsh fixes this by
assuming that the (undocumented) order in which boundary entities are provided
is stable, and keeps track of how these boundaries are subdivided via the
BooleanFragments operation.
This project is very much a work in progress and the API may change extensively pre-1.0, so be sure to pin it to a version if you find a use for it.
Metadata
Release files for csgmsh 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| csgmsh-0.3.1.tar.gz | 12.3 kB | Without provenance | Details for csgmsh-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| csgmsh-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for csgmsh-0.3.1-py3-none-any.whl |
Total release size: 28.3 kB
Release files / csgmsh-0.3.1.tar.gz
| Download URL | csgmsh-0.3.1.tar.gz |
|---|---|
| Size | 12.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f5160e3543e56ed03462ccfab17e722dd7a0cc42acc982d58d62f5f8bf954100
|
|
BLAKE2b-256 checksum How to use checksums |
f8cb8a2577ea1b09343ec440d34cc3339d5bf8cd2112a7be80f436a0c127929e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.20
|
Release files / csgmsh-0.3.1-py3-none-any.whl
| Download URL | csgmsh-0.3.1-py3-none-any.whl |
|---|---|
| Size | 15.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
98be770277ec893ae39c963dedeb60b0208bda3755189c733dc492d87ebd89f0
|
|
BLAKE2b-256 checksum How to use checksums |
6d302c3e8f3dc0c6cb4926b270dc0acb4af45727f4bbb8f052e0997fac1bc165
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.20
|
Security for csgmsh 0.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.