Awesome
scad-klupe
: Threaded fasteners for scad-clj
This is a Clojure library for use in CAD work with Matthew Farrell’s
scad-clj
. It provides models of
threaded fasteners, including nuts and bolts.
The Lojban word klupe refers to a screw or bolt.
Models produced by this library are neither perfectly accurate with respect to standards, nor engineered for ease of printing. Their main purpose is to form negative space: Relatively simple shapes used to carve out screw holes, nut pockets and similar cavities in 3D-printable designs. These holes would then be filled by ordinary steel nuts and bolts in the assembly of your product.
scad-klupe
is compatible with
scad-tarmi
compensators to deal with
printer inaccuracy.
Usage
The main interface is the iso
module. If in your
ns
declaration you (:require [scad-klupe.iso :refer [nut]])
, you can then
call (nut {:m-diameter 6})
for an internally threaded approximation of an ISO
262 M6 hex nut. Its height and external diameter are inferred from the
standard, unless you pass overrides. For a matching 25 mm threaded bolt, call
(bolt {:m-diameter 6, :head-type :hex, :total-length 25})
.
If you intend to model an M6 nut to carve out negative space for a real nut,
the correct call would be (nut {:m-diameter 6, :negative true})
, a less
complicated shape without a hole. The bolt
function also takes a negative
parameter, which elides the drive from the head, but the negative of a bolt is
still threaded by default. If you just want a straight hole that you intend to
tap instead of printing the threading, try passing :include-threading false
to the bolt
function.
Showcase
You will need to use scad-clj
, for instance via
scad-app
, to produce OpenSCAD code for
the objects you model with scad-klupe
. Check the showcase
code for examples of how to do that. A selection of the
models produced by that code are shown here.
Contributing
Volunteers are welcome to submit patch sets for review, including additional ISO and DIN standard data, more types of heads and drives, and non-metric standards.
Acknowledgements
scad-klupe
was broken out of scad-tarmi
in 2020 while making
backwards-incompatible changes to the API for programmatic use and taking a
more consistent stance on parameter schemae and bundled defaults.
The thread-drawing function (scad-klupe.base/threading
) is a reimplementation
in Clojure of a corresponding function in polyScrewThread_r1.scad
, created by
aubenc at Thingiverse.
License
The thread-drawing function (scad-klupe.base/threading
) reimplements work in
the public domain, as acknowledged above. This specific reimplementation of
that function, and the rest of this library, are licensed as follows.
Copyright © 2020–2021 Viktor Eikman
This software is distributed under the Eclipse Public License, (EPL) v2.0 or any later version thereof. This software may also be made available under the GNU General Public License (GPL), v3.0 or any later version thereof, as a secondary license hereby granted under the terms of the EPL.