pyboxbuilder.box.spec.UnresolvedBoxSpec¶
- class pyboxbuilder.box.spec.UnresolvedBoxSpec(label: str = 'box', width: float | None = None, length: float | None = None, height: float | None = None, wall_thickness: float = 2.0, floor_thickness: float = 1.6, lid_thickness: float = 2.0, hollow: bool = True, path: tuple[tuple[float, float], ...] = (), interior_top: float | None = None, wall_tops: dict[~pyboxbuilder.enums.ScoopSide, float] = <factory>, open_sides: tuple[~pyboxbuilder.enums.ScoopSide, ...] = (), mid_wall_height_ratio: float | None = None, end_wall_length: float = 30.0, rounding: float | None = None, base_rounding: float | None = None, base_chamfer: float | bool | None = None, inner_rounding: float | None = None, rim_free: bool = False, rim_rounding: float | None = None, lid_corner_rounding: float | None = None, finger_holes: tuple[~typing.Any, ...] = (), auto_finger_holes: bool = True, size_spacing: float = 0.2, sliding_slack: float = 0.1, cap_slack: float = 0.2, slip_slack: float = 0.2, lid_slide_axis: str | None = None, dovetail: bool = True, lead_chamfer: float | None = None, catch_type: ~pyboxbuilder.enums.CatchType | str | None = None, catch_size: float | None = None, catch_radius: float | None = None, latch_radius: float = 1.2, fingernail_catch: bool = True, fingernail_radius: float | None = None, fingernail_depth: float | None = None, lid_border_margin_mm: float | None = None, cap_height: float | None = None, cap_finger_cutouts: bool = True, cap_finger_radius: float | None = None, cap_finger_length: float | None = None, cap_finger_height: float | None = None, foot: float = 2.0, slip: float = 1.6, slipover_gap: float | None = None, slipover_finger_height: float | None = None, inset: float = 1.0, hinge_count: int = 5, hinge_pin_diameter: float = 3.0, filament_diameter: float = 1.75, hinge_catch_type: ~pyboxbuilder.enums.HingeCatchType | None = None, magnet_type: ~pyboxbuilder.enums.MagnetType | None = None, magnet_size: tuple[float, float, float] | None = None, magnet_diameter: float = 6.0, magnet_height: float = 3.0, magnet_count_width: int = 2, magnet_count_length: int = 2, stackable: ~pyboxbuilder.enums.StackableMode | None = None, stackable_shape: ~pyboxbuilder.enums.StackableShape | None = None, stackable_pyramid_count: int | tuple[int, ...] | None = None, stackable_top_pyramid_count: int | tuple[int, ...] | None = None, stackable_bottom_pyramid_count: int | tuple[int, ...] | None = None, stackable_top: bool = True, stackable_bottom: bool = True, stackable_printer_safe: bool = True, stackable_pattern: ~pyboxbuilder.enums.PatternType | None = None, stackable_pattern_spacing: float | None = None, stackable_pattern_web: float | None = None, stackable_pattern_border: float | None = None, stackable_thickness: float | None = None, stackable_fit_offset: float = 0.15, stackable_foot_size: float | None = None, stackable_foot_height: float = 1.6, stackable_foot_inset: float | None = None, tilt_to_lift: bool = True, keystone: bool = False, ribbon_channel: bool = False, cantilever_thickness: float = 2.0, cantilever_width: float = 14.0, deflection_clearance: float = 0.25, detent_height: float = 0.8, latch_axis: ~pyboxbuilder.enums.LatchAxis = LatchAxis.X, lug_count: int = 4, turn_angle: float = 90.0, lug_height: float = 2.5, lug_depth: float = 1.2, bayonet_slack: float = 0.3, round_footprint: bool = False, thread_pitch: float = 3.0, thread_turns: float = 2.0, thread_clearance: float = 0.25, thread_depth: float = 1.0, chute_angle: float = 0.0, tile_angle: float | None = None, token_thickness: float = 3.0, dispense_slot_clearance: float = 0.8, sight_slot_width: float = 8.0, sight_slot_start: float | None = None, dispenser_mode: ~pyboxbuilder.enums.DispenserExtractionMode = DispenserExtractionMode.SCOOP, scoop_radius: float = 14.0, floor_scoop_depth: float = 12.0, floor_scoop_width: float = 24.0, tray_depth: float = 20.0, rear_push_width: float = 22.0, arch_height: float | None = None, draw_angle: float = 20.0, retaining_lip_height: float = 10.0, discard_well: bool = True, arena_wall_height: float = 28.0, felt_pocket_depth: float = 1.2, corner_deflectors: bool = True, push_hole_radius: float = 0.0, drawer_handle_style: ~pyboxbuilder.enums.DrawerHandleStyle = DrawerHandleStyle.HANDLE, drawer_handle_length: float = 4.0, drawer_pull_lip: float = 4.0, sleeve_slack: float = 0.25, sleeve_wall_thickness: float | None = None, spine_gap: float = 1.0, clamshell_hinge_radius: float = 2.5, closure_latch: bool = True, interlock_type: ~pyboxbuilder.enums.InterlockType | None = None, interlock_clearance: float = 0.15, interlock_size: float | tuple[float, ...] | None = None, interlock_sides: tuple[int | str, ...] | None = None, dovetail_clearance: float = 0.15, gridfinity_pitch: float = 42.0, polygon_sides: int | None = None, polygon_apothem: float | None = None, pip_radial_clearance: float = 0.35, pip_axial_clearance: float = 0.4, pip_cone_angle: float = 45.0, pip_hinge_radius: float = 3.0, pip_bridge_width: float = 0.4, pip_bridge_thickness: float = 0.4, pip_snap_catch: bool = True, pip_snap_width: float = 12.0, pip_snap_diameter: float = 3.0, pip_gap_mm: float = 1.0, inset_hinge_side_gap: float = 3.0, inset_hinge_tab_height: float = 6.0, slide_catch_style: str = 'front')[source]¶
Bases:
objectDeclaration-phase box specification where dimensions may be deferred (FR-091).
Permits unassigned envelope dimensions (
width: float | None,length: float | None,height: float | None) for derivation during card packing, compartment auto-sizing, and bin packing.-
classmethod from_builder(builder: BoxBuilder, project: Project | ProjectManifest | None =
None) UnresolvedBoxSpec[source]¶ Create an unresolved specification from a BoxBuilder and Project defaults.
-
resolve(width: float | None =
None, length: float | None =None, height: float | None =None, **overrides: Any) BoxSpec[source]¶ Resolve this declaration into an immutable ResolvedBoxSpec.
- Parameters:¶
- Returns:¶
A frozen
ResolvedBoxSpecwith validated non-null dimensions.- Raises:¶
ValueError – If width, length, or height cannot be resolved.
-
classmethod from_builder(builder: BoxBuilder, project: Project | ProjectManifest | None =