Code Reference
LockableBox
LockableBox(
inner_width,
inner_length,
inner_height,
inner_lid_height=None,
thickness=1.5,
clearance=0.4,
)
Lockable boxes are simple boxes which can be locked with a padlock. There is an overlap between the body and the lid, which has to be long enough to prevent opening the box when it's locked.
All dimensions are the internal space available in the container.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
inner_width
|
float
|
Inner width. This side will have the lock parts |
required |
inner_length
|
float
|
Inner length |
required |
inner_height
|
float
|
Inner height |
required |
inner_lid_height
|
float | None
|
Optional inner lid height. Defaults to the minimum acceptable height when not specified. |
None
|
thickness
|
float
|
Optional walls thickness |
1.5
|
clearance
|
float
|
Optional assembly clearance. A good value is two times the diameter of the printing nozzle |
0.4
|
Raises:
| Type | Description |
|---|---|
BaseException
|
when provided arguments won't work to create valid solids |
Source code in src/bd_el_parts/lockable_box.py
LOCK_THICKNESS
class-attribute
instance-attribute
Thickness of the flat part of the lock part
inner_body_height
instance-attribute
Computed body height
inner_lid_height
instance-attribute
Value from initializer: optional lid height
assembly
Creates a compound with constrained box parts
body
Generates the box body
Source code in src/bd_el_parts/lockable_box.py
lid
Generates the box lid