MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / test_overhangs

Function test_overhangs

test_python/test_overhangs.py:5–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3
4
5def test_overhangs():
6 torusbase = mrmesh.makeTorus(2, 1, 32, 32, None)
7 torustop = mrmesh.makeTorus(2, 1, 32, 32, None)
8 torustop.transform(mrmesh.AffineXf3f.translation(mrmesh.Vector3f(0, 0, 3.0)))
9
10 mergedMesh = mrmesh.mergeMeshes([torusbase, torustop])
11
12 oParams = mrmesh.FindOverhangsSettings()
13 oParams.layerHeight = 0.1
14 oParams.maxOverhangDistance = 0.1
15 overhangs = mrmesh.findOverhangs(mergedMesh, oParams)
16 # if base has Z size bigger than one layer than it is overhang too
17 # however the base layer is not considered as an overhang,
18 # thus the overhang is split into outer and inner parts
19 assert (
20 overhangs.size() == 3
21 )

Callers

nothing calls this directly

Calls 3

translationMethod · 0.80
transformMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected