Tests to make sure that a CadQuery object is converted correctly to SVG
(self)
| 121 | self.assertEqual(type(r), OCP.TopoDS.TopoDS_Solid) |
| 122 | |
| 123 | def testToSVG(self): |
| 124 | """ |
| 125 | Tests to make sure that a CadQuery object is converted correctly to SVG |
| 126 | """ |
| 127 | r = Workplane("XY").rect(5, 5).extrude(5) |
| 128 | |
| 129 | r_str = r.toSvg() |
| 130 | |
| 131 | # Make sure that a couple of sections from the SVG output make sense |
| 132 | self.assertTrue(r_str.index('path d="M') > 0) |
| 133 | self.assertTrue( |
| 134 | r_str.index('line x1="30" y1="-30" x2="58" y2="-15" stroke-width="3"') > 0 |
| 135 | ) |
| 136 | |
| 137 | def testCubePlugin(self): |
| 138 | """ |