File: vport_table_entry.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 (129 lines) | stat: -rw-r--r-- 3,149 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
VPort
=====

.. module:: ezdxf.entities
    :noindex:

The viewport table (`DXF Reference`_) stores the modelspace viewport
configurations. So this entries just modelspace viewports, not paperspace
viewports, for paperspace viewports see the :class:`Viewport` entity.

======================== ==========================================
Subclass of              :class:`ezdxf.entities.DXFEntity`
DXF type                 ``'VPORT'``
Factory function         :meth:`Drawing.viewports.new`
======================== ==========================================

.. seealso::

    DXF Internals: :ref:`vport_table_internals`

.. class:: VPort

    Subclass of :class:`DXFEntity`

    Defines a viewport configurations for the modelspace.

    .. attribute:: dxf.owner

        Handle to owner (:class:`~ezdxf.sections.table.ViewportTable`).

    .. attribute:: dxf.name

        Viewport name

    .. attribute:: dxf.flags

        Standard flag values (bit-coded values):

        === ==============================================================
        16  If set, table entry is externally dependent on an xref
        32  If both this bit and bit 16 are set, the externally dependent xref
            has been successfully resolved
        64  If set, the table entry was referenced by at least one entity in the
            drawing the last time the drawing was edited. (This flag is only for
            the benefit of AutoCAD)
        === ==============================================================

    .. attribute:: dxf.lower_left

        Lower-left corner of viewport

    .. attribute:: dxf.upper_right

        Upper-right corner of viewport

    .. attribute:: dxf.center

        View center point (in :ref:`DCS`)

    .. attribute:: dxf.snap_base

        Snap base point (in :ref:`DCS`)

    .. attribute:: dxf.snap_spacing

        Snap spacing X and Y

    .. attribute:: dxf.grid_spacing

        Grid spacing X and Y

    .. attribute:: dxf.direction

        View direction from target point (in :ref:`WCS`)

    .. attribute:: dxf.target

        View target point (in :ref:`WCS`)

    .. attribute:: dxf.height

        View height

    .. attribute:: dxf.aspect_ratio

    .. attribute:: dxf.lens_length

        Lens focal length in mm

    .. attribute:: dxf.front_clipping

        Front clipping plane (offset from target point)

    .. attribute:: dxf.back_clipping

        Back clipping plane (offset from target point)

    .. attribute:: dxf.snap_rotation

        Snap rotation angle in degrees

    .. attribute:: dxf.view_twist

        View twist angle in degrees

    .. attribute:: dxf.status

    .. attribute:: dxf.view_mode

    .. attribute:: dxf.circle_zoom

    .. attribute:: dxf.fast_zoom

    .. attribute:: dxf.ucs_icon

       - bit 0: 0=hide, 1=show
       - bit 1: 0=display in lower left corner, 1=display at origin

    .. attribute:: dxf.snap_on

    .. attribute:: dxf.grid_on

    .. attribute:: dxf.snap_style

    .. attribute:: dxf.snap_isopair

    .. automethod:: reset_wcs

.. _DXF Reference: http://help.autodesk.com/view/OARX/2018/ENU/?guid=GUID-8CE7CC87-27BD-4490-89DA-C21F516415A9