hypertidy / silicate

A general form for complex data
https://hypertidy.github.io/silicate/
53 stars 4 forks source link

need SC0 of TRI/TRI0 #129

Closed mdsumner closed 4 years ago

mdsumner commented 4 years ago

It's easy enough to get every edge, but what happens if triangulate() gets given repeated edges?

mpadge commented 4 years ago

oh yeah, that's an important question ...?

mdsumner commented 4 years ago

replace SC0.TRI with SC0.TRI0 c7583ee

mdsumner commented 4 years ago

Seems fine, I don't know why I was worried ... we can leave this kind of detail to the euclid-verse haha

x <- TRI0(minimal_mesh)
plot(x)

sc <- SC0(x)
# [[1]]
# # A tibble: 36 x 3
# .vx0  .vx1 path_
# <int> <int> <int>
#   1     1     3     1
# 2     3     4     1
# 3     4     1     1
# 4     6     3     1
# 5     3     1     1
# 6     1     6     1
# 7     9    11     1
# 8    11     8     1
# 9     8     9     1
# 10     8    12     1
# # … with 26 more rows
# 
# [[2]]
# # A tibble: 6 x 3
# .vx0  .vx1 path_
# <int> <int> <int>
#   1    11     9     3
# 2     9    14     3
# 3    14    11     3
# 4    14    13     3
# 5    13    11     3
# 6    11    14     3

## hack it so 9->11 is the same in each (not 11->9
sc$object$topology_[[2]][1, 1] <- 9
sc$object$topology_[[2]][1, 2] <- 11
anglr::mesh_plot(anglr::DEL0(sc), col = sample(hcl.colors(17)))

image

mpadge commented 4 years ago

"euclid-verse" indeed :laughing:

mdsumner commented 4 years ago

silicate can be reborn on that as a framework it's gonna be wild

mpadge commented 4 years ago

oh yeah, of course ... wow