File: hatching.rst

package info (click to toggle)
ezdxf 1.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 104,528 kB
  • sloc: python: 182,341; makefile: 116; lisp: 20; ansic: 4
file content (112 lines) | stat: -rw-r--r-- 2,038 bytes parent folder | download
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112

Hatching
========

.. module:: ezdxf.render.hatching

This module provides rendering support for hatch patterns as used in
:class:`~ezdxf.entities.Hatch` and :class:`~ezdxf.entities.MPolygon` entities.

High Level Functions
--------------------

.. autofunction:: hatch_entity

.. autofunction:: hatch_polygons

.. autofunction:: hatch_paths

Classes
-------

.. autoclass:: HatchBaseLine

    .. automethod:: hatch_line

    .. automethod:: pattern_renderer

    .. automethod:: signed_distance


.. autoclass:: HatchLine

    .. automethod:: intersect_line

    .. automethod:: intersect_cubic_bezier_curve


.. autoclass:: PatternRenderer

    .. automethod:: render


.. autoclass:: Intersection

    .. attribute:: type

        intersection type as :class:`IntersectionType` instance

    .. attribute:: p0

        (first) intersection point as :class:`~ezdxf.math.Vec2` instance

    .. attribute:: p1

        second intersection point as :class:`~ezdxf.math.Vec2` instance, only if
        :attr:`type` is COLLINEAR

.. autoclass:: IntersectionType

    .. attribute:: NONE

        no intersection

    .. attribute:: REGULAR

        regular intersection point at a polygon edge or a Bèzier curve

    .. attribute:: START

        intersection point at the start vertex of a polygon edge

    .. attribute:: END

        intersection point at the end vertex of a polygon edge

    .. attribute:: COLLINEAR

        intersection is collinear to a polygon edge

.. autoclass:: Line

    .. attribute:: start

        start point as :class:`~ezdxf.math.Vec2` instance

    .. attribute:: end

        end point as :class:`~ezdxf.math.Vec2` instance


    .. attribute:: distance

        signed normal distance to the :class:`HatchBaseLine`


Helper Functions
----------------

.. autofunction:: hatch_boundary_paths

.. autofunction:: hatch_line_distances

.. autofunction:: pattern_baselines

Exceptions
----------

.. autoclass:: HatchingError

.. autoclass:: HatchLineDirectionError

.. autoclass:: DenseHatchingLinesError