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

Method makeCubes

tests/test_cadquery.py:144–151  ·  view source on GitHub ↗
(self, length)

Source from the content-addressed store, hash-verified

142 # make the plugin method
143
144 def makeCubes(self, length):
145 # self refers to the CQ or Workplane object
146
147 # create the solid
148 s = Solid.makeBox(length, length, length, Vector(0, 0, 0))
149
150 # use CQ utility method to iterate over the stack an position the cubes
151 return self.eachpoint(lambda loc: s.located(loc), True)
152
153 # link the plugin in
154 Workplane.makeCubes = makeCubes

Callers 1

testCubePluginMethod · 0.80

Calls 4

VectorClass · 0.85
makeBoxMethod · 0.80
eachpointMethod · 0.80
locatedMethod · 0.45

Tested by

no test coverage detected