About bgeo file
tiannahaha opened this issue · 8 comments
I used the partio library to output particles, which is a bgeo file. However, the following error occurred during surface reconstruction:
thread 'main' panicked at 'attempt to divide by zero', C:\Users\psdz\.cargo\registry\src\github.com-1ecc6299db9ec823\nom-7.1.2\src\multi\mod.rs:576:32, and then RUST_BACKTRACE
Is it because I didn't use the bgeo file output by splishsplash or what else?
It is possible that SplishSplash and splashsurf either use a version of the partio library and the file format that is incompatible to the one you use or that we expect the particle data in the file in a specific order/type etc. that doesn't match the one you are trying to import.
The error message is of course also not ideal. Maybe I can improve that too.
Do you have a small bgeo file that causes the error that you can share here for debugging?
Oh, so it is,
I wonder if this file can help debug:
frame_16_cube.zip
Thank you for your reply and look forward to your update, which will help me a lot
Ok, there were actually two problems:
- The error message you saw was because of a regression in a dependency (rust-bakery/nom#1617) which caused all BGEO imports to break (even the test cases with my own files), I pinned the dependency to the most recent version that works.
- After this fix, your file still failed. It was a different bug in my code while parsing attributes that I fixed now (it only allowed multiple components for "Vector" type attributes, but apparently in BGEO, "Int" and "Float" attributes can also have multiple components)
Maybe you can try again now with the latest commit on Github and see if it works like you expected.
There is still a divide by zero error.
Is there any mistake in this way?( I deleted the old version and downloaded it again.)
👀
Or should I make some changes to the rust?
Thank you for your patience!
That is curious. How are you running/building splashsurf? Are you using cargo install
or are you using the GitHub repository?
If you use cargo install
you would have to point it to this repository because I didn't publish a new version to crates.io yet (want to see if it works for you first). You can do this by running cargo install --git git@github.com:w1th0utnam3/splashsurf.git
.
As you said, I did use cargo install
. I updated the splashsurf version by running the command:
cargo install --git https://github.com/w1th0utnam3/splashsurf.git
It is very gratifying that it ran successfully.
Thank you very much for your generosity.
Great, then I will soon publish a new version with these fixes.
Thank you and look forward to your update~