0

I am trying to perform a boolean operation on 2 mesh files imported from objloader using THREE.js and ThreeCSG interactively for multiple times and in real time. I just wanted to ask if there is any ways to optimize the CSG code to decrease the run time of the boolean operation by decreasing the resolution (link) or the number or size of the BSP trees to make the program run real time or faster? the objects I am using are pretty big so this is one of the reasons its running slowly. Thanks in advance for all your help.

gman
  • 100,619
  • 31
  • 269
  • 393
Arezoo Tony
  • 69
  • 1
  • 8

1 Answers1

1

you can tinker with CSG.Plane.EPSILON parameter if you increase it the CSG operation should be faster, but more crude

Derte Trdelnik
  • 2,656
  • 1
  • 22
  • 26
  • I tried to increase the number from 1e-5 to 1e+20 but it did not change in terms of running time. How big can I increase it as it is the tolerance to check whether the point is on the plane. And is there any other parameters that can help to accelerate the boolean operation ? – Arezoo Tony Aug 08 '16 at 14:33
  • use just small decrements :) from 1e-5 to 1e-3, etc. I used ".1" and it became noticeably faster. I will revert back to 1e-5 when exporting the model, because the smaller the Epsilon, the higher the quality. – Drout Jan 31 '21 at 01:36