GitXplorerGitXplorer
m

catchnhole

public
39 stars
6 forks
2 issues

Commits

List of commits on branch latest.
Verified
99428972ca2588f5ce33c0df54d097a14acf7f10

Bump to version 3.0.2

mmmalecki committed 2 years ago
Verified
c0920c9b315e8ab6dce697639c558296a7f8a5f0

Document the hex heads

mmmalecki committed 2 years ago
Verified
168ca43571f21b3bb6b94f053d494523a6c493b7

Add hex bolt heads

mmmalecki committed 2 years ago
Verified
b9e6c016f6ac73b99354eb3f0e2fdc9d44d8ca6d

Use our `BOLTS` fork

mmmalecki committed 2 years ago
Verified
b69e2afa0e6cc381b3ce3b89b06c41016c39faa2

Update the repository URL in the `README`

mmmalecki committed 2 years ago
Verified
4b2b9a30fe67a750e83d98d5085128d8899f0633

Update the `BOLTS` repository URL

mmmalecki committed 2 years ago

README

The README file for this repository.

catchnhole

Because nutsnbolts was taken.

An ergonomic way to create nutcatches, screw holes and countersinks in OpenSCAD.

Nutcatches, screw holes and countersinks.

Requirements and installation

catchnhole uses OpenSCAD's JSON import, which is only present in the nightly build, and must be enabled (Edit -> Preferences -> Features -> import-function).

Add a git submodule to your project:

git submodule add https://github.com/mmalecki/catchnhole catchnhole

Usage

use <catchnhole/catchnhole.scad>;

difference () {
  translate([-5, -5, 0]) cube([10, 10, 10]);

  // Draw a nutcatch parallel to bolt shaft:
  nutcatch_parallel("M3");
  // Draw a bolt gripping the nutcatch:
  bolt("M3", length = 10);

  // Or, draw a nutcatch sidecut into the part:
  translate([0, 0, 4]) {
    nutcatch_sidecut("M3");
    // Draw a bolt gripping the nutcatch:
    bolt("M3", length = 6);
  }
}

For more advanced usage, see the examples directory.

API

bolt(name, length, kind = "headless", head_diameter_clearance = 0.1, countersink = 0)

Draw a bolt up the Z axis, with head at the top.

Arguments:

  • name (string) - name of the bolt, e.g. "M3"
  • length (number) - length of the bolt
  • kind (string) - the kind of the bolt, available values:
    • "headless" - no bolt head
    • "socket_head" - socket head cap (ISO 4762)
    • "countersunk" - countersunk head (ISO 10642, DIN 7991)
    • "hex_head" - hex head (ISO 4014)
  • head_diameter_clearance - how much side clearance to leave for the bolt head, where applicable
  • head_top_clearance - how much top clearance to leave for the bolt head, where applicable
  • length_clearance - how much clearance to leave for the bolt past length (down the Z axis; useful if your origin point is a nut and your length is calculated, or just want to allow for longer bolts)
  • countersink (number) - how much to "countersink" the bolt - move it down by the countersink * bolt head length

bolt_head(name, kind, head_diameter_clearance = 0.1)

Draw a bolt head up the Z axis.

Arguments:

  • name (string) - name of the bolt, e.g. "M3"
  • kind (string) - the kind of the bolt, available values:
    • "socket_head" - socket head cap (ISO 4762)
    • "countersunk" - countersunk head (ISO 10642)
    • "hex_head" - hex head (ISO 4014)
  • head_diameter_clearance - how much side clearance to leave for the bolt head, where applicable
  • head_top_clearance - how much top clearance to leave for the bolt head, where applicable

nutcatch_parallel(name, height_clearance = 0, width_clearance = 0)

Draw a nutcatch parallel to the bolt axis.

Arguments:

  • name (string) - name of the nut, e.g. "M3"
  • kind (string) - the kind of the nut, available values:
    • "hexagon" - hexagon (ISO 4032)
    • "hexagon_thin" - thin hexagon (ISO 4035)
    • "hexagon_lock" - hexagon locknut (ISO 7040)
  • height_clearance (number) - additional nut height clearance
  • width_clearance (number) - additional nut width clearance

nutcatch_sidecut(name, height_clearance = 0, width_clearance = 0)

Draw a nutcatch sidecut into the part:

Arguments:

  • name (string) - name of the nut, e.g. "M3"
  • kind (string) - the kind of the nut, as noted in nutcatch_parallel
  • height_clearance (number) - additional nut height clearance
  • width_clearance (number) - additional nut width clearance

Acknowledgements