Last active
May 19, 2025 23:37
-
-
Save ednisley/a4cc85f976a0b586846ecadca5254401 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 20x102mm cartridge | |
// Ed Nisley - KE4ZNU | |
// 2025-05-18 | |
include <BOSL2/std.scad> | |
Layout = "Show"; // [Show,Build] | |
Powder = true; // build internal void | |
/* [Hidden] */ | |
ID = 0; | |
OD = 1; | |
LENGTH = 2; | |
HoleWindage = 0.2; | |
Protrusion = 0.1; | |
NumSides = 3*3*4; | |
$fn = NumSides; | |
CartridgeOA = [21.0,29.5,101.4]; // must match SVG pretty closely | |
PrimerOA = [2.0,8.0,2.0]; | |
CapsuleTip = [7.5,7.5,5.0]; | |
Capsule = [7.5,18.8 + HoleWindage,83]; | |
SeatingDepth = 25.0; | |
Void = [CartridgeOA[ID]- 4.0,CartridgeOA[OD]- 4.0,CartridgeOA[LENGTH] - SeatingDepth - 4*PrimerOA[LENGTH]]; | |
//---------- | |
// Define shapes | |
module Cartridge() { | |
difference() { | |
rotate_extrude() | |
import("Cartridge - 20x102mm outline.svg",layer="Cartridge Aligned Half"); | |
up(PrimerOA[LENGTH]) | |
cyl(PrimerOA[LENGTH] + Protrusion,d=PrimerOA[OD],anchor=TOP); | |
up(CartridgeOA[LENGTH] + CapsuleTip[LENGTH]) | |
cyl(SeatingDepth,d=Capsule[OD],anchor=TOP); | |
up(CartridgeOA[LENGTH] - SeatingDepth) | |
cyl(Void[LENGTH],d=CapsuleTip[OD],anchor=BOTTOM); | |
if (Powder) { | |
up(Void[LENGTH]/2) | |
cyl(Void[LENGTH],d=CapsuleTip[OD],anchor=BOTTOM); | |
up(2*PrimerOA[LENGTH]) | |
cyl(Void[LENGTH],d=Void[OD],rounding=Void[OD]/2,anchor=BOTTOM); | |
down(Protrusion) | |
cyl(Void[LENGTH],d=PrimerOA[ID],anchor=BOTTOM); | |
} | |
} | |
} | |
module Primer() { | |
difference() { | |
cyl(PrimerOA[LENGTH] - Protrusion,d=PrimerOA[OD] - HoleWindage,anchor=BOTTOM); | |
up(PrimerOA[LENGTH]) | |
spheroid(d=PrimerOA[ID]); | |
} | |
} | |
//---------- | |
// Build things | |
if (Layout == "Show") | |
//render() | |
difference() { | |
Cartridge(); | |
cuboid(3*CartridgeOA[LENGTH],anchor=LEFT+BACK); | |
} | |
if (Layout == "Build") { | |
Cartridge(); | |
right(CartridgeOA[OD]) | |
Primer(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
More details on my blog at https://softsolder.com/2025/05/19/3d-printed-20102mm-cartridge/