Skip to content

Commit

Permalink
fixed mesh generation on linemerge by point
Browse files Browse the repository at this point in the history
  • Loading branch information
duarte-jfs committed May 23, 2024
1 parent 023acd5 commit bd2a6bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions femwell/mesh/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
Point,
Polygon,
)
from shapely.ops import linemerge, polygonize, split, unary_union
from shapely.ops import linemerge, polygonize, split, unary_union, snap

from femwell.mesh.meshtracker import MeshTracker

Expand All @@ -31,7 +31,7 @@ def break_line_(line, other_line):
):
# if type == "", intersection.type != 'Point':
if intersection.geom_type == "Point":
line = linemerge(split(line, intersection))
line = snap(line, intersection, 0.1)
else:
new_coords_start, new_coords_end = intersection.boundary.geoms
line = linemerge(split(line, new_coords_start))
Expand Down

0 comments on commit bd2a6bd

Please sign in to comment.