kumiki.ticket¶
Flat import path
kumiki/__init__.py re-exports everything on this page via from kumiki import *, so every name below is also available directly as kumiki.AccessoryTicket -- you do not need to import from the submodule path shown in the heading above.
kumiki.ticket
¶
Ticket system for hierarchical naming and metadata.
Tickets are immutable labels that can be attached to timbers, joints, accessories, and feature concepts. The path field encodes hierarchy using '/' as a separator, e.g. "posts/frontleft" or "door/boards/1". Folders are implicit in the path and will be rendered as actual folders in the layer view.
AccessoryTicket
dataclass
¶
BoardTicket
dataclass
¶
BoardTicket(path: str = UNNAMED_TICKET_PATH, material: Optional[str] = None, reference_faces: Optional[tuple[str, ...]] = None, tags: tuple[TimberTag, ...] = ())
GenericTag
dataclass
¶
JointTicket
dataclass
¶
Member
¶
Bases: str, Enum
The structural role a timber plays in a frame.
Roles form a tree (see _MEMBER_PARENT): a summer beam is a beam, and a beam is horizontal. A timber wears at most one of these; ask about the broader roles with is_a rather than tagging them as well.
Closed on purpose: the drawing system will key default marking instructions off these names, and a role with no instructions of its own can fall back to its parent's. Adding a role is a line here and a line in _MEMBER_PARENT; a label that is not a structural role belongs in a GenericTag.
MemberTag
dataclass
¶
Bases: TimberTag
Names this timber's structural role. The name must be a Member value.
__post_init__
¶
Source code in kumiki/ticket.py
SliceTag
dataclass
¶
Ticket
dataclass
¶
Bases: ABC
Base ticket shared by all ticket categories.
The category is represented by the concrete subclass rather than an enum field.
hierarchical identifier using '/' as separator.
e.g. "posts/frontleft", "door/boards/1" The last segment is the display name; preceding segments are folder names.
kumiki_id
class-attribute
instance-attribute
¶
TimberTag
dataclass
¶
Bases: ABC
A label on a timber ticket.
The kind is the concrete subclass. A tag carries nothing but its name; anything shared between timbers wearing the same tag is looked up by that name elsewhere.
TimberTicket
dataclass
¶
TimberTicket(path: str = UNNAMED_TICKET_PATH, material: Optional[str] = None, reference_faces: Optional[tuple[str, ...]] = None, tags: tuple[TimberTag, ...] = ())
Bases: Ticket
Ticket metadata for physical timber members.
reference_faces
class-attribute
instance-attribute
¶
__post_init__
¶
with_member
¶
with_member(member: Union[Member, str]) -> Self
Return a copy in this member role, replacing whatever role it had.
with_tags cannot do this: a second role is an error, not an addition.
Source code in kumiki/ticket.py
as_timber_tag
¶
Convert a tag parameter to a TimberTag, a bare string becoming a GenericTag.
Source code in kumiki/ticket.py
normalize_timber_tags
¶
Coerce, strip, drop empty names, dedupe on (kind, name), and sort for a stable order.