(self)
| 5083 | self.assertEqual(len(result.Solids()), 4) |
| 5084 | |
| 5085 | def test2Dfillet(self): |
| 5086 | |
| 5087 | r = Workplane().rect(1, 2).wires().val() |
| 5088 | f = Face.makeFromWires(r) |
| 5089 | verts = r.Vertices() |
| 5090 | |
| 5091 | self.assertEqual(len(f.fillet2D(0.5, verts).Vertices()), 6) |
| 5092 | self.assertEqual(len(r.fillet2D(0.5, verts).Vertices()), 6) |
| 5093 | self.assertEqual(len(r.fillet2D(0.25, verts).Vertices()), 8) |
| 5094 | |
| 5095 | # Test fillet2D with open wire and single vertex |
| 5096 | w0 = Workplane().hLine(1).vLine(1).wire() |
| 5097 | w0_verts = w0.vertices(">X and <Y").vals() |
| 5098 | unfilleted_wire0 = w0.val() |
| 5099 | filleted_wire0 = unfilleted_wire0.fillet2D(0.5, w0_verts) |
| 5100 | |
| 5101 | self.assertEqual(len(filleted_wire0.Vertices()), 4) |
| 5102 | |
| 5103 | # the filleted wire is shorter than the original |
| 5104 | self.assertGreater(unfilleted_wire0.Length() - filleted_wire0.Length(), 0.1) |
| 5105 | |
| 5106 | def test2Dchamfer(self): |
| 5107 |
nothing calls this directly
no test coverage detected