summaryrefslogtreecommitdiff
path: root/docs/object-api.rst
blob: 796806ca1ad62e1fe1c4debde52b0f37caf814f4 (plain)
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
Graphic Objects
===============

Graphic objects are the lego blocks a gerbonara :py:class:`.GerberFile` or :py:class:`.ExcellonFile` is built from. They
are stored in the file's :py:attr:`~.GerberFile.objects` attribute of a :py:class:`.GerberFile`. You can directly
manipulate that list from code.

There are four graphic object types: :py:class:`.Flash`, :py:class:`~.graphic_objects.Line`,
:py:class:`~.graphic_objects.Arc`, and :py:class:`~.graphic_objects.Region` . All of them are derived from
:py:class:`~.graphic_objects.GraphicObject`.

.. autoclass:: gerbonara.graphic_objects.GraphicObject
   :members:

.. autoclass:: gerbonara.graphic_objects.Flash
   :members:

.. autoclass:: gerbonara.graphic_objects.Line
   :members:

.. autoclass:: gerbonara.graphic_objects.Arc
   :members:

.. autoclass:: gerbonara.graphic_objects.Region
   :members:

.. _pcb-tools: https://github.com/opiopan/pcb-tools-extension
.. _gerbolyze: https://github.com/jaseg/gerbolyze
.. _svg-flatten: https://github.com/jaseg/gerbolyze/tree/main/svg-flatten