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

Method testSplineShape

tests/test_cadquery.py:2110–2126  ·  view source on GitHub ↗

Tests making a shape with an edge that is a spline

(self)

Source from the content-addressed store, hash-verified

2108 self.saveModel(p)
2109
2110 def testSplineShape(self):
2111 """
2112 Tests making a shape with an edge that is a spline
2113 """
2114 s = Workplane(Plane.XY())
2115 sPnts = [
2116 (2.75, 1.5),
2117 (2.5, 1.75),
2118 (2.0, 1.5),
2119 (1.5, 1.0),
2120 (1.0, 1.25),
2121 (0.5, 1.0),
2122 (0, 1.0),
2123 ]
2124 r = s.lineTo(3.0, 0).lineTo(3.0, 1.0).spline(sPnts).close()
2125 r = r.extrude(0.5)
2126 self.saveModel(r)
2127
2128 def testSimpleMirror(self):
2129 """

Callers

nothing calls this directly

Calls 7

lineToMethod · 0.95
saveModelMethod · 0.95
WorkplaneClass · 0.85
XYMethod · 0.80
extrudeMethod · 0.80
closeMethod · 0.45
splineMethod · 0.45

Tested by

no test coverage detected