quad2segment <- function(mesh) {
ib <- mesh$ib
allseg <- cbind(ib[1:2, ], ib[2:3, ], ib[3:4, ], ib[c(4, 1), ])
dup <- duplicated(pmax(paste(allseg[1, ], allseg[2, ], sep = "-"),
paste(allseg[2, ], allseg[1, ], sep = "-")))
rgl::mesh3d(vertices = mesh$vb, segments = allseg[, !dup])
}
could have a kind of nascent quadmesh that started with just these segments, but would need to record the dim too
could have a kind of nascent quadmesh that started with just these segments, but would need to record the dim too