refactor: excel parse

This commit is contained in:
Blizzard
2026-04-16 10:01:11 +08:00
parent 680ecc320f
commit f62f95ec02
7941 changed files with 2899112 additions and 0 deletions
@@ -0,0 +1,26 @@
# Copyright (c) 2010-2022, Manfred Moitzi
# License: MIT License
from typing import Sequence, Union, Callable, Any, NamedTuple, Optional
from .types import DXFVertex, DXFTag, cast_tag_value
def SingleValue(value: Union[str, float], code: int = 1) -> DXFTag:
return DXFTag(code, cast_tag_value(code, value))
def Point2D(value: Sequence[float]) -> DXFVertex:
return DXFVertex(10, (value[0], value[1]))
def Point3D(value: Sequence[float]) -> DXFVertex:
return DXFVertex(10, (value[0], value[1], value[2]))
class HeaderVarDef(NamedTuple):
name: str
code: int
factory: Callable[[Any], Any]
mindxf: str
maxdxf: str
priority: int
default: Optional[Any] = None