This OpenSCAD script generates a customizable two-part hose clamp block designed for precision fit and easy assembly. It’s ideal for securing tubing, conduit, or cylindrical components in 3D-printed enclosures, robotics, and DIY builds.
🔧 Features:
- Parametric support for multiple hose diameters (e.g. 3/16", 1/4", 3/8")
- Automatic spacing and bolt clearance logic
- M6 bolt hole with optional socket head recess
- Rounded top and vertical edges for strength and printability
- Snap-fit alignment tabs on the top clamp with matching recesses on the bottom clamp
📐 Geometry:
- Tabs are flush with the left and right ends of the top clamp
- Recesses mirror into the bottom clamp for perfect alignment
- Bolt hole is centered between the most central hose pair
🛠 Key Parameters:
- line_diams: List of hose diameters in mm
- slot_clearance: Extra clearance around each hose
- slot_spacing_input: Minimum spacing between hoses
- margin_x/y/z: Padding around the clamp
- fillet_r: Radius for rounded corners
- bolt_d, recess_d, recess_depth: Bolt and socket head dimensions
🧪 Fit Tuning:
- Tab dimensions and clearance are adjustable in alignment_tabs() and alignment_recesses()
- Default clearance is 0.3 mm for a snug, printable fit
🖨 Output:
- Uncomment one or both render lines at the bottom to preview or export each clamp half
- Designed for FDM printing with minimal support