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

Method testParametricSurface

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

Source from the content-addressed store, hash-verified

5238 f3 = Face.makeSplineApprox(pts, smoothing=(1, 1, 1), maxDeg=3)
5239
5240 def testParametricSurface(self):
5241
5242 from math import pi, cos
5243
5244 r1 = Workplane().parametricSurface(
5245 lambda u, v: (u, v, cos(pi * u) * cos(pi * v)), start=-1, stop=1
5246 )
5247
5248 self.assertTrue(r1.faces().val().isValid())
5249
5250 r2 = Workplane().box(1, 1, 3).split(r1)
5251
5252 self.assertTrue(r2.solids().val().isValid())
5253 self.assertEqual(r2.solids().size(), 2)
5254
5255 def testEdgeWireClose(self):
5256

Callers

nothing calls this directly

Calls 9

WorkplaneClass · 0.85
parametricSurfaceMethod · 0.80
isValidMethod · 0.80
boxMethod · 0.80
valMethod · 0.45
facesMethod · 0.45
splitMethod · 0.45
solidsMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected