Arc¶
ARC (DXF Reference) center at location dxf.center
and radius of dxf.radius
from dxf.start_angle
to
dxf.end_angle
. ARC goes always from dxf.start_angle
to dxf.end_angle
in counter clockwise
orientation around the dxf.extrusion
vector, which is (0, 0, 1)
by default and the usual case for 2D
arcs.
Subclass of |
|
DXF type |
|
Factory function |
|
Inherited DXF attributes |
Warning
Do not instantiate entity classes by yourself - always use the provided factory functions!
-
class
ezdxf.entities.
Arc
¶ -
-
dxf.
radius
¶ Radius of arc (float)
-
dxf.
start_angle
¶ Start angle in degrees (float)
-
dxf.
end_angle
¶ End angle in degrees (float)
-
start_point
¶ Returns the start point of the arc in WCS, takes OCS into account.
-
end_point
¶ Returns the end point of the arc in WCS, takes OCS into account.
-
angles
(num: int) → Iterable[float]¶ Returns num angles from start- to end angle in degrees in counter clockwise order.
All angles are normalized in the range from [0, 360).
-
flattening
(sagitta: float) → Iterable[Vertex]¶ Approximate the arc by vertices in WCS, argument segment is the max. distance from the center of an arc segment to the center of its chord. Yields
Vec2
objects for 2D arcs andVec3
objects for 3D arcs.New in version 0.15.
-
transform
(m: Matrix44) → Arc¶ Transform ARC entity by transformation matrix m inplace.
Raises
NonUniformScalingError()
for non uniform scaling.
-
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
-
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
-
construction_tool
() → ConstructionArc¶ Returns 2D construction tool
ezdxf.math.ConstructionArc
, ignoring the extrusion vector.
-
apply_construction_tool
(arc: ConstructionArc) → Arc¶ Set ARC data from construction tool
ezdxf.math.ConstructionArc
, will not change the extrusion vector.
-