stla / cgalMeshes

R6 based utilities for 3D meshes.
12 stars 1 forks source link

Error in getMesh(normals =FALSE) #7

Closed dwoll closed 1 year ago

dwoll commented 1 year ago

Again, thanks for continuing to work on cgalMeshes! With the current devel version 1.1.0 in the github branch, I see this error:

library(cgalMeshes)
mesh1 <- cgalMesh$new("Obs01_HEART.ply")
mesh1$getMesh(rgl=TRUE, normals=FALSE)

With cgalMeshes version 1.0.0, this runs fine. With version 1.1.0, I get an error about normals matching multiple arguments. Removing normals=FALSE fixes the issue.

Obs01_HEART.txt

stla commented 1 year ago

Hello. I'm surprised this option is still there. To get the normals with 1.1.0, you have to do:

mesh1$computeNormals()
mesh1$getMesh()
dwoll commented 1 year ago

Thanks! I see I should have waited a couple of days, now reading what looks like a TODO indicator at https://github.com/stla/cgalMeshes/blob/49e39f82174e93c1eba946d02578a0c826ea8448/R/cgalMesh.R#L1073

stla commented 1 year ago

Lol, I totally forgot that. Thanks!