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

Method testWorkplaneCenterMove

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

Source from the content-addressed store, hash-verified

1919 self.assertEqual(10, c.faces().size())
1920
1921 def testWorkplaneCenterMove(self):
1922 # this workplane is centered at x=0.5,y=0.5, the center of the upper face
1923 s = (
1924 Workplane("XY").box(1, 1, 1).faces(">Z").workplane().center(-0.5, -0.5)
1925 ) # move the center to the corner
1926
1927 t = s.circle(0.25).extrude(0.2) # make a boss
1928 self.assertEqual(9, t.faces().size())
1929 self.saveModel(t)
1930
1931 def testBasicLines(self):
1932 "Make a triangular boss"

Callers

nothing calls this directly

Calls 9

saveModelMethod · 0.95
WorkplaneClass · 0.85
centerMethod · 0.80
workplaneMethod · 0.80
boxMethod · 0.80
extrudeMethod · 0.80
facesMethod · 0.45
circleMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected