Checks that the workplane has the number of faces and vertices expected in X, Y, and Z. :param workplane: The workplane to assess. :param nFacesXYZ: The number of faces expected in +X, +Y, and +Z planes. :param nVerticesXYZ: The number of vertices expected in
(self, workplane, nFacesXYZ, nVerticesXYZ)
| 99 | self.assertAlmostEqual(fusedShape.findSolid().Volume(), 8) |
| 100 | |
| 101 | def assertNFacesAndNVertices(self, workplane, nFacesXYZ, nVerticesXYZ): |
| 102 | """ |
| 103 | Checks that the workplane has the number of faces and vertices expected |
| 104 | in X, Y, and Z. |
| 105 | :param workplane: The workplane to assess. |
| 106 | :param nFacesXYZ: The number of faces expected in +X, +Y, and +Z planes. |
| 107 | :param nVerticesXYZ: The number of vertices expected in +X, +Y, and +Z planes. |
| 108 | """ |
| 109 | nFacesX, nFacesY, nFacesZ = nFacesXYZ |
| 110 | nVerticesX, nVerticesY, nVerticesZ = nVerticesXYZ |
| 111 | |
| 112 | self.assertEqual(workplane.faces("+X").size(), nFacesX) |
| 113 | self.assertEqual(workplane.faces("+X").vertices().size(), nVerticesX) |
| 114 | |
| 115 | self.assertEqual(workplane.faces("+Y").size(), nFacesY) |
| 116 | self.assertEqual(workplane.faces("+Y").vertices().size(), nVerticesY) |
| 117 | |
| 118 | self.assertEqual(workplane.faces("+Z").size(), nFacesZ) |
| 119 | self.assertEqual(workplane.faces("+Z").vertices().size(), nVerticesZ) |
| 120 | |
| 121 | def testInvalidImportTypeRaisesRuntimeError(self): |
| 122 | fileName = os.path.join(OUTDIR, "tempSTEP.step") |
no test coverage detected