uxarray icon indicating copy to clipboard operation
uxarray copied to clipboard

Option to Keep Only Hexagonal Faces in Dual Grid Construction

Open pomath opened this issue 9 months ago • 1 comments

Proposed new feature or change:

Hi UXarray developers,

Really appreciate UXarray — it's been super helpful in working with SWOT data!

When building a dual grid from a partial spherical grid, the current construct_faces() function allows faces with as few as 3 edges (dual.py line 104). This results in a mix of triangles, pentagons, and hexagons. For my use case, I need a dual grid made only of hexagons.

Feature request:

  • Add an option to require exactly 6 edges per face when constructing the dual grid.

  • Drop or mask nodes that do not satisfy the hexagon requirement.

  • Expose this option as a new argument (e.g., required_edges=6) in construct_faces() or get_dual().

This would allow users working with partial spherical grids to create clean, regular hexagonal meshes.

Let me know if this sounds reasonable. I’d be happy to help test or contribute if helpful.

Thanks!

pomath avatar May 14 '25 22:05 pomath

Hey @pomath, thanks a lot for your request, and sorry for the delayed response, it has been quite busy for us in last several weeks with a number community events including a global hackathon and workshops!

I get the use case with this feature you are asking, and yeah it sounds reasonable; though, give us some time to look into it as partial grids maybe a bit tricky. Also , we'd be happy to work with you and/or guide you in the correct direction if you were willing to contribute this yourself to the library. Just let us know.

Best,

erogluorhan avatar Jun 13 '25 22:06 erogluorhan