gkjohnson / three-bvh-csg

A flexible, memory compact, fast and dynamic CSG implementation on top of three-mesh-bvh
MIT License
617 stars 48 forks source link

Tests: Add tests to validate triangle splitting #73

Open gkjohnson opened 2 years ago

gkjohnson commented 2 years ago

Requirements

Notes

agviegas commented 2 years ago

Hey, we are offering a bounty of $250 for this issue. Whoever solves it, will get that money. 😎

HugoGresse commented 6 months ago

Currently having a triangle issue when exporting as STL for 3D printing, do you think it's related?

image

Is there some workaround with the lib or are you aware of another great library for Three.js CSG?

gkjohnson commented 6 months ago

It's known that there are cases where the CSG operations fail to produce a solid mesh. At some point I want to change the approach used in the triangle clipping algorithm to something that should be a bit more robust and faster but there are other priorities at the moment. Even so, though, I don't believe there's a perfect solution when relying on floating point math so there will still be cases where this fails.

If this is for professional work and you'd like to fund and prioritize these kinds of improvements I'm happy to talk about that.

HugoGresse commented 6 months ago

I just want to make plant vase for 3D printer using JS, no much "pro" in that, just a hobby. I'll try using CSG.js but I had a working prototype using three-bvh-csg :(

gkjohnson commented 6 months ago

Gotcha - yeah sorry I may get to it at some point. I'm otherwise not aware of other CSG libraries that are as fast.

hrgdavor commented 6 months ago

I retract my comment due to project owner disproval of the content

gkjohnson commented 6 months ago

@hrgdavor stalking someone else's project so you advertise your own and siphon users is incredibly toxic and bad form (multiple times, now). If you'd like to advertise your project there are plenty of opportunities on forums or twitter to get the word out.

I haven't used Manifold CAD but it looks like a great project. I'm happy to add a link to something like that in the README to point to if users are more interested in a fully robust solution that's slower. But I'm not going to tolerate popping up in issues to recommend your own work.

hrgdavor commented 6 months ago

I have noticed your toxic behavior already in your replies to other issues, and that is why i did not post any links in the linked post you mention. I subscribed to you project github before manifold library was even started because i thought your project had potential. I will gladly delete my posts and unsubscribe from your git. I definitely do not want to be involved with a person like you in the future. I hope you can muster to be more polite to your active users, as I am definitely not going to be one after this.

gkjohnson commented 6 months ago

I'm not going to claim I don't have days where I'm imperfect in my responses or certain issues or behaviors that are particularly frustrating to me. I'm not interested in having bad blood here. But it's incredibly discouraging to have someone come into a project and try to direct people away when they're trying to contribute or I'm trying to help when I put some much time into these projects.

I appreciate your comment and it's something I need to work on, as well.

gkjohnson commented 6 months ago

@HugoGresse It occurs to me that #203 makes some fixes to help coplanarity issues which is what it looks like you're running into here (though it's hard to tell).

Would you be able to give that PR a try? I can produce a build file for you. And if you have the time to provide a repro code for your issue it would be helpful for testing when I get around to trying the new triangle splitting technique I want to implement in the future.

HugoGresse commented 5 months ago

@HugoGresse It occurs to me that #203 makes some fixes to help coplanarity issues which is what it looks like you're running into here (though it's hard to tell).

Would you be able to give that PR a try? I can produce a build file for you. And if you have the time to provide a repro code for your issue it would be helpful for testing when I get around to trying the new triangle splitting technique I want to implement in the future.

Oh I did not see that. I've changed the visibility of my repo I'll try to test the PR linked this week.

gkjohnson commented 4 months ago

Oh I did not see that. I've changed the visibility of my repo I'll try to test the PR linked this week.

Great, thanks. I'm thinking in the new few months I'll be able to revisit the triangle clipping logic and this will be a good test case for the project.