-
Notifications
You must be signed in to change notification settings - Fork 152
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
Call Stack problems #23
Comments
I have an updated fork here |
Your fork is exactly the same except missing the face.vertexNormal fix |
Owh, sorry. I thought that there were more fixes in my fork... |
I provided the vertex normal fix... |
Your branch is fully up-to-date with Chandlers and you both provide exact same ThreeCSG.js files. |
@Yenza Yes, you are right. He recently merged my patch1... |
Maximum call stack happens with complex geometry for two reasons:
Solving either of these would gain large speed improvements, especially for complex geometries. There are many white papers / thesis on CSG which provide ideas for selecting a good divider. Unfortunately I won't have time for a while to actively look into implementing. |
@Wilt Do you think you could try to fix this issue? @chandlerprall But it isn't that very complex! It's two round shapes! It's two identical "almost" circle-wise shapes on the same height. The thing is that if I move any of them like 1 unit in any direction.. then it works! I have an image of the red area when using the intersect method that causes an error: Also this problem doesn't seem to be occurring when you use the old csg wrapper but that might just be because it's heavily outdated. |
So this is what I did to fix this for now... I dunno why it works but it does. The "var test = new ThreeBSP(shape)" doesn't though x.x
|
FYI this new CSG repo using Octree data structure overcomes a lot of the performance issues with ThreeCSG and other CSG tools. See this SO thread for up to date information. |
Using three.min.js rev 73
Method used:
var roomBSP = new ThreeBSP(_RoomShape); // HUGE SHAPE
Info gathered from a TryCatch:
"number : -2146828260"
"Error: Out of stack space
at ThreeBSP.Vertex.prototype.dot (/ThreeCSG.js)
at ThreeBSP.Polygon.prototype.classifyVertex (/ThreeCSG.js)
at ThreeBSP.Polygon.prototype.classifySide (/ThreeCSG.js)
at ThreeBSP.Polygon.prototype.splitPolygon (/ThreeCSG.js)
at ThreeBSP.Node (/ThreeCSG.js)
at ThreeBSP.Node (/ThreeCSG.js)
at ThreeBSP.Node (/ThreeCSG.js)
at ThreeBSP.Node (/ThreeCSG.js)
at ThreeBSP.Node (/ThreeCSG.js)
at ThreeBSP.Node (/ThreeCSG.js)"
Using the OUTDATED csg-wrapper from kraag22/csg-wrapper it doesn't happen but his wrapper is way outdated and needs an update.
Might this occur when using high values/numbers?
Another example:
var intersect = shape1.intersect(shape2); // Small shapes
Info gathered from a TryCatch:
"number : -2146828260"
-:-
The text was updated successfully, but these errors were encountered: