jscad / csg.js

DEPRECATED: CSG Library for JSCAD (See the link below)
https://github.com/jscad/OpenJSCAD.org/tree/master/packages/modeling
MIT License
218 stars 56 forks source link

Evaluate csg optimization #174

Closed FishOrBear closed 4 years ago

FishOrBear commented 5 years ago

I am here to see optimization about csg, I hope to help.

https://github.com/mrdoob/three.js/issues/16099#issuecomment-495749017

Just thought I'd drop these links here for inspiration and in case anyone wants to dive really deep into them. I came across this CSG tool in Unity that has some really impressive performance and content creation capabilities:

https://assetstore.unity.com/packages/tools/modeling/realtime-csg-69542

And it looks like the creator has written a few articles on the implementation (there are six parts in total):

http://sandervanrossen.blogspot.com/2010/05/realtime-csg-optimizations.html
http://sandervanrossen.blogspot.com/2010/05/realtime-csg-part-5.html
z3dev commented 5 years ago

@FishOrBear Cool! I'll take a look at those in a few days.

FYI, we haven't been sitting on our lorals. I've been building up some performance tests to compare V1 and V2 versions of the library. I can only produce the numbers for the 'primitive' shapes but even these are impressive. I'm expecting even better performance on the CPU / MEMORY intensive functions like union, etc.

z3dev commented 5 years ago

v2-versus-v1.pdf

FishOrBear commented 5 years ago

Cool, when can the v2 version be enabled?

z3dev commented 5 years ago

I’m hoping sometime in August as there is a lot of change required to synchronize everything.

If you are looking for something to do... :)

z3dev commented 4 years ago

@FishOrBear V2 is almost complete now. Have you tried to use this version?

There are lots of optimizations, and we continue to improve the internals.

Please see OpenJSCAD.org, V2 branch.

FishOrBear commented 4 years ago

@FishOrBear V2 is almost complete now. Have you tried to use this version?

There are lots of optimizations, and we continue to improve the internals.

Please see OpenJSCAD.org, V2 branch.

not yet.

For me, the most important thing is accuracy, and it would be great if it could be improved.

z3dev commented 4 years ago

I’m going to close this as there has been progress on both performance as well as accuracy in V2. Specific issues should be opened against V2.

@FishOrBear Please reopen if you think there’s something to discuss further.