safety catch for sf triangles
mdsumner opened this issue · 1 comments
mdsumner commented
We need to avoid putting sf through the DEL0 mill if everything is already a triangle, this happens in as.mesh3d.sfc and as.mesh3d.sf, as might occur from sfdct or from a decido sf maker.
## check maybe it's all triangles
## is a GEOMETRYCOLLECTION and
if (all(rapply(x$geometry, function(x) dim(x)[1], classes = "matrix", how = "unlist") == 4L)) {
## or is a TIN
go_directly_to_mesh3d(x$geometry)
} else {
as.mesh3d(DEL0(x, ))
}
something like that.
mdsumner commented
done in silicate, anglr will use TRI0 for sf generally (because they are planar so using DEL is more of an opt-in than a sensible default)