Open mdsumner opened 7 years ago
I see
library(sf)
f <- "/rdsi/PRIVATE/raad/data_staging/maps.nyc.gov/download/3dmodel/DA_WISE_Multipatch/DA_WISE_Multipatch/DA10_3D_Buildings_Multipatch.gdb"
d <- read_sf(f)
r <- anglr(d[1:10, ])
Error in RTriangle::pslg(P = as.matrix(x[["vertex"]][c("x_", "y_")]), :
Duplicated vertices in P.
I think we have to dump distinct/group_indices again?
Alternatively, maybe Triangle internally would agree with the definition of unique, since this is stopped at the R level?
The problem is simply that the polygons are duplicated in XY, there's a different value of Z for copy of a path in each layer.
SC and TRI both work fine with this already: http://rpubs.com/cyclemumner/367010
So, this is a fix for the DEL model - it will have to split on layer, or otherwise just point to TRI - we only need poor quality triangles anyway.
Also look at the NotEqual argument to rgl::as.mesh3d()
- that might be a neater way to break the mesh.
Everything is filtered out as being a hole, why? What about sc?