Skip to content
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

Tests: Add tests to validate triangle splitting #73

Open
gkjohnson opened this issue Sep 12, 2022 · 11 comments
Open

Tests: Add tests to validate triangle splitting #73

gkjohnson opened this issue Sep 12, 2022 · 11 comments
Labels
bounty help wanted Extra attention is needed
Milestone

Comments

@gkjohnson
Copy link
Owner

gkjohnson commented Sep 12, 2022

Requirements

  • Move triangle splitting function from three-mesh-bvh to this repo for ease of updating (Bring the triangle clipping / intersection functions into this repo #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 gkjohnson added the help wanted Extra attention is needed label Sep 12, 2022
@gkjohnson gkjohnson added this to the v0.0.x milestone Sep 12, 2022
@agviegas
Copy link

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

@gkjohnson gkjohnson changed the title Add tests to validate triangle splitting Tests: Add tests to validate triangle splitting Sep 20, 2022
@gkjohnson gkjohnson modified the milestones: v0.0.x, v0.0.3 Jan 5, 2023
@gkjohnson gkjohnson modified the milestones: v0.0.3, v0.0.4, v0.0.x Jan 13, 2023
@HugoGresse
Copy link

HugoGresse commented Apr 15, 2024

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
Copy link
Owner Author

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
Copy link

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
Copy link
Owner Author

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

This comment was marked as spam.

@gkjohnson
Copy link
Owner Author

@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
Copy link

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
Copy link
Owner Author

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
Copy link
Owner Author

@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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bounty help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants