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

T-vertices after subtracting mesh from a plane #202

Closed
xavierjs opened this issue Feb 17, 2024 · 4 comments
Closed

T-vertices after subtracting mesh from a plane #202

xavierjs opened this issue Feb 17, 2024 · 4 comments
Labels
question Further information is requested

Comments

@xavierjs
Copy link

xavierjs commented Feb 17, 2024

Hello,

First, thank you for this library, it is very fast and really good.
When I subtract a mesh from a plane to get the plane with a hole matching the mesh clipped shape, I noticed that there are T-vertices.

I use HOLLOW_SUBTRACTION operator. I did a small screenshot video by opening the mesh exported with THREE.GLTFExporter with Blender:

simplescreenrecorder-2024-02-16_23.02.21.mp4

However, the generated geometry is right. It is just that the T-vertices make it difficult to compute the contour or to simplify.
Is T-vertices removal is on your roadmap? Or there is a way to avoid them?

I am using the v0.0.16 NPM package

Thank you in advance

@gkjohnson
Copy link
Owner

This is the nature of the current triangle clipping algorithm. Issues #51 and #97 outline some solutions but I have no specific timeline for implementation, if at all. If this is something you're interested in contributing I can point you to the areas of the codebase to start.

@gkjohnson gkjohnson added the question Further information is requested label Feb 18, 2024
@xavierjs
Copy link
Author

Hi @gkjohnson
Thank you for your reply.

I will work on a small open three.js lib to detect & remove T-vertices. I did some research and I found nothing.
It is an issue in some cases for meshes done with your lib, but also in other cases like 3D printing. So I think it is better to do a separate project.

I will post the link here once done.

@gkjohnson
Copy link
Owner

Sounds great! If you'd like to contribute it this project, as well, I'd be happy to publish this kind post-process retopology step along side the CSG operations as a utility since it's related.

@xavierjs
Copy link
Author

xavierjs commented Mar 3, 2024

Hi @gkjohnson,

I have developed a small lib to remove T-vertices. Here is the link to the Github repo: https://github.com/WebAR-rocks/three-tvert-killer
There is an NPM package.
It is released under MIT software license.
I hope it will be helpful for other folks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants