1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
|
Arc
===
.. module:: ezdxf.entities
:noindex:
The ARC entity (`DXF Reference`_) represents a circular arc, which is defined by the DXF
attributes :attr:`dxf.center`, :attr:`dxf.radius`, :attr:`dxf.start_angle` and
:attr:`dxf.end_angle`.
The arc-curve goes always from :attr:`dxf.start_angle` to :attr:`dxf.end_angle` in
counter-clockwise orientation around the :attr:`dxf.extrusion` vector, which is (0, 0, 1)
by default and the usual case for 2D arcs. The ARC entity has :ref:`OCS`
coordinates.
The helper tool :class:`ezdxf.math.ConstructionArc` supports creating arcs from
various scenarios, like from 3 points or 2 points and an angle or 2 points and
a radius and the :mod:`~ezdxf.upright` module can convert inverted extrusion vectors
from (0, 0, -1) to (0, 0, 1) without changing the curve.
.. seealso::
- :ref:`tut_dxf_primitives`, section :ref:`tut_dxf_primitives_arc`
- :class:`ezdxf.math.ConstructionArc`
- :ref:`Object Coordinate System`
- :mod:`ezdxf.upright` module
======================== ==========================================
Subclass of :class:`ezdxf.entities.Circle`
DXF type ``'ARC'``
Factory function :meth:`ezdxf.layouts.BaseLayout.add_arc`
Inherited DXF attributes :ref:`Common graphical DXF attributes`
======================== ==========================================
.. warning::
Do not instantiate entity classes by yourself - always use the provided
factory functions!
.. class:: Arc
.. attribute:: dxf.center
Center point of arc (2D/3D Point in :ref:`OCS`)
.. attribute:: dxf.radius
Radius of arc (float)
.. attribute:: dxf.start_angle
Start angle in degrees (float)
.. attribute:: dxf.end_angle
End angle in degrees (float)
.. autoattribute:: start_point
.. autoattribute:: end_point
.. automethod:: angles
.. automethod:: flattening
.. automethod:: transform
.. automethod:: to_ellipse
.. automethod:: to_spline
.. automethod:: construction_tool
.. automethod:: apply_construction_tool
.. _DXF Reference: http://help.autodesk.com/view/OARX/2018/ENU/?guid=GUID-0B14D8F1-0EBA-44BF-9108-57D8CE614BC8
|