MCPcopy
hub / github.com/CadQuery/cadquery / testCombineSolidsInLoop

Method testCombineSolidsInLoop

tests/test_cadquery.py:2864–2880  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2862 self.assertEqual(11, objects2.faces().size())
2863
2864 def testCombineSolidsInLoop(self):
2865 # duplicates a memory problem of some kind reported when combining lots of objects
2866 s = Workplane("XY").rect(0.5, 0.5).extrude(5.0)
2867 o = []
2868 beginTime = time.time()
2869 for i in range(15):
2870 t = Workplane("XY").center(10.0 * i, 0).rect(0.5, 0.5).extrude(5.0)
2871 o.append(t)
2872
2873 # append the 'good way'
2874 for oo in o:
2875 s.add(oo)
2876 s = s.combine()
2877
2878 print("Total time %0.3f" % (time.time() - beginTime))
2879
2880 self.saveModel(s)
2881
2882 def testClean(self):
2883 """

Callers

nothing calls this directly

Calls 8

saveModelMethod · 0.95
WorkplaneClass · 0.85
extrudeMethod · 0.80
centerMethod · 0.80
appendMethod · 0.80
rectMethod · 0.45
addMethod · 0.45
combineMethod · 0.45

Tested by

no test coverage detected