This change to the way solids are matched within merge_all() leads to significant speedup of file processing. In my tests, a 243-volume CAD file had its processing time reduced from 28 minutes to 3 minutes.
It caches volumes, bounding boxes, and centers, of meshed and unmeshed volumes, rather than repeatedly calling the CadQuery volume calculation inside a nested loop. While it changes the inputs arguments for similar_solids, it doesn't appear that function is used anywhere else, so overall this method modification has a small footprint.
This change to the way solids are matched within
merge_all()
leads to significant speedup of file processing. In my tests, a 243-volume CAD file had its processing time reduced from 28 minutes to 3 minutes.It caches volumes, bounding boxes, and centers, of meshed and unmeshed volumes, rather than repeatedly calling the CadQuery volume calculation inside a nested loop. While it changes the inputs arguments for
similar_solids
, it doesn't appear that function is used anywhere else, so overall this method modification has a small footprint.