JuliaGeometry / Meshes.jl

Computational geometry and meshing algorithms in Julia
https://juliageometry.github.io/MeshesDocs/stable
Other
376 stars 80 forks source link

Allow `Polytope` and `Mesh` construction with vectors of `CRS` #924

Closed juliohm closed 2 weeks ago

juliohm commented 2 weeks ago

The constructors currently accept a vector of Tuple, which are interpreted as Cartesian{NoDatum}. We need to be able to construct polytopes and meshes with other CRS as in:

coords = LatLon[(0, 0), (1, 1), ...]

mesh = SimpleMesh(coords, connec)

poly = PolyArea(coords)

The current method with Tuple could then call the method with Cartesian{NoDatum} explicitly.

juliohm commented 2 weeks ago

On a second thought, the convenience methods with tuples that assume Cartesian are all we need. If users need to pass custom CRS, they can always Point.(coords).