Comments (8)
Can you please produce a simpler example that just includes the two geometries and the clipping operation and the wireframe?
Sure. here's a stripped down version.
from three-bvh-csg.
Looks like the eges issue can't be easily reproduced at the moment - we can track it down when it arrises another time:
![image](https://private-user-images.githubusercontent.com/734200/293824661-1638a741-62cd-445d-9745-2b94d1e86dd3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTI2NDA3MjIsIm5iZiI6MTcxMjY0MDQyMiwicGF0aCI6Ii83MzQyMDAvMjkzODI0NjYxLTE2MzhhNzQxLTYyY2QtNDQ1ZC05NzQ1LTJiOTRkMWU4NmRkMy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNDA5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDQwOVQwNTI3MDJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT03MTU1NzY2ZGIzMjJiMzcxNzQzMGEwNmQ4YmU0NzAzZjBjNmMxODljM2I1MDkwNDExMGJiNTIwMDE5MTM0NzU1JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.t2rNsRZmUSJWkzTp2MNWf2W4c_Y4-Q4SNw3jjiei3EE)
from three-bvh-csg.
Interesting - I'm also seeing that "intersectionEdges" is reporting some odd extraneous edges:
![image](https://private-user-images.githubusercontent.com/734200/285085299-0b915599-96df-4ffe-bccd-298c423aa2cd.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTI2NDA3MjIsIm5iZiI6MTcxMjY0MDQyMiwicGF0aCI6Ii83MzQyMDAvMjg1MDg1Mjk5LTBiOTE1NTk5LTk2ZGYtNGZmZS1iY2NkLTI5OGM0MjNhYTJjZC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNDA5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDQwOVQwNTI3MDJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hYzBiOGViNDdjMjJmNGM3ZmZiZmQwYTY1ZDBmYTUxM2U0OTM1NDA2OWZhYmMwNzI1NDIzMmNmNGRlM2RkNmRmJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.QrIcGXwFErzDzYRXLaiI77deSQ26sQmD5VwuOJAmeL0)
Can you please produce a simpler example that just includes the two geometries and the clipping operation and the wireframe?
isWaterTight reports true for this mesh,
Also note that is water tight is not documented and not currently fully functional.
from three-bvh-csg.
I fixed #183 in v0.0.15 which seemed to be related but it does not seem to have fixed this issue. Are you seeing this same kind of issue with any simpler models? Ideally generated models from the three.js primitives?
from three-bvh-csg.
I've not yet seen it happen from a single subtraction between two threejs primitives, but I have seen it happen after multiple consecutive subtractions. I'll see if I can produce a simpler example on the latest update this week. Thank you for investigating!
from three-bvh-csg.
It looks this this is happening as part of the "full triangle" accumulation step - ie the step where unclipped triangles are appended to the result.
![image](https://private-user-images.githubusercontent.com/734200/293700379-a9ccf8df-655f-4ea2-9ea7-eb1f1d3a8b4a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTI2NDA3MjIsIm5iZiI6MTcxMjY0MDQyMiwicGF0aCI6Ii83MzQyMDAvMjkzNzAwMzc5LWE5Y2NmOGRmLTY1NWYtNGVhMi05ZWE3LWViMWYxZDNhOGI0YS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNDA5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDQwOVQwNTI3MDJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1mMzJhZmIxZDFkMDVjMzcyMDVmNGQ1MzBiOTM4YmNkMmM3ODA5ZTBjYjMxYzVlMDc3NmUxZWIwOWFkOWVhODA3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.pNBXtTR5ftNqMWrDb-yXBmHXkEhahIlohLGG-kzu7q4)
These edges look like they intersect the the clip volume but the intersection detection skips triangles marked as "degenerate". It seems they're inadvertently being added to the result geometry elsewhere, instead.
![image](https://private-user-images.githubusercontent.com/734200/293701715-3ed83c53-e83e-4927-9eaa-a5b9931549d6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTI2NDA3MjIsIm5iZiI6MTcxMjY0MDQyMiwicGF0aCI6Ii83MzQyMDAvMjkzNzAxNzE1LTNlZDgzYzUzLWU4M2UtNDkyNy05ZWFhLWE1Yjk5MzE1NDlkNi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNDA5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDQwOVQwNTI3MDJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0yNDdjZTc1ZTdiYjU5YThkOWFlNTBmYTI1NWE1ZjE3MWI0NDQ5M2QyOTkxYjkxMzFkZDFmMGU4ODMyNDQ5ODU3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.1EIFGGr5SMrLG7RdSQx7_UDLwS5urjh3Jn6t0mcONUk)
They're gone if we filter triangles with area === 0 when building the result geometry:
![image](https://private-user-images.githubusercontent.com/734200/293703127-9cf0dbcf-aa6a-4fb9-9d24-8e0df57a9816.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTI2NDA3MjIsIm5iZiI6MTcxMjY0MDQyMiwicGF0aCI6Ii83MzQyMDAvMjkzNzAzMTI3LTljZjBkYmNmLWFhNmEtNGZiOS05ZDI0LThlMGRmNTdhOTgxNi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNDA5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDQwOVQwNTI3MDJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kZjcyYzQwYTczNzBiNjZmNzk1ZGY1YjRjZjYwMGJlNGEzODExY2MzNzI1NzIzNGMzMDgyOWQwMTAwOGE4YTQ2JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.bTSoijEvIZ0Lq9XUkMo1BovdRKimK6jN1k5st4V55-8)
These degenerate triangles are in the original model, as well - 563 of them. I guess these will have to be filtered out during the clip process. I'll just have to think abut the right place to do it.
from three-bvh-csg.
#193 should fix it:
![image](https://private-user-images.githubusercontent.com/734200/293720300-88254135-076e-4899-b9bf-23b4da737009.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTI2NDA3MjIsIm5iZiI6MTcxMjY0MDQyMiwicGF0aCI6Ii83MzQyMDAvMjkzNzIwMzAwLTg4MjU0MTM1LTA3NmUtNDg5OS1iOWJmLTIzYjRkYTczNzAwOS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNDA5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDQwOVQwNTI3MDJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0xYjllYjRkN2Q1YWZiZjc0ZWUwYzQwMjIxYWJiZWZjODcyMDM5OTY2YmExZWM4MThkNWI1YWYxNTI5YWQ4YTYwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.7aShXmocBODkm7zOiQ6tv4I30utGaiflyXHk9NOztcA)
![image](https://private-user-images.githubusercontent.com/734200/293721862-74fd89a4-e682-406f-ad2a-7f55e34ca6db.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTI2NDA3MjIsIm5iZiI6MTcxMjY0MDQyMiwicGF0aCI6Ii83MzQyMDAvMjkzNzIxODYyLTc0ZmQ4OWE0LWU2ODItNDA2Zi1hZDJhLTdmNTVlMzRjYTZkYi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNDA5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDQwOVQwNTI3MDJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0yNDEzZjZlNGYxOTJmN2FhM2FjZTc1NWNiY2VkZDEyOGI1NzYzOTgxYzMyN2I2YTAxYTUyMDViYzM5MGExYmExJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.m6ypbY7mr1telmMs-LMasLvFkq4f0WS5OF_Fvzcerzk)
from three-bvh-csg.
I still want to check out the "intersection edges" issue listed above, though.
from three-bvh-csg.
Related Issues (20)
- Fast winding numbers
- Bounding box of csg geometry sometimes does not match the geometry (is much more bigger) HOT 4
- Orphaned Triangles After Operation HOT 6
- Planar faces failure HOT 1
- Texture not showing when exporting scene HOT 4
- Performance Issus when two bufferGeometries evaluate HOT 1
- Weird result using Three CSG HOT 2
- New failure case HOT 1
- Fix "isTriDegenerate" function
- Intersecting edges are being incorrectly reported HOT 1
- Any hint to avoid hitting maxDepth? HOT 1
- How to use multiple ExtrudeGeometry holes HOT 2
- Clear cached bounding boxes from result
- Large performance cost for coplanar triangles HOT 13
- I would like to ask, is there anything wrong with my Boolean operation to create geometry? HOT 1
- Result object of csg evaluator doesn't have textures HOT 8
- T-vertices after subtracting mesh from a plane HOT 4
- csg operation error HOT 4
- How to update a CSG Operation HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from three-bvh-csg.