Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ednisley/826b482bf33219942cb7cf53606d1475 to your computer and use it in GitHub Desktop.
Save ednisley/826b482bf33219942cb7cf53606d1475 to your computer and use it in GitHub Desktop.
OpenSCAD source code and machine profile SVG: HQ Sixteen front-mount horizontal spool adapter
// HQ Sixteen - horizontal thread spool adapter for front pin
// Ed Nisley - KE4ZNU
// 2025-04-07
include <BOSL2/std.scad>
Layout = "Show"; // [Show,Build,Base,Wall,Frame]
/* [Hidden] */
Protrusion = 0.1;
HoleWindage = 0.2;
ID = 0;
OD = 1;
LENGTH = 2;
WallThick = 8.0;
BaseThick = 12.0;
Washer = [5.0,10.0,1.0]; // M5 washer
Spool = [0.25*INCH,50.0,55.0]; // maximum thread spool
SpoolClearance = [2.0,5.0,5.0]; // spool pin pointed to +X axis
SpoolPin = [Spool[ID],Spool[ID],Spool[LENGTH] + WallThick + SpoolClearance.x];
BasePlate = [WallThick + SpoolClearance.x + 13.0, // X flush with side of machine
Spool[OD]/2 + 2*SpoolClearance.y,
BaseThick];
BaseOffset = [-(BasePlate.x - Washer[OD]),-Washer[OD],0.0]; // left front corner w.r.t. pin
SpoolOC = [0, // relative to left front top of Base
BasePlate.y/2,
SpoolClearance.z + Spool[OD]/2 + BaseThick/2];
//----------
// Construct the pieces
// HQ Sixteen top frame profile
// Aligned with hole somewhere along X=0, front edge at Y=0
// Lengthened slightly to cut cleanly
module MachineFrame(Length=BasePlate.y + 2*Protrusion) {
back(BasePlate.y + Protrusion) xrot(90)
linear_extrude(height=Length,convexity=5,center=false)
import("HQ Sixteen - top profile curve.svg",layer="Top Profile");
}
// Baseplate
// Aligned with hole one washer diameter in from corner
module Base() {
$fn=18;
difference() {
fwd(Washer[OD])
difference() {
right(Washer[OD])
cuboid(BasePlate,anchor=RIGHT+FRONT+CENTER,rounding=BaseThick/2,edges=RIGHT);
MachineFrame();
}
down(BasePlate.z)
cylinder(d=SpoolPin[OD] + HoleWindage,h=2*BasePlate.z);
up(BasePlate.z/2 - Washer[LENGTH])
cylinder(d=Washer[OD] + HoleWindage,h=2*Washer[LENGTH]);
}
}
// Wall holding spool pin
module Wall() {
$fn=36;
translate(BaseOffset) {
difference() {
union() {
translate(SpoolOC)
right(WallThick)
cylinder(SpoolClearance.x,d=Spool[OD]/2,orient=RIGHT);
hull() {
translate(SpoolOC)
cylinder(WallThick,d=Spool[OD]/2,orient=RIGHT);
up(BasePlate.z/2 - 1)
cube([WallThick,BasePlate.y,1],center=false);
}
}
translate(SpoolOC) left(Protrusion)
cylinder(SpoolPin[LENGTH],d=SpoolPin[OD],orient=RIGHT);
}
}
}
module Adapter() {
Base();
Wall();
}
//----------
// Show & build the results
if (Layout == "Base")
Base();
if (Layout == "Wall")
Wall();
if (Layout == "Frame")
MachineFrame();
if (Layout == "Show") {
Adapter();
color("Gray",0.5)
MachineFrame(60);
color("Green",0.75)
translate(BaseOffset)
translate(SpoolOC)
cylinder(SpoolPin[LENGTH],d=SpoolPin[OD],orient=RIGHT,$fn=18);
}
if (Layout == "Build")
up(-BaseOffset.x)
yrot(-90)
Adapter();
Display the source blob
Display the rendered blob
Raw
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="11in"
height="8.5in"
viewBox="0 0 279.40056 215.90043"
version="1.1"
id="SVGRoot"
inkscape:version="1.4 (e7c3feb100, 2024-10-09)"
sodipodi:docname="HQ Sixteen - top profile curve.svg"
xml:space="preserve"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"><sodipodi:namedview
id="namedview7"
pagecolor="#ffffff"
bordercolor="#0000ff"
borderopacity="1"
inkscape:pageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:document-units="mm"
showgrid="true"
units="mm"
gridtolerance="9.9"
guidetolerance="10.4"
inkscape:snap-perpendicular="true"
inkscape:snap-tangential="true"
width="700mm"
borderlayer="false"
inkscape:showpageshadow="true"
viewbox-width="700"
guidecolor="#ff00e3"
guideopacity="0.49803922"
inkscape:zoom="11.227083"
inkscape:cx="50.547413"
inkscape:cy="22.401188"
inkscape:window-width="1780"
inkscape:window-height="1091"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="layer1"
objecttolerance="31"
inkscape:deskcolor="#d1d1d1"><inkscape:grid
type="xygrid"
id="grid9"
units="mm"
spacingx="5"
spacingy="5"
dotted="false"
empspacing="2"
originx="148.5"
originy="127.29919"
color="#ff0000"
opacity="0.18431373"
empcolor="#4040ff"
empopacity="0.49411765"
visible="true" /></sodipodi:namedview><defs
id="defs2" /><image
width="80.687492"
height="28.448055"
preserveAspectRatio="none"
xlink:href="HQ%20Sixteen%20-%20machine%20top%20profile.jpg"
id="image1"
x="-61.189976"
y="209.18629" /><g
inkscape:label="Top Profile"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,5.4354331)"><path
style="fill:none;fill-rule:evenodd;stroke:#0000ff;stroke-width:0.200001;stroke-linejoin:round"
d="m -57.796294,223.10357 c 0.74979,-6.33888 6.11315,-9.19962 10.74979,-10.07756 5.782126,-1.16095 11.353176,-2.05528 16.779788,-2.41636 7.73071,-0.36772 15.63662,-0.83322 23.3615995,-0.94295 0,0 0.0328,0.35096 0.33443,0.50788 0.30159,0.15692 0.69516,0.13158 1.72297,0.20379 1.00569,0.008 1.10254,-0.0245 2.27896,0.0378 l 5.31813,0.32079 c 1.05251,0.0493 0.32352,0.018 0.68722,0.0493 2.38644,0.20502 3.22232,0.42889 5.1168,0.75662 3.7089405,2.08308 6.0813105,4.40537 6.1729205,7.08308 v 12.299 h -72.522608 z"
id="path1"
sodipodi:nodetypes="ccccscccsccccc" /></g><metadata
id="metadata11"><rdf:RDF><cc:Work
rdf:about=""><cc:license
rdf:resource="http://creativecommons.org/licenses/by-nc-sa/4.0/" /></cc:Work><cc:License
rdf:about="http://creativecommons.org/licenses/by-nc-sa/4.0/"><cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" /><cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" /><cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" /><cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" /><cc:prohibits
rdf:resource="http://creativecommons.org/ns#CommercialUse" /><cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" /><cc:requires
rdf:resource="http://creativecommons.org/ns#ShareAlike" /></cc:License></rdf:RDF></metadata></svg>
@ednisley
Copy link
Author

ednisley commented Apr 8, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment