pyboxbuilder.builders.sliding_hinge.SlidingHingeBoxBuilder

class pyboxbuilder.builders.sliding_hinge.SlidingHingeBoxBuilder(label: str, box_id: str | None = None, size: tuple[float, float, float] | None = None, position: tuple[float, float, float] | None = None, stackable: StackableMode | None = None, stackable_shape: 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: 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, magnet_type: MagnetType | None = None, magnet_size: tuple[float, float, float] | None = None, final_size: tuple[float, float, float] | None = None, expandable: bool = True, expandable_width: bool = True, expandable_length: bool = True, no_rotate: bool = False, expandable_height: bool = True, wall_thickness: float | None = None, floor_thickness: float | None = None, lid_thickness: float | None = None, rounding: float | None = None, base_rounding: float | None = None, base_chamfer: float | bool | None = None, inner_rounding: float | None = None, lid: LidBuilder | None = None, pattern: PatternBuilder | PatternType | str | None = None, pattern_color: Color | str | None = None, pattern_colors: tuple[Color | str, ...] | list[Color | str] | None = None, backing_pattern: PatternBuilder | PatternType | str | None = None, color: Color | None = None, finger_holes: tuple[FingerHoleBuilder, ...] = (), auto_finger_holes: bool = True, compartments: tuple[CompartmentBuilder, ...] = (), allocates: tuple[tuple[str, int], ...] = (), tilt_to_lift: bool = True, keystone: bool = False, ribbon_channel: bool | None = None, catch_type: CatchType | None = CatchType.SLIDE_ACROSS, catch_size: float | None = None, slide_catch_style: str = 'front', interlock_type: InterlockType | None = None, interlock_clearance: float = 0.15, interlock_size: float | tuple[float, ...] | None = None, interlock_sides: tuple[int | str, ...] | None = None, polygon_sides: int | None = None, polygon_apothem: float | None = None, hinge_count: int | None = None, filament_diameter: float | None = None, hinge_catch_type: HingeCatchType = HingeCatchType.SLIDE_ACROSS, pip_radial_clearance: float = 0.28)[source]

Bases: BoxBuilder

Builder for hinged lid box with a captive sliding or rotary spin catch (BoxType.SLIDING_HINGE).

Combines a filament-pin knuckle hinge along the back edge with a print-in-place mechanical retention catch — defaulting to a captive horizontal dovetail sliding bolt (CatchType.SLIDE_ACROSS), with support for CatchType.SLIDE_UP, CatchType.SPIN (rotary turn-button cam catch), CatchType.PUSH_BUTTON, CatchType.TOGGLE_LATCH, CatchType.PINCH_SLIDE, and CatchType.ROTARY_BOLT, as well as dual side-wall card-library sliding latches (slide_catch_style="card_library").

Example

project = Project("SlidingHingeDemo")
project.box(
    BoxType.SLIDING_HINGE,
    "SlidingHingeDeck",
    size=(70.0, 55.0, 26.0),
    catch_type=CatchType.SLIDE_ACROSS,
)
project.show(show_lids=True)
Loading 3-D preview…

⬇ Download STL mesh

catch_type : CatchType | None = 'slide_across'

Retention catch mechanism (SLIDE_ACROSS, SLIDE_UP, SPIN, PUSH_BUTTON, TOGGLE_LATCH, PINCH_SLIDE, ROTARY_BOLT).

filament_diameter : float | None = None

Pin/filament stock diameter in mm; None uses default (1.75mm).

hinge_catch_type : HingeCatchType = 'slide_across'

Hinge catch mechanism enum fallback.

hinge_count : int | None = None

Knuckles across the rear filament hinge; None uses default (5).

pip_radial_clearance : float = 0.28

Print-in-place clearance in mm for captive sliding or spinning catch parts.

slide_catch_style : str = 'front'

Placement style for SLIDE_ACROSS ('front' single front bolt or 'card_library' dual side bolts).