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

Function test_edgeOn

tests/test_free_functions.py:318–343  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

316
317
318def test_edgeOn():
319
320 # make a base face
321 f = torus(10, 4).faces()
322
323 # construct an edge with points
324 e1 = edgeOn(f, [(0, 0), (0, 1), (1, 1), (1, 0)], periodic=True)
325
326 assert e1.isValid()
327 assert e1.hasPCurve(f)
328
329 # use it to make a face
330 f1 = f.trim(wire(e1))
331
332 assert f1.isValid()
333
334 # construct in uv space directly
335 e2 = edgeOn(f, circle(0.3))
336
337 assert e2.isValid()
338 assert e2.hasPCurve(f)
339
340 # use it to make a face
341 f2 = f.trim(wire(e2))
342
343 assert f2.isValid()
344
345
346def test_faceOn():

Callers

nothing calls this directly

Calls 8

torusFunction · 0.85
edgeOnFunction · 0.85
wireFunction · 0.85
circleFunction · 0.85
isValidMethod · 0.80
hasPCurveMethod · 0.80
facesMethod · 0.45
trimMethod · 0.45

Tested by

no test coverage detected