DXF Types
Required DXF tag interface:
property
code
: group code as intproperty
value
: tag value of unspecific type
dxfstr()
: returns the DXF string
clone()
: returns a deep copy of tag
DXFTag Factory Functions
DXFTag
- class ezdxf.lldxf.types.DXFTag(code: int, value: Any)
Immutable DXFTag class.
- Parameters:
code – group code as int
value – tag value, type depends on group code
- code
group code as int (do not change)
- value
tag value (read-only property)
- __iter__()
Returns (code, value) tuples.
- __repr__() str
Returns representation string
'DXFTag(code, value)'
.
- __str__() str
Returns content string
'(code, value)'
.
- clone() DXFTag
Returns a clone of itself, this method is necessary for the more complex (and not immutable) DXF tag types.
- dxfstr() str
Returns the DXF string e.g.
' 0\nLINE\n'
DXFBinaryTag
DXFVertex
- class ezdxf.lldxf.types.DXFVertex(DXFTag)
Represents a 2D or 3D vertex, stores only the group code of the x-component of the vertex, because the y-group-code is x-group-code + 10 and z-group-code id x-group-code+20, this is a rule that ALWAYS applies. This tag is immutable by design, not by implementation.
- Parameters:
code – group code of x-component
value – sequence of x, y and optional z values
- dxfstr() str
Returns the DXF string for all vertex components.
NONE_TAG
- ezdxf.lldxf.types.NONE_TAG
Special tag representing a none existing tag.