Circle

CIRCLE (DXF Reference) center at location dxf.center and radius of dxf.radius.

Subclass of

ezdxf.entities.DXFGraphic

DXF type

'CIRCLE'

Factory function

ezdxf.layouts.BaseLayout.add_circle()

Inherited DXF attributes

Common graphical DXF attributes

Warning

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

class ezdxf.entities.Circle
dxf.center

Center point of circle (2D/3D Point in OCS)

dxf.radius

Radius of circle (float)

vertices(angle: Iterable[float]) → Iterable[Vector]

Yields vertices of the circle for iterable angles in WCS. This method takes into account a local OCS.

Parameters

angles – iterable of angles in OCS as degrees, angle goes counter clockwise around the extrusion vector, ocs x-axis = 0 deg.

New in version 0.11.

transform(m: Matrix44) → Circle

Transform CIRCLE entity by transformation matrix m inplace.

Raises NonUniformScalingError() for non uniform scaling.

New in version 0.13.

translate(dx: float, dy: float, dz: float) → Circle

Optimized CIRCLE/ARC translation about dx in x-axis, dy in y-axis and dz in z-axis, returns self (floating interface).

New in version 0.13.

to_ellipse(replace=True) → Ellipse

Convert CIRCLE/ARC to an Ellipse entity.

Adds the new ELLIPSE entity to the entity database and to the same layout as the source entity.

Parameters

replace – replace (delete) source entity by ELLIPSE entity if True

New in version 0.13.

to_spline(replace=True) → Spline

Convert CIRCLE/ARC to a Spline entity.

Adds the new SPLINE entity to the entity database and to the same layout as the source entity.

Parameters

replace – replace (delete) source entity by SPLINE entity if True

New in version 0.13.