-
Notifications
You must be signed in to change notification settings - Fork 11
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
Possible bug in LRSplineVolume::insert_line ? #37
Comments
This is for sure a bug. Good catch. My initial thoughts is that this is related to floating point precision. The LRSpline library is sadly not terrible robust when it comes to near-hit meshlines (when looking if the meshline exist or note), and I'm pretty sure it also commits the cardinal sin of comparing floating-point numbers using The short-term fix is to only consider knot vectors in multiples of 2-n (which can be done by rescaling the original knot vector to contain integer numbers and by refining through only halving element sizes. The long-term fix is to insert custom tolerance into the library, but the biggest roadblock here is to find a good hashing function for the |
This bug should be closed once #48 is merged to trunk. In short, the file provided:
This should not contain the w-knot 0.75 as all
and none of these span the entire support of basis function 1372. |
Context: I have 50 solutions, each with 204 patches, linear and quadratic. Of all these combinations, this bug reproduces only twice. I've attached the smallest of those two reproducing examples. For what it's worth, it does not repro on any of the quadratic cases I have, but it could be that they are just not fine enough.
The problem boils down to the following: create two patches (A and B) with the same order and parameter space, but potentially different topology and control points, or even physical dimension. Copy all mesh rectangles from A over to B, and then back again. The resulting two patches should be topologically identical. In particular they should have the same number of basis functions.
In each reproducing case, one of the patches (A) I picked had to be from a specific solution (out of the 50), but the bug reproed with any other solution playing the role of B. Whether you copy from A to B first or vice-versa does not seem to matter.
Two patch files and a small program that demonstrates the mismatching lengths can be found here:
https://gist.github.com/TheBB/a9c22ee1acc96caed2b7bff7884cd822
Output:
The text was updated successfully, but these errors were encountered: