-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing IMathOps :- method for java.lang.Double when using csg/mesh->csg #85
Comments
Further investigation reveals that the BasicMesh may be generating wrong. I get the following results when I inspect the generation of the mesh in CIDER: Class: thi.ng.geom.types.BasicMesh
Contents:
:vertices = #{ 0.0 -1.5668 -8.6965 2.7351 -12.0802 ... }
:faces = #{ [[-8.6965 3.1084 6.294]] [[6.2429 -12.0802 0.0]] [[-19.2099 -1.0464 2.7351]] [[6.2429 -12.0802 2.7351]] [[2.0882 -1.5668 6.294]] }
:fnormals = {} The mesh is being generated by having the following sequence of faces passed in, using the form ( ( [ 2.0882 -1.5668 6.294 ] [ -8.6965 3.1084 6.294 ] [ -19.2099 -1.0464 2.7351 ] [ 6.2429 -12.0802 2.7351 ] )
[ [ 2.0882 -1.5668 6.294 ] [ 2.0882 -1.5668 0.0 ] [ -8.6965 3.1084 0.0 ] [ -8.6965 3.1084 6.294 ] ]
[ [ -8.6965 3.1084 6.294 ] [ -8.6965 3.1084 0.0 ] [ -19.2099 -1.0464 0.0 ] [ -19.2099 -1.0464 2.7351 ] ]
[ [ -19.2099 -1.0464 2.7351 ] [ -19.2099 -1.0464 0.0 ] [ 6.2429 -12.0802 0.0 ] [ 6.2429 -12.0802 2.7351 ] ]
[ [ 6.2429 -12.0802 2.7351 ] [ 6.2429 -12.0802 0.0 ] [ 2.0882 -1.5668 0.0 ] [ 2.0882 -1.5668 6.294 ] ]
( [ 6.2429 -12.0802 0.0 ] [ -19.2099 -1.0464 0.0 ] [ -8.6965 3.1084 0.0 ] [ 2.0882 -1.5668 0.0 ] ) ) |
Okay, finally tested and found where the problem is. On line 18 of geom/src/thi/ng/geom/basicmesh.cljc Lines 17 to 22 in 85783a1
After removing the extra sequence deconstruction around |
And of course after fixing that I get a stack overflow. |
Hi @seylerius - I'm in the middle of a relocation and will take a while until I can look into this. In the meanwhile, please post a minimal example to reproduce your issue, thanks! 👍 |
When trying to convert a mesh (tested with either basic-mesh or gmesh) to a CSG node (using
csg/mesh->csg
) to compute the union of several nodes, I receive the following error.No implementation of method: :- of protocol: #'thi.ng.math.core/IMathOps found for class: java.lang.Double
. Further investigation shows that it's happening in theortho-normal
function, which is being used when computing the plane for each polygon. At first glance, this seems to be a reoccurrence of #40, which featured the same error with:+
instead. I've reproduced the stack trace below.The text was updated successfully, but these errors were encountered: