anglr icon indicating copy to clipboard operation
anglr copied to clipboard

de-normalization of DEL vertices for Z

Open mdsumner opened this issue 8 years ago • 3 comments

Everything is filtered out as being a hole, why? What about sc?

library(sf)
f <- "maps.nyc.gov/download/3dmodel/DA_WISE_Multipatch/DA_WISE_Multipatch/DA10_3D_Buildings_Multipatch.gdb"
d <- read_sf(f)

r <- rangl(d[1:10, ])

mdsumner avatar May 23 '17 09:05 mdsumner

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?

mdsumner avatar Feb 28 '18 13:02 mdsumner

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.

mdsumner avatar Mar 06 '18 09:03 mdsumner

Also look at the NotEqual argument to rgl::as.mesh3d() - that might be a neater way to break the mesh.

mdsumner avatar Mar 22 '20 09:03 mdsumner