three-bvh-csg icon indicating copy to clipboard operation
three-bvh-csg copied to clipboard

Tests: Add tests to validate triangle splitting

Open gkjohnson opened this issue 2 years ago • 12 comments

Requirements

  • Move triangle splitting function from three-mesh-bvh to this repo for ease of updating (#70)
  • Add series of jest tests for validating found edges and correct results
  • Add series of jest tests for validating correct splitting of triangles (TriangleSplitter)
  • See how viable it is to procedurally

Notes

  • Ensure parallel, coplanar triangles are tested
  • Ensure identical triangles are tested
  • Ensure vertex-intersecting triangles are tested
  • Ensure corner cases like overlapping vertices, edges are tested
  • Ensure identical triangles are tested

gkjohnson avatar Sep 12 '22 01:09 gkjohnson

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

agviegas avatar Sep 15 '22 22:09 agviegas

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?

HugoGresse avatar Apr 15 '24 20:04 HugoGresse

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.

gkjohnson avatar Apr 16 '24 16:04 gkjohnson

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 :(

HugoGresse avatar Apr 16 '24 16:04 HugoGresse

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

gkjohnson avatar Apr 16 '24 16:04 gkjohnson

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

hrgdavor avatar Apr 16 '24 16:04 hrgdavor

@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.

gkjohnson avatar Apr 16 '24 16:04 gkjohnson

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.

hrgdavor avatar Apr 16 '24 16:04 hrgdavor

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 avatar Apr 16 '24 17:04 gkjohnson

@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.

gkjohnson avatar Apr 17 '24 05:04 gkjohnson

@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.

HugoGresse avatar Jun 11 '24 08:06 HugoGresse

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.

gkjohnson avatar Jun 22 '24 08:06 gkjohnson