Ellipse¶
ELLIPSE (DXF Reference) with center point at location dxf.center and a major axis dxf.major_axis as vector.
dxf.ratio is the ratio of minor axis to major axis. dxf.start_param and dxf.end_param
defines the starting- and the end point of the ellipse, a full ellipse goes from 0 to 2*pi.
The ellipse goes from starting- to end param in counter clockwise direction.
dxf.extrusion is supported, but does not establish an OCS, but creates an 3D entity by
extruding the base ellipse in direction of the dxf.extrusion vector.
Subclass of |
|
DXF type |
|
factory function |
|
Inherited DXF attributes |
|
Required DXF version |
DXF R2000 ( |
-
class
ezdxf.entities.Ellipse¶ -
-
dxf.major_axis¶ Endpoint of major axis, relative to the
dxf.center(Vector), default value is(1, 0, 0).
-
dxf.ratio¶ Ratio of minor axis to major axis (float), has to be in range from
0.000001to1, default value is1.
-
dxf.start_param¶ Start parameter (float), default value is
0.
-
dxf.end_param¶ End parameter (float), default value is
2*pi.
-
start_point¶ Returns the start point of the ellipse in WCS.
New in version 0.11.
-
end_point¶ Returns the end point of the ellipse in WCS.
New in version 0.11.
-
minor_axis¶ Returns the minor axis of the ellipse as
Vectorin WCS.New in version 0.12.
-
construction_tool() → ConstructionEllipse¶ Returns construction tool
ezdxf.math.ConstructionEllipse.New in version 0.13.
-
apply_construction_tool(e: ConstructionEllipse) → Ellipse¶ Set ELLIPSE data from construction tool
ezdxf.math.ConstructionEllipse.New in version 0.13.
-
vertices(params: Iterable[float]) → Iterable[Vector]¶ Yields vertices on ellipse for iterable params in WCS.
- Parameters
params – param values in the range from
0to2*piin radians, param goes counter clockwise around the extrusion vector, major_axis = local x-axis = 0 rad.
-
params(num: int) → Iterable[float]¶ Returns num params from start- to end param in counter clockwise order.
All params are normalized in the range from [0, 2pi).
-
transform(m: Matrix44) → Ellipse¶ Transform ELLIPSE entity by transformation matrix m inplace.
New in version 0.13.
-
translate(dx: float, dy: float, dz: float) → Ellipse¶ Optimized ELLIPSE 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_spline(replace=True) → Spline¶ Convert ELLIPSE to a
Splineentity.Adds the new SPLINE entity to the entity database and to the same layout as the source entity.
- Parameters
layout – modelspace- , paperspace- or block layout
replace – replace (delete) source entity by SPLINE entity if
True
New in version 0.13.
-
classmethod
from_arc(entity: DXFGraphic) → Ellipse¶ Create a new ELLIPSE entity from ARC or CIRCLE entity.
The new SPLINE entity has no owner, no handle, is not stored in the entity database nor assigned to any layout!
New in version 0.13.
-