File: functions.rst

package info (click to toggle)
ezdxf 0.18.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 46,952 kB
  • sloc: python: 158,141; javascript: 166; cpp: 138; makefile: 116; lisp: 20
file content (51 lines) | stat: -rw-r--r-- 1,344 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
Functions
=========

.. _DXF Unicode Decoder:

DXF Unicode Decoder
-------------------

The DXF format uses a special form of unicode encoding: "\\U+xxxx".

To avoid a speed penalty such encoded characters are not decoded
automatically by the regular loading function:func:`ezdxf.readfile`,
only the :mod:`~ezdxf.recover` module does the decoding
automatically, because this loading mode is already slow.

This kind of encoding is most likely used only in older DXF versions, because
since DXF R2007 the whole DXF file is encoded in ``utf8`` and a special unicode
encoding is not necessary.

The :func:`ezdxf.has_dxf_unicode` and :func:`ezdxf.decode_dxf_unicode` are
new support functions to decode unicode characters "\\U+xxxx" manually.

.. autofunction:: ezdxf.has_dxf_unicode

.. autofunction:: ezdxf.decode_dxf_unicode

Tools
-----

Some handy tool functions used internally by ``ezdxf``.

.. autofunction:: ezdxf.tools.juliandate

.. autofunction:: ezdxf.tools.calendardate

.. autofunction:: ezdxf.tools.set_flag_state

.. autofunction:: ezdxf.tools.guid

.. autofunction:: ezdxf.tools.bytes_to_hexstr

.. autofunction:: ezdxf.tools.suppress_zeros

.. autofunction:: ezdxf.tools.normalize_text_angle

SAT Format "Encryption"
-----------------------

.. autofunction:: ezdxf.tools.crypt.encode

.. autofunction:: ezdxf.tools.crypt.decode