Skip to content

Snap Joint

Gilles Bouissac edited this page Jan 13, 2020 · 7 revisions

Snap Joint library

Prerequisites

See instructions here

Cheat Sheet

Snap Joint Cheat Sheet

Tutorial

Step Code
Internal
use <agentscad/snap-joint.scad>
$fn=100;

// Simple internal part // with default values joint = newSnapCircleInt (); snapJoint(joint);

External
// Same with external part
//   copy of internal one

joint = newSnapCircleInt (); snapJoint(joint); joint_e = newSnapCircleExt ( source=joint ); snapJoint(joint_e);

Gap
// Change gap between int and ext
//   with $gap

$gap = 1;

joint = newSnapCircleInt (); snapJoint(joint); joint_e = newSnapCircleExt ( source=joint ); snapJoint(joint_e);

Springs
// Activates springs on internal part
// Defaults to 5 leaves

joint = newSnapCircleInt ( springs=true ); snapJoint(joint); joint_e = newSnapCircleExt ( source=joint ); snapJoint(joint_e);

Polygon
// Makes a polygonal joint
// Defaults to 5 edges/leaves

joint = newSnapPolygonInt(springs=true); snapJoint(joint); joint_e = newSnapPolygonExt(source=joint); snapJoint(joint_e);

Polygon 4
// Makes a polygonal joint
// Forces 4 edges/leaves

joint = newSnapPolygonInt ( leaves=4, springs=true ); snapJoint(joint); joint_e = newSnapPolygonExt(source=joint); snapJoint(joint_e);

One Time Joint
// Activates springs on external
//   part which makes a one time
//   joint (cannot be removed)

joint = newSnapCircleInt (); snapJoint(joint); joint_e = newSnapCircleExt ( source=joint, springs=true ); snapJoint(joint_e);

Height/Thickness
// Tunes joint height/thickness

joint = newSnapCircleInt ( height = 10, thickness = 3, springs = true ); snapJoint(joint);

Hook
// Tunes hook height/width

joint = newSnapCircleInt ( height = 10, springs = true, hook_h = 5, hook_w = 1.6 ); snapJoint(joint);

Spring w
// Tunes spring width

joint = newSnapCircleInt ( height = 10, springs = true, hook_h = 5, hook_w = 1.6, spring_w = 5 ); snapJoint(joint);

Spring a
// Tunes spring inclinaison angle

joint = newSnapCircleInt ( height = 10, springs = true, hook_h = 5, hook_w = 1.6, spring_w = 5, spring_a = 33 ); snapJoint(joint);

Cut
// Tunes cutter width/distance

joint = newSnapCircleInt ( springs = true, cutwidth = 2, cutdistance = 7 ); snapJoint(joint);

Clone this wiki locally