def apply_construction_tool(self, e: ConstructionEllipse) -> 'Ellipse': """ Set ELLIPSE data from construction tool :class:`ezdxf.math.ConstructionEllipse`. """ self.update_dxf_attribs(e.dxfattribs()) return self # floating interface
def apply_construction_tool(self, e: ConstructionEllipse) -> None: """ Set ELLIPSE data from construction tool :class:`ezdxf.math.ConstructionEllipse`. .. versionadded:: 0.13 """ self.update_dxf_attribs(e.dxfattribs())
def test_dxfattribs(): e = ConstructionEllipse() attribs = e.dxfattribs() assert attribs['center'] == (0, 0, 0) assert attribs['major_axis'] == (1, 0, 0) assert 'minor_axis' not in attribs assert attribs['extrusion'] == (0, 0, 1) assert attribs['ratio'] == 1.0 assert attribs['start_param'] == 0 assert attribs['end_param'] == math.tau
def test_dxfattribs(): e = ConstructionEllipse() attribs = e.dxfattribs() assert attribs["center"] == (0, 0, 0) assert attribs["major_axis"] == (1, 0, 0) assert "minor_axis" not in attribs assert attribs["extrusion"] == (0, 0, 1) assert attribs["ratio"] == 1.0 assert attribs["start_param"] == 0 assert attribs["end_param"] == math.tau