-
-
Notifications
You must be signed in to change notification settings - Fork 35.3k
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
ConeGeometry contains degenerate triangles #29454
Labels
Comments
It's probably using a double instead of an integer with a known range. You'll need to do this instead of var currentStep = 0;
for (var c=0; c<totalSteps; c++) {
if (desiredRation >= ration_step*c)) {
currentStep = c;
}
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
ConeGeometry extends CylinderGeometry and simply sets the top radius to 0 resulting in one triangle of all the 2-triangle rectanglar sides being reduced to an edge. Eg a cone with 3 sides should require a total of 6 triangles - but instead consists of 9. 3 of which are degenerate triangles.
You can see the triangles that are being reduced to an edge as the top radius gets smaller:
Degenerate triangles like this can cause issues with any algorithms that require computing triangle normals, take surface area, generating half-edge structures, etc. It would be great if the core three.js primitives could be properly constructed without degenerate triangle issues.
Reproduction steps
Code
Live example
Screenshots
No response
Version
dev
Device
No response
Browser
No response
OS
No response
The text was updated successfully, but these errors were encountered: