Changelog#
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased#
[0.2.3] 2025-01-06#
Added#
Support for Python 3.13
[0.2.2] 2024-09-26#
Fixed#
Version 0.2.1 introduced new logic relying on geopandas 1.0+ shapely-wrapped functions, breaking compatibility with earlier geopandas versions. These method calls have been replaced with direct shapely functions, ensuring compatibility with older versions such as geopandas 0.14.
[0.2.1] 2024-09-04#
Added#
Added
find_proximate_perimeter_points()to identify (near) dangling edges and extremely short edges in polygon perimeters.
Changed#
Added a
minimum_perimeter_spacingkeyword topandamesh.TriangleMesherandpandamesh.GmshMesherto define a tolerance for (near) dangling edges and very short edges in polygon perimeters. This tolerance is set to 1.0e-3 by default; it means that the meshers will error during initialization if slivers of 0.001 or thinner are found, or if consecutive vertices are within 0.001 of each other.
[0.2.0] 2024-09-03#
Fixed#
Previously,
pandamesh.TriangleMesherwould not respect specified cell sizes in areas that are fully bounded by linestrings (rather than polygons), e.g. three separate lines forming a triangular zone. The reason is that Triangle identifies such a zone as a separate region, and the point specifying the maximum area is isolated. This has been fixed by checking whether linestrings form any coincendental polygons, and including these polygons are separate zones.
Added#
pandamesh.TriangleMesher.generate_geodataframe()and -pandamesh.GmshMesher.generate_geodataframe()have been added to return generated meshes as geodataframes.Added
pandamesh.MeshAlgorithm.QUASI_STRUCTURED_QUADas an option.Added
pandamesh.Preprocessorto assist in preparing and cleaning geospatial data prior to meshing.Added
pandamesh.GmshMesher.add_threshold_distance_field(),pandamesh.GmshMesher.add_matheval_distance_field(),pandamesh.GmshMesher.add_structured_field(), andpandamesh.GmshMesher.add_structured_field_from_dataarray()to enable Gmsh fields from geometry or from raster data.Added
finalizekeyword topandamesh.GmshMesher.generate()to automatically finalize after mesh generation.Added
pandamesh.find_edge_intersections()to locate unresolved intersection between polygon boundary, linestring, and linearring edges.
Changed#
pandamesh.TriangleMesherdoes a cell size to area conversion. This previously assumed right-angled triangles. This has been changed to assume equilateral triangles instead. This may result in slightly smaller triangles.Mesher properties set with
pandamesh.DelaunayAlgorithm,pandamesh.FieldCombination,pandamesh.GeneralVerbosity,pandamesh.GmshMesher,pandamesh.MeshAlgorithm, orpandamesh.SubdivisionAlgorithmwill now accept one of these enums, or the enum member name as a string.pandamesh.TriangleMesherandpandamesh.GmshMeshernow take ashift_originargument to temporarily shift the coordinate system to the centroid of the geometries’ bounding box to mitigate floating point precision problems. This is enabled by default.pandamesh.gmsh_env()now finalizes an existing Gmsh instance prior to initializing Gmsh anew.pandamesh.TriangleMesherandpandamesh.GmshMesherwill now also accept LinearRing geometries (previously only Polygons, LineStrings, and Points).Added an
edge_intersectionkeyword topandamesh.TriangleMesherandpandamesh.GmshMesherto control whether to error, warn, or ignore unresolved edge intersections of polygon boundaries, linestrings, and linearrings. By default, both meshers will now error if unresolved intersections are encountered.
[0.1.6] 2024-07-17#
Added#
pandamesh.GmshMeshernow takesread_config_filesandinterruptibleas initialization arguments forgmsh..
Fixed#
Compatibility changes for Numpy 2.0.
[0.1.5] 2024-02-06#
Fixed#
Inside of
pandamesh.GmshMeshera check now occurs before finalization. This keepsgmshfrom printing (harmless) errors to the console, which previously commonly happened at initialization.pandameshcan now be imported in a sub-thread.gmshwill not run outside of the main interpreter thread, but it previously also prevented the entire import ofpandamesh. Attempting to use thepandamesh.GmshMesheroutside of the main thread will result in aRuntimeError.
Added#
pandamesh.GeneralVerbosityhas been added to control the verbosity of Gmsh. It can be set via theGmshMesher.general_verbosityproperty. Its default value isSILENT.
Changed#
A number of deprecations have been fixed. Most notable is the deprecation of
geopandas.datasets. The South America geodataframe can now be fetched viapandamesh.data.south_america().Checking of intersections of linestrings has currently been disabled: the current implementation is too strict and resulted in too many false positives.