Skip to main content

ANYmesher

Structured meshing for shell and beam finite-element models described by ANYgeometry: edge seeding and local refinement, a built-in mapped (transfinite Coons) mesher, mapped-face decomposition, optional Gmsh meshing, geometry-to-mesh associations, quality metrics, a tkinter mesher and a command-line interface.

After the first package-index release, install with python -m pip install ANYmesher. Until then, use the editable development setup below.

The repository is ANYmesh, but anymesh was already taken on PyPI, so the distribution is ANYmesher and the import package is anymesher.

Quick start

A stiffened panel needs no geometry model:

import anymesher as am

panel = am.StiffenedPanel(
    length=4.0, width=3.0, plate_thickness=0.012,
    num_stiffeners=2, stiffener_spacing=1.0,
    stiffener_height=0.30, stiffener_web_thickness=0.010,
    stiffener_flange_width=0.150, stiffener_flange_thickness=0.015,
)
mesh = am.stiffened_panel_mesh(panel, am.PanelMeshConfig(
    shell_num_divisions_x=8, shell_num_divisions_y=6, beam_num_divisions=8,
))

mesh.num_nodes, len(mesh.quads), len(mesh.beams), len(mesh.couplings)
am.panel_edge_nodes(mesh)["x0"]          # the nodes on the x = 0 edge
am.verify_mesh_quality(mesh).max_aspect_ratio

Anything less regular goes through the shared geometry model:

import anygeometry as ag

model = ag.GeometryModel()
points = model.add_points([(0, 0, 0), (2, 0, 0), (2, 1, 0), (0, 1, 0)])
face = model.add_face(model.add_polyline(points, close=True))

am.punch_circular_hole(model, face, (1.0, 0.5, 0.0), 0.2)
mesh = am.generate_mesh(model, target_size=0.05, order="quadratic")
mesh.nodes_on(ag.EntityRef("edge", 3))   # still addressable after re-meshing

anymesher.geometry remains as a temporary compatibility import. Its classes are the exact ANYgeometry classes, not converted copies, but new code should import geometry directly from anygeometry.

Command line

anymesher panel --length 4 --width 3 --thickness 0.012 --height 0.3 --web-thickness 0.01 --divisions-x 8 --divisions-y 6

panel, plate, beam, quality and backends, each with --json. --output writes the mesh as JSON.

anymesher-gui opens the mesher: enter a panel, plate or beam, watch it re-mesh as you type, read the quality report, and save the result. It is deliberately not a geometry editor — building a BRep interactively is an application's job, and ANYfem already does it.

Applications can put that form behind their own mesh button. Passing a callback adds a Use mesh button and returns the neutral Mesh directly:

from anymesher.gui import open_mesher

window, mesher = open_mesher(root, on_apply=project.replace_mesh)

The host remains responsible for deciding whether a generic neutral mesh is appropriate for its structural model.

What a mesh is here

generate_mesh returns nodes, quadrilaterals, triangles, beams, coupling records, and the association back to the geometry: which node came from which vertex, which nodes lie along which edge, which elements belong to which face.

The association is the point. It is what lets a load or a restraint be named against geometry and survive a re-mesh, and what makes results addressable by the thing the user drew rather than by node number. Primitives fill the same fields against synthetic entity IDs, so a consumer needs one lookup path either way.

Backends

mapped (built in) gmsh ([gmsh] extra)
Structure structured grid per face unstructured
grid_of_face filled empty
Conformity by construction by gmsh
Elements quads only quads, with triangles where recombination cannot pair them
Curved faces meshed exactly refused — planar faces only
Eccentric beams supported not supported
am.generate_mesh(model, backend="gmsh", target_size=0.1)

The two are not interchangeable in what they guarantee, and the differences are recorded rather than smoothed over: an unstructured mesh has no (i, j) index, so that field is left empty instead of filled with something plausible. Planar boundaries may contain ANYgeometry straight lines, circular arcs or Bezier splines; Gmsh receives each as its corresponding exact curve primitive.

Native triangulation

Mapped/native face selection is separate from the triangulator used after a face has selected the native strategy. In 0.2.1, omitted native_backend and planar backend arguments default to "auto": an explicitly registered boundary is preferred, then the built-in compiled boundary, with the deterministic Python reference used only when native capability is absent.

Use "python" to require the compatibility/reference implementation and "native" to require compiled capability without fallback. Import or execution failure from a present but corrupt extension is reported; it is never treated as ordinary absence. ANYfem format 6 persists this selector explicitly, while its format 1-5 migration writes "python" so old projects retain their behavior.

Design notes

One shared geometry authority. ANYmesher never converts a geometry model. It consumes the same GeometryModel and EntityRef objects that applications use for selections and attributes, then records associations to their stable IDs.

Conformity by construction. Node generation order is fixed: one node per used vertex, then n - 1 interior nodes per edge in the edge's own direction, then face interior nodes from the Coons blend. Neighbouring faces look their boundary nodes up from the same registries, so they share the very same nodes. The alternative — meshing faces independently and merging coincident nodes within a tolerance — fails quietly on nearly-coincident geometry and produces a mesh that looks connected and is not.

Coupling records, not constraints. When a stiffener stands off the plating, the mesher records per beam node: the shell element it projects into, the shape weights at that point, and the eccentricity vector. That is a statement about geometry. Deciding it becomes six multi-point constraints is the consuming solver's business. Interpolating through the shape functions is what removes the older requirement that a beam node lie on a shell node row, so the mesh no longer has to be aligned to the stiffeners for the coupling to be exact.

Numbering is a contract. A consumer stores results per node and element ID, so a renumbering that is mathematically irrelevant still invalidates its baselines. The primitives number shell nodes from 1, beam nodes from 10000, beam elements from 20000 and couplings from 30000; the mapped mesher numbers by registry order. Both are documented where they are implemented and asserted by test.

See docs/ARCHITECTURE.md for the layering, and MIGRATION.md for what was extracted from where.

Scope

Out of scope: geometry ownership, elements, materials, assembly and solution. General splitting, trimming, projection, transforms and intersections belong to ANYgeometry. check_mappable, triangle_to_quads and the four-patch butterfly hole decomposition stay here because they exist specifically for mapped quads. The convenience workflow generate_mesh_with_intersections reuses ANYgeometry's qualified intersection imprint on a temporary clone before mapped meshing; it does not introduce a second geometric intersection kernel. The same workflow also makes structural beam joints explicit: coincident beam ends share a node, a beam ending on or crossing another straight beam splits the receiving spans, and beam nodes on a shell use either the coincident shell node or an interpolation coupling. The design geometry remains unwelded and all associations are folded back to its original owners. At a qualified shell T-junction, boundary nodes of the terminating shell are likewise attached to the interior support shell with interpolation records; crossing shell interiors still require conformal imprinting and fail closed if the topology cannot be qualified. The legacy anymesher.split_face_at, split_face_between and strip_face imports likewise retain their mapped-partition semantics; new neutral geometry code should import the general edit operations from anygeometry. Writing a mesh to a .fem or .inp file belongs to ANYfileio, which depends on this package — so the arrow cannot point back. The JSON in anymesher.serialize is the mesh container written out as itself, not an interchange format.

Units

SI throughout, lengths in m. There is no conversion layer. The mesher window accepts mm because that is how plate and profile dimensions are quoted, and converts at the widget.

Development

python -m pip install --no-deps -e C:\Github\ANYgeometry
python -m pip install -e "C:\Github\ANYmesh[dev,gmsh]"
python -m pytest

To open the mesher straight from a checkout — including an IDE's Run button, with nothing installed — run run_gui.py at the repository root.

python run_gui.py

Download files

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

Source Distribution

anymesher-0.2.3.tar.gz (210.0 kB view details)

Uploaded Source

Built Distributions

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

anymesher-0.2.3-cp314-cp314-win_amd64.whl (405.2 kB view details)

Uploaded CPython 3.14Windows x86-64

anymesher-0.2.3-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (741.9 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

anymesher-0.2.3-cp314-cp314-macosx_11_0_arm64.whl (213.2 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

anymesher-0.2.3-cp313-cp313-win_amd64.whl (397.3 kB view details)

Uploaded CPython 3.13Windows x86-64

anymesher-0.2.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (741.7 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

anymesher-0.2.3-cp313-cp313-macosx_11_0_arm64.whl (213.1 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

anymesher-0.2.3-cp312-cp312-win_amd64.whl (397.3 kB view details)

Uploaded CPython 3.12Windows x86-64

anymesher-0.2.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (741.7 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

anymesher-0.2.3-cp312-cp312-macosx_11_0_arm64.whl (213.2 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

anymesher-0.2.3-cp311-cp311-win_amd64.whl (397.2 kB view details)

Uploaded CPython 3.11Windows x86-64

anymesher-0.2.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (742.1 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

anymesher-0.2.3-cp311-cp311-macosx_11_0_arm64.whl (211.4 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

File details

Details for the file anymesher-0.2.3.tar.gz.

File metadata

  • Download URL: anymesher-0.2.3.tar.gz
  • Upload date:
  • Size: 210.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for anymesher-0.2.3.tar.gz
Algorithm Hash digest
SHA256 fbb6be05551d5a6628cf392a1e8287847e6fc09e32fc83a0d08b936c420a3aa0
MD5 0c765937161b21a95a85b48a8c1a0672
BLAKE2b-256 b694267305a57882556d098ea771641216b3e4bf54f3129a79993f55da4fec45

See more details on using hashes here.

Provenance

The following attestation bundles were made for anymesher-0.2.3.tar.gz:

Publisher: publish.yml on audunarn/ANYmesh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file anymesher-0.2.3-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: anymesher-0.2.3-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 405.2 kB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for anymesher-0.2.3-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 77af82dec01b232f00f6bd25a6bb2dee58d41c88d38c92d0cbdd8f132949bdfe
MD5 9f0c4eeda66fa650fd55679f7df1a63a
BLAKE2b-256 291bbda1eac4faa7947cae78c730fc918399f2fcdbf1dc5dd8339dde8e266586

See more details on using hashes here.

Provenance

The following attestation bundles were made for anymesher-0.2.3-cp314-cp314-win_amd64.whl:

Publisher: publish.yml on audunarn/ANYmesh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file anymesher-0.2.3-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for anymesher-0.2.3-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7d0b200f225299ea1c8a7c28f9343be7ea073aa5d3c645d1652db9adc4c1722f
MD5 e71e8366c80d692206096f6a0bfaa82a
BLAKE2b-256 364979e552fad6c919fd5681f243b45eb9450c0fdf8458374ad250d3c36e9acf

See more details on using hashes here.

Provenance

The following attestation bundles were made for anymesher-0.2.3-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on audunarn/ANYmesh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file anymesher-0.2.3-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for anymesher-0.2.3-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 175fae1c4f7208feadd34b0a058148f3ca3ece028c64a7f51384b927a2e0c959
MD5 497f3e188c1b6a8a23b093ef987ff72f
BLAKE2b-256 7b22948f3ac86c1f84ddb49f2c9877172184e18ee032afcc1b8160ff655605f1

See more details on using hashes here.

Provenance

The following attestation bundles were made for anymesher-0.2.3-cp314-cp314-macosx_11_0_arm64.whl:

Publisher: publish.yml on audunarn/ANYmesh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file anymesher-0.2.3-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: anymesher-0.2.3-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 397.3 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for anymesher-0.2.3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 0ab4dbdc166d0672ac8e2078978a4c443b1d6165c14deb741fe6faca12bcd14d
MD5 bd4c4e3ef5266260bec8225c28e5e692
BLAKE2b-256 dd7ffb59b1d9df707c5d8f1a0ed7cf0102875d7474b4290cc26f3b6da79a2a59

See more details on using hashes here.

Provenance

The following attestation bundles were made for anymesher-0.2.3-cp313-cp313-win_amd64.whl:

Publisher: publish.yml on audunarn/ANYmesh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file anymesher-0.2.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for anymesher-0.2.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9a5a1808bb67167e4e3b01f71d40e25faa9c68efde20f3a11c90b2c87468664a
MD5 794f3dfc5ffb66b73d1c3581389e09ef
BLAKE2b-256 7fd0f6806135e70f3b4d69cf233bce76344d1790eb8e169a7b73b72a18ae3293

See more details on using hashes here.

Provenance

The following attestation bundles were made for anymesher-0.2.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on audunarn/ANYmesh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file anymesher-0.2.3-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for anymesher-0.2.3-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e4e2453a5fc38de138e2bb99a6189056d799815b8a89b68f489359c83bf2024f
MD5 56c654fb708717dd685214c4e7e236d6
BLAKE2b-256 243b7d329942114b6ddb6fb26e53bb5cdf246828f0a4faa0a10d92099aafe23a

See more details on using hashes here.

Provenance

The following attestation bundles were made for anymesher-0.2.3-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: publish.yml on audunarn/ANYmesh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file anymesher-0.2.3-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: anymesher-0.2.3-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 397.3 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for anymesher-0.2.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 b516928c76ec08becf8b7100e3dde3899e99f395531371d61084c75084424e7e
MD5 98c4f872cea3df4d9da49fff2f72ab79
BLAKE2b-256 5661ae0e3cf78bb9fd97440a3b7658cc42a34ce3f00b7a2d94cddb4f091f1911

See more details on using hashes here.

Provenance

The following attestation bundles were made for anymesher-0.2.3-cp312-cp312-win_amd64.whl:

Publisher: publish.yml on audunarn/ANYmesh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file anymesher-0.2.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for anymesher-0.2.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6fa4bee763262dc3894a9b51696f47e3ef044ba8add9c1aff58b4cfc289a8ad5
MD5 d51ec787f22164b377ea8b2b194d3c8e
BLAKE2b-256 db38d8c2f06e72d6e6644afbc64c3887f4d072f53b87954bc2c32c016e61c96e

See more details on using hashes here.

Provenance

The following attestation bundles were made for anymesher-0.2.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on audunarn/ANYmesh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file anymesher-0.2.3-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for anymesher-0.2.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 aa3089680fd07ab708770e7c638ab33c70c12b08b8946ef66165a4e2908f35e7
MD5 425c7e4dd2f2470125f4afa84ffbeb33
BLAKE2b-256 f78198dccde5a338bc80548bb170a23bd6ed416b4ae023f706080c1ed5224bb2

See more details on using hashes here.

Provenance

The following attestation bundles were made for anymesher-0.2.3-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: publish.yml on audunarn/ANYmesh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file anymesher-0.2.3-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: anymesher-0.2.3-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 397.2 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for anymesher-0.2.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 e4a0421e0994532859cbac3df2187e3fef81b5e7e34be544077f84b0ac074438
MD5 40200231c6dffa0544fae9fd27c382cb
BLAKE2b-256 ad8225723b5df5bb22cd86c6acdd1f108d651de5dedd862834d20bcfc231cf3f

See more details on using hashes here.

Provenance

The following attestation bundles were made for anymesher-0.2.3-cp311-cp311-win_amd64.whl:

Publisher: publish.yml on audunarn/ANYmesh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file anymesher-0.2.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for anymesher-0.2.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 dcc77ee786c811c6477857c95118356201eaa49bc14f78ef047ca1d247c19ee6
MD5 cd4fff5d4e79f59d6a065f17fa800b62
BLAKE2b-256 cc81ad6d5a330e3364e6d0177a6d7f468c620b7504b6bcdd94d24bd0c8493f21

See more details on using hashes here.

Provenance

The following attestation bundles were made for anymesher-0.2.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on audunarn/ANYmesh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file anymesher-0.2.3-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for anymesher-0.2.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 49859ad9f3535fc6d07c75d5e729c7633edbb7a4ba6eb824fb666f1ee127d648
MD5 415a0e9d1ce0c33e6a7775f3e2b1a753
BLAKE2b-256 4b47fb89b4a70f265532d29f3ad380d9a315a332d6fe15914c43130c96de95a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for anymesher-0.2.3-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: publish.yml on audunarn/ANYmesh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.3.1

13 files

0.3.0

13 files

0.2.5

13 files

This release

0.2.3 This release

13 files

0.2.1

2 files

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