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

Function test_splitFace

test_python/test_splitFace.py:5–22  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3
4
5def test_splitFace():
6 R1 = 2
7 R2 = 1
8 torus = mrmesh.makeTorus(R1, R2, 10, 10, None)
9
10 numFaces = torus.topology.numValidFaces()
11 faceMap = mrmesh.FaceHashMap()
12 orgFace = mrmesh.FaceId(2)
13 torus.splitFace(orgFace, None, faceMap)
14
15 assert torus.topology.numValidFaces() == numFaces + 2
16 assert faceMap[mrmesh.FaceId(numFaces)].get() == orgFace.get()
17 assert faceMap[mrmesh.FaceId(numFaces + 1)].get() == orgFace.get()
18 assert faceMap.size() == 2
19
20 torus.splitEdge(mrmesh.EdgeId(2), None, faceMap)
21 assert torus.topology.numValidFaces() == numFaces + 4
22 assert faceMap.size() == 4

Callers

nothing calls this directly

Calls 5

numValidFacesMethod · 0.80
splitFaceMethod · 0.45
getMethod · 0.45
sizeMethod · 0.45
splitEdgeMethod · 0.45

Tested by

no test coverage detected