Skip to content

Commit

Permalink
Merge pull request #128 from noaa-ocs-modeling/bugfix/subset_hilo_ove…
Browse files Browse the repository at this point in the history
…rlap

Fix subset overlapping elements issue
  • Loading branch information
SorooshMani-NOAA authored Dec 5, 2023
2 parents 2fe04fa + afaf1e8 commit 0563a79
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions ocsmesh/cli/subset_n_combine.py
Original file line number Diff line number Diff line change
Expand Up @@ -634,8 +634,8 @@ def _main(


# Attach overlaps to buffer region (due to 1 layer and upstream)
poly_seam_4, jig_clip_hires = self._add_overlap_to_polygon(jig_clip_hires_0, poly_seam_3)
poly_seam_5, jig_clip_lowres = self._add_overlap_to_polygon(jig_clip_lowres_0, poly_seam_4)
poly_seam_4, jig_clip_hires_1 = self._add_overlap_to_polygon(jig_clip_hires_0, poly_seam_3)
poly_seam_5, jig_clip_lowres_1 = self._add_overlap_to_polygon(jig_clip_lowres_0, poly_seam_4)

# Cleanup buffer shape
poly_seam_6 = utils.remove_holes_by_relative_size(
Expand All @@ -647,8 +647,13 @@ def _main(

_logger.info("Calculate reclipped polygons...")
start = time()
jig_clip_hires = jig_clip_hires_1
poly_clip_hires = utils.remove_holes(
utils.get_mesh_polygons(jig_clip_hires))

jig_clip_lowres = utils.clip_mesh_by_shape(
jig_clip_lowres_1, poly_clip_hires,
fit_inside=False, inverse=True)
poly_clip_lowres = utils.get_mesh_polygons(jig_clip_lowres)
_logger.info(f"Done in {time() - start} sec")

Expand Down

0 comments on commit 0563a79

Please sign in to comment.