The LINE entity (DXF Reference) is a 3D line defined by the DXF attributes dxf.start and dxf.end. The LINE entity has WCS coordinates.

Subclass of ezdxf.entities.DXFGraphic
DXF type 'LINE'
Factory function ezdxf.layouts.BaseLayout.add_line()
Inherited DXF Attributes Common graphical DXF attributes


Do not instantiate entity classes by yourself - always use the provided factory functions!

class ezdxf.entities.Line

start point of line (2D/3D Point in WCS)


end point of line (2D/3D Point in WCS)


Line thickness in 3D space in direction extrusion, default value is 0. This value should not be confused with the lineweight value.


extrusion vector, default value is (0, 0, 1)

transform(m: ezdxf.math._matrix44.Matrix44) → ezdxf.entities.line.Line

Transform the LINE entity by transformation matrix m inplace.

translate(dx: float, dy: float, dz: float) → ezdxf.entities.line.Line

Optimized LINE translation about dx in x-axis, dy in y-axis and dz in z-axis.