ANYmesher 0.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. anymesher-0.2.1/CHANGELOG.md +128 -0
  2. anymesher-0.2.1/LICENSE +674 -0
  3. anymesher-0.2.1/MANIFEST.in +10 -0
  4. anymesher-0.2.1/MIGRATION.md +192 -0
  5. anymesher-0.2.1/PKG-INFO +240 -0
  6. anymesher-0.2.1/README.md +205 -0
  7. anymesher-0.2.1/docs/ARCHITECTURE.md +134 -0
  8. anymesher-0.2.1/pyproject.toml +77 -0
  9. anymesher-0.2.1/setup.cfg +4 -0
  10. anymesher-0.2.1/setup.py +68 -0
  11. anymesher-0.2.1/src/ANYmesher.egg-info/PKG-INFO +240 -0
  12. anymesher-0.2.1/src/ANYmesher.egg-info/SOURCES.txt +89 -0
  13. anymesher-0.2.1/src/ANYmesher.egg-info/dependency_links.txt +1 -0
  14. anymesher-0.2.1/src/ANYmesher.egg-info/entry_points.txt +5 -0
  15. anymesher-0.2.1/src/ANYmesher.egg-info/requires.txt +18 -0
  16. anymesher-0.2.1/src/ANYmesher.egg-info/top_level.txt +1 -0
  17. anymesher-0.2.1/src/anymesher/__init__.py +208 -0
  18. anymesher-0.2.1/src/anymesher/__main__.py +210 -0
  19. anymesher-0.2.1/src/anymesher/_legacy_intersections.py +566 -0
  20. anymesher-0.2.1/src/anymesher/_native.cpp +328 -0
  21. anymesher-0.2.1/src/anymesher/_triangulation_native.hpp +1087 -0
  22. anymesher-0.2.1/src/anymesher/backends/__init__.py +19 -0
  23. anymesher-0.2.1/src/anymesher/backends/base.py +111 -0
  24. anymesher-0.2.1/src/anymesher/backends/gmsh.py +327 -0
  25. anymesher-0.2.1/src/anymesher/beam_connections.py +271 -0
  26. anymesher-0.2.1/src/anymesher/boundary.py +323 -0
  27. anymesher-0.2.1/src/anymesher/charts.py +580 -0
  28. anymesher-0.2.1/src/anymesher/core.py +804 -0
  29. anymesher-0.2.1/src/anymesher/coupling.py +202 -0
  30. anymesher-0.2.1/src/anymesher/damage.py +163 -0
  31. anymesher-0.2.1/src/anymesher/decomposition.py +633 -0
  32. anymesher-0.2.1/src/anymesher/errors.py +10 -0
  33. anymesher-0.2.1/src/anymesher/geometry/__init__.py +51 -0
  34. anymesher-0.2.1/src/anymesher/geometry/chains.py +5 -0
  35. anymesher-0.2.1/src/anymesher/geometry/curves.py +33 -0
  36. anymesher-0.2.1/src/anymesher/geometry/entities.py +12 -0
  37. anymesher-0.2.1/src/anymesher/geometry/model.py +6 -0
  38. anymesher-0.2.1/src/anymesher/geometry/operations.py +30 -0
  39. anymesher-0.2.1/src/anymesher/gui.py +423 -0
  40. anymesher-0.2.1/src/anymesher/hybrid.py +733 -0
  41. anymesher-0.2.1/src/anymesher/intersections.py +96 -0
  42. anymesher-0.2.1/src/anymesher/mapped.py +520 -0
  43. anymesher-0.2.1/src/anymesher/mesh.py +282 -0
  44. anymesher-0.2.1/src/anymesher/mesh_bvh.py +456 -0
  45. anymesher-0.2.1/src/anymesher/meshing_view.py +351 -0
  46. anymesher-0.2.1/src/anymesher/native.py +195 -0
  47. anymesher-0.2.1/src/anymesher/native_cpp.py +289 -0
  48. anymesher-0.2.1/src/anymesher/optimization.py +467 -0
  49. anymesher-0.2.1/src/anymesher/primitives.py +567 -0
  50. anymesher-0.2.1/src/anymesher/quality.py +129 -0
  51. anymesher-0.2.1/src/anymesher/quality_v2.py +334 -0
  52. anymesher-0.2.1/src/anymesher/recombine.py +282 -0
  53. anymesher-0.2.1/src/anymesher/refinement.py +282 -0
  54. anymesher-0.2.1/src/anymesher/seeding.py +384 -0
  55. anymesher-0.2.1/src/anymesher/serialize.py +189 -0
  56. anymesher-0.2.1/src/anymesher/structural_pipeline.py +849 -0
  57. anymesher-0.2.1/src/anymesher/surface_mesh.py +383 -0
  58. anymesher-0.2.1/src/anymesher/triangulation.py +877 -0
  59. anymesher-0.2.1/tests/conftest.py +25 -0
  60. anymesher-0.2.1/tests/test_backends.py +284 -0
  61. anymesher-0.2.1/tests/test_charts.py +94 -0
  62. anymesher-0.2.1/tests/test_cli.py +160 -0
  63. anymesher-0.2.1/tests/test_compiled_triangulation_contract.py +223 -0
  64. anymesher-0.2.1/tests/test_coupling.py +155 -0
  65. anymesher-0.2.1/tests/test_curved_native_qualification.py +145 -0
  66. anymesher-0.2.1/tests/test_curves.py +108 -0
  67. anymesher-0.2.1/tests/test_geometry.py +150 -0
  68. anymesher-0.2.1/tests/test_geometry_compatibility.py +75 -0
  69. anymesher-0.2.1/tests/test_geometry_owner_integration.py +64 -0
  70. anymesher-0.2.1/tests/test_gui.py +208 -0
  71. anymesher-0.2.1/tests/test_hybrid.py +133 -0
  72. anymesher-0.2.1/tests/test_intersection_meshing.py +328 -0
  73. anymesher-0.2.1/tests/test_kernel_intersection_contract.py +147 -0
  74. anymesher-0.2.1/tests/test_layering.py +111 -0
  75. anymesher-0.2.1/tests/test_mesh.py +148 -0
  76. anymesher-0.2.1/tests/test_mesh_persistence_contract.py +88 -0
  77. anymesher-0.2.1/tests/test_native_backend_defaults.py +148 -0
  78. anymesher-0.2.1/tests/test_native_cancellation.py +45 -0
  79. anymesher-0.2.1/tests/test_native_cpp_boundary.py +114 -0
  80. anymesher-0.2.1/tests/test_native_hybrid_core.py +178 -0
  81. anymesher-0.2.1/tests/test_operations.py +527 -0
  82. anymesher-0.2.1/tests/test_optimization.py +78 -0
  83. anymesher-0.2.1/tests/test_packaging.py +163 -0
  84. anymesher-0.2.1/tests/test_performance_harness_fixtures.py +29 -0
  85. anymesher-0.2.1/tests/test_planar_native_qualification.py +119 -0
  86. anymesher-0.2.1/tests/test_primitives.py +257 -0
  87. anymesher-0.2.1/tests/test_quality_and_serialize.py +194 -0
  88. anymesher-0.2.1/tests/test_refinement.py +99 -0
  89. anymesher-0.2.1/tests/test_seeding.py +146 -0
  90. anymesher-0.2.1/tests/test_structural_pipeline.py +243 -0
@@ -0,0 +1,128 @@
1
+ # Changelog
2
+
3
+ ## Unreleased
4
+
5
+ - Require ANYgeometry 0.2.1 or newer within the qualified 0.2 line, pin the
6
+ accepted geometry source in CI/release workflows, and add a disabled-native
7
+ cell proving absence-only Python fallback and fail-hard explicit native use.
8
+ - Change the six native-triangulation public defaults to `auto` for 0.2.1 while
9
+ preserving explicit `python`, fail-hard `native`, and Python fallback only
10
+ when native capability is absent. ANYfem format 6 persists the selector so
11
+ legacy projects remain explicitly Python-backed after migration.
12
+ - Depend on ANYgeometry as the single owner of `GeometryModel`, `EntityRef`,
13
+ topology entities, curves, chain sampling and general geometry operations.
14
+ - Keep `anymesher.geometry` as exact-identity compatibility imports.
15
+ - Keep mapped-face checks, triangle-to-quad conversion and butterfly-hole
16
+ decomposition in `anymesher.decomposition`.
17
+ - Preserve the historical mapped `split_face_at`, `split_face_between` and
18
+ `strip_face` behavior in that module while ANYgeometry owns the neutral,
19
+ general-purpose variants.
20
+ - Reject neutral triangular and trimmed faces at the mapped-backend boundary
21
+ with a mesh-specific diagnostic instead of restricting neutral topology.
22
+ - Rebuild ANYgeometry Bezier splines exactly in the optional Gmsh backend and
23
+ preserve edge association on their generated nodes. Exclude Gmsh's isolated
24
+ circle-centre and spline-control construction nodes from the neutral mesh.
25
+ - Verify mapped and Gmsh remeshing from an ANYgeometry generator through owner
26
+ replacement history and semantic groups.
27
+
28
+ Added:
29
+
30
+ - **Embeddable mesh selection.** `MesherWindow(on_apply=...)` adds a **Use mesh**
31
+ button, and `open_mesher` opens the same live mesher inside a host Tk
32
+ application.
33
+
34
+ ## 0.1.0
35
+
36
+ First feature release. The geometry kernel and mapped mesher come from ANYfem,
37
+ the primitives from ANYsolver; see [MIGRATION.md](MIGRATION.md) for provenance.
38
+
39
+ Added:
40
+
41
+ - **Geometry** — vertices, edges carrying a straight or arc curve, four-sided
42
+ faces, and the decomposition operations (`split_face_at`,
43
+ `split_face_between`, `strip_face`, `triangle_to_quads`,
44
+ `punch_circular_hole`, `check_mappable`).
45
+ - **Mapped meshing** — the transfinite Coons mesher, seeding with per-edge
46
+ overrides, and local size-field refinement.
47
+ - **Neutral mesh** — `Mesh` with nodes, quads, tris, beams, coupling records and
48
+ the geometry association; `Coupling`, which generalizes the old
49
+ `(beam_node, plate_node)` pair to weighted interpolation over several plate
50
+ nodes.
51
+ - **Primitives** — `stiffened_panel_mesh`, `simple_panel_mesh`, `beam_mesh`,
52
+ `StiffenedPanel`, `PanelMeshConfig`, `StiffenerCrossSection`, and
53
+ `panel_edge_nodes` for reading the four panel edges back.
54
+ - **Coupling** — Q4 and Q8 shape functions, a reusable structured cell index, and
55
+ `locate_shell_element_at_xy`.
56
+ - **Quality** — `verify_mesh_quality` returning a `MeshQuality` record; aspect
57
+ ratio and warp, advisory rather than enforced.
58
+ - **Backends** — `generate_mesh(..., backend=...)` dispatching to the built-in
59
+ mapped mesher or to gmsh behind the `[gmsh]` extra.
60
+ - **Serialization** — `mesh_to_dict`/`mesh_from_dict`/`save_mesh`/`load_mesh`,
61
+ round-tripping the association as well as the coordinates.
62
+ - **Mesher window** — a tkinter form for the primitives with live re-meshing, a
63
+ plan-view preview on a plain `Canvas` and a quality report; entry point
64
+ `anymesher-gui`.
65
+ - **CLI** — `anymesher panel|plate|beam|quality|backends`, each with `--json`.
66
+
67
+ Verified against both sources with both importable at once, and exact rather than
68
+ merely close:
69
+
70
+ - 18 mapped-mesher configurations against `anyfem` at
71
+ `245b82ec68496fde1f8880c6a360f69973208bca` — node IDs and coordinates, quads,
72
+ beams, offset nodes, the structured grid, every association map, the seeding
73
+ divisions, the coupling pairs, and the text of every error raised. Plus the
74
+ refinement path and the split, triangle and butterfly-hole decompositions.
75
+ - 96 stiffened-panel configurations against `anysolver` 0.1.3 at
76
+ `8b4553cc680ff925df850e627165fc336615eaba`, over division counts, stiffener
77
+ counts, beam divisions, Q4/Q8 and aligned/uniform transverse grids — node and
78
+ element IDs, coordinates, connectivity, every coupling's masters, shape weights
79
+ and eccentricity, the four panel edge node sets, and the quality report.
80
+ Plus 4 plates, 3 beams and all 5 stiffener profile families.
81
+
82
+ Changed from the sources:
83
+
84
+ - **`Mesh.couplings` values are `Coupling` records, not `(beam, plate)` tuples.**
85
+ The interpolated case needs several plate nodes with weights, which a pair
86
+ cannot express. `Coupling.node_to_node` builds the single-master case and
87
+ `coupling.plate_node` reads it back, so the ANYfem edit at strip time is one
88
+ function in `solve/build.py` plus two test lines.
89
+ - **`Mesh` gained `tris` and `thickness_of_face`.** The mapped mesher never
90
+ produces a triangle, so both stay empty for it; gmsh does, and dropping them to
91
+ keep the container tidy would silently delete part of the mesh.
92
+ - **The chain-sampling helpers moved into the geometry package**
93
+ (`anymesher.geometry.chains`). In ANYfem they lived with the mesher, which the
94
+ geometry package then imported from — so geometry depended on the mesher while
95
+ the mesher depended on geometry. The move removes that cycle with no behaviour
96
+ change. `GeometryError` and `MeshError` moved to `anymesher.errors` for the
97
+ same reason, and are still importable from where they were.
98
+ - **`GeometryModel.arc_frame(edge_id)` is now public.** A backend rebuilding the
99
+ model in another kernel needs the circle, not just samples along it; reaching
100
+ into `_arc_frame` from outside the module would have been a naming bug.
101
+ - **`PanelGeometry` and `MeshConfig` became `StiffenedPanel` and
102
+ `PanelMeshConfig`**, and lost their material, support-condition and load fields.
103
+ A material name is not a meshing decision and interpreting `"Integrated"` is
104
+ structural convention, so both belong to the consumer. Renamed rather than
105
+ trimmed in place, so a same-named class with different fields cannot be
106
+ mistaken for the original.
107
+
108
+ Historical limitations in the 0.1.0 implementation, stated rather than worked
109
+ around:
110
+
111
+ - The gmsh backend meshes **planar** faces only, refuses arcs sweeping 180
112
+ degrees or more (gmsh's built-in kernel cannot express one as a single circle
113
+ arc), and does not support eccentric beam offsets. Each refusal names the
114
+ mapped backend, which handles all three exactly.
115
+ - `GeometryModel.add_face` required four sides, so the gmsh backend could only
116
+ mesh faces the mapped mesher also accepted. The Unreleased ANYgeometry
117
+ extraction supersedes this restriction: neutral faces may have arbitrary
118
+ valid loops and holes, while the mapped backend still requires mapped
119
+ partitioning.
120
+ - Meshing a geometry model from the command line lacked an owner serialization
121
+ format. ANYgeometry now owns that format; ANYmesher's CLI remains focused on
122
+ mesh primitives and saved meshes, while the API accepts a shared model.
123
+
124
+ ## 0.0.1
125
+
126
+ - Repository scaffolding: packaging metadata under the distribution name
127
+ `ANYmesher`, CI across Python 3.11-3.14 on Windows and Linux, and the layering
128
+ checks that keep the package a leaf of the dependency graph.