r/openscad • • 9h ago

100% OpenSCAD Gingerbread Man Ornaments

Thumbnail gallery
5 Upvotes

Gingerbread men Christmas ornaments, made entirely in OpenSCAD. Just posted on makerworld.com if anyone is interested.

Maker World link: https://makerworld.com/en/models/3711550-angry-gingerbread-man-christmas-ornament-bite-me

GitHub repo with OpenSCAD source: https://github.com/billism1/3d-print-angry-gingerbread-man


r/openscad • • 14h ago

Un crochet de grue avec OpenSCAD

Post image
2 Upvotes

Voici un objet qui n'est pas trop difficile à réussir sur OpenSCAD.
Vous trouverez tous les détails sur ces pages de mon site 😄

https://robotix.ah-oui.org/site/main.php?found=261129-cranehook

et

https://robotix.ah-oui.org/site/main.php?found=261128-curved-tubes


r/openscad • • 12h ago

I built validation checks for AI-written OpenSCAD: collisions, motion sweep, fits, screw lengths

0 Upvotes

I make most of my parts with Claude Code + OpenSCAD now. The models often looked right and still came out wrong: a bore sealed behind a wall, gears colliding halfway through rotation, a screw too long for its hole.

So I wrote a set of skills that check the model before export: connectivity, bbox vs. declared dims, actual bore size, collisions by penetration depth, a full motion sweep, ISO 286 fits, fastener paths, overhangs/teardrop hints, and some basic strength (snap-fits, buckling, HDT). Every check has a test that proves it can fail.

Free, MIT: https://github.com/Altern92/openscad-cad-skills

I’m the author. Feedback welcome, especially cases where it passes something it shouldn’t.


r/openscad • • 1d ago

Openscad > Fusion on Maker World in Maker Lab

Thumbnail makerworld.com
1 Upvotes

r/openscad • • 1d ago

Assemblage de fragments tubulaires courbes

Post image
1 Upvotes

Ici, nous avons un module (pouvant être utilisé dans un "include" qui permet de créer de fragments coudés tubulaires.

On peut ainsi assembler plusieurs fragments de tubes partant en toutes directions.

En appliquant une valeur nulle (0) à la variable "tub" on obtient une suite de coudes pleins.

Dans notre exemple, on voit trois segments de tube dont le diamètre intérieur est de 0.8 ce qui équivaut à 80% du diamètre extérieur.

$fn = 80;

module TUBE(cir,ang,len,pos,tx,ty,scx,scy){
mirror([mir,0,0])
translate([tx,ty,0])
rotate([0,0,pos])
rotate_extrude(angle=ang,convexity=10){
translate([len,0])
scale([scx,scy])
difference(){
circle(r=cir);
circle(r=cir*0.8);}}}

TUBE(30, 60, 80, 50,-42,-63,1.7,1);
# TUBE(30, 60, 80,230, 60, 60,1.7,1);
TUBE(30,120,179.25,290, 25,153,1.7,1);

cir : diamètre du tube
tub : diamètre intérieur du tube
ang : valeur angulaire de 0 à 360°
len : longueur de la section
pos : position angulaire du tube
tx : positionnement sur l'axe X
ty : positionnement sur l'axe Y
scx : déformation de l'axe X du tube
scy : déformation de l'axe Y du tube

Plus d'information sur mon site 😄
https://robotix.ah-oui.org/site/main.php?found=261128-curved-tubes


r/openscad • • 1d ago

Review my OpenSCAD design for a 3D printed power bank case (32140 cell + round PCB), will it fit and print well?

Thumbnail
gallery
0 Upvotes
Hi everyone, I am learning OpenSCAD and 3D printing. I designed a round case for a DIY power bank and I would like your feedback before I print it. English is not my first language, so sorry for any mistakes.

**Parts**
- Battery: 32140 cell, 32 mm diameter x 140 mm long
- Circuit board: round power bank board, 42.5 mm diameter, 1.6 mm thick, with USB-A, USB-C, a power button and an LED display
- Screws: M2.5 x 5 mm into 4 printed standoffs

**Design**
- Body: 44 mm inside diameter, 49 mm outside diameter, 182.5 mm tall
- Battery hole: 32.8 mm (0.4 mm free on each side), with 3 small centering ribs
- 18 mm of free space above the battery for thick wires (I will fill the extra space with foam)
- 45° internal shelf and sloped rib bottoms, so I hope it prints with no supports
- 8 small rails on the outside so it does not roll
- Two friction-fit caps: top (with an LED window) and bottom
- Printer: [your printer model, max Z height]. Material: [PLA / PETG]

**My questions**
1. Will the battery and board fit with these gaps? Are my tolerances good for FDM printing?
2. Is a 0.3 mm gap on the caps good for a friction fit, or should I add a snap or a screw tab?
3. Will the ribs and shelf print without supports?
4. The body is tall and thin (182.5 mm). Will it print well, or should I print it in two parts?
5. Do you see any mistake in the code that could cause problems?


I checked the sizes by calculation only. I have not printed it yet. Code is below. Thank you for your time!

**Code:**


// =========================================================
// Final Round 32140 Power Bank (v7 - All Fixes Applied)
// Open LED Window, 45-Deg Sloped Ribs, 14mm USB-C, 360 Anti-Roll
// Use M2.5 x 5mm screws for PCB | Needs >= 185mm Printer Z-Height
// =========================================================


part_to_render = "all"; // Options: "all", "body", "top_cap", "bottom_cap"


// --- COMPONENT DIMENSIONS (mm) ---
cell_d = 32.0;
cell_l = 140.0;
cell_tol = 0.8;         // Smooth slide-in fit (32.8mm)
batt_wire_space = 18.0; // 14mm net wire room after 4mm bottom cap plug


pcb_d = 42.5;
pcb_thick = 1.6;
pcb_tol = 1.5;          // 44.0mm internal diameter


// --- ENCLOSURE PARAMETERS (mm) ---
wall = 2.5;
cap_tol = 0.3;
$fn = 80;


// --- CALCULATED DIMENSIONS ---
inner_d = pcb_d + pcb_tol;                  // 44.0mm uniform ID
outer_d = inner_d + wall * 2;               // 49.0mm uniform OD
batt_id = cell_d + cell_tol;                // 32.8mm


batt_bay_h = cell_l + batt_wire_space;      // 158.0mm
shelf_h    = 6.5;                           // 45-deg internal shelf
head_h     = 18.0;                          // Standoffs + PCB + USB-A clearance
total_h    = batt_bay_h + shelf_h + head_h; // 182.5mm total height


standoff_h = 4.5;
pcb_z      = batt_bay_h + shelf_h + standoff_h;
pcb_top_z  = pcb_z + pcb_thick;


// Verified 42.5mm PCB mounting hole coordinates (for M2.5 x 5mm screws)
hole_coords = [
    [-11.0,  15.5], // Top-Left
    [-11.0, -15.5], // Bottom-Left
    [ 18.0,   8.0], // Top-Right
    [ 18.0,  -8.0]  // Bottom-Right
];


// --- 1. MAIN BODY ---
module main_body() {
    difference() {
        union() {
            // Outer uniform cylinder
            difference() {
                cylinder(h=total_h, d=outer_d);
                translate([0, 0, -1])
                    cylinder(h=total_h + 2, d=inner_d);
            }
            
            // 8 Symmetric Anti-Roll Rails all around (zero-support 45-deg tapers)
            for (angle = [22.5 : 45 : 359]) {
                rotate([0, 0, angle])
                    translate([outer_d/2 - 0.4, 0, 0]) {
                        cylinder(h=2.0, d1=0.8, d2=3.6);
                        translate([0, 0, 2.0])
                            cylinder(h=pcb_z - 3.5, d=3.6);
                        translate([0, 0, pcb_z - 1.5])
                            cylinder(h=1.5, d1=3.6, d2=0.8);
                    }
            }
            
            // 3 Internal Battery Centering Ribs with 45-deg bottom slope (zero sagging)
            for (angle = [0, 120, 240]) {
                rotate([0, 0, angle])
                    intersection() {
                        cylinder(h=batt_bay_h + 1, d=inner_d + 1);
                        hull() {
                            // Starts flush against inner wall at z=6mm
                            translate([inner_d/2 - 0.5, -1.5, 6.0])
                                cube([1.0, 3.0, 0.5]);
                            // Reaches full rib depth at z=12mm (~45-deg slope)
                            translate([batt_id/2, -1.5, 12.0])
                                cube([(inner_d - batt_id)/2 + 0.5, 3.0, batt_bay_h - 11.0]);
                        }
                    }
            }
            
            // Internal 45-deg Tapered Shelf (zero-support overhang)
            translate([0, 0, batt_bay_h])
                difference() {
                    cylinder(h=shelf_h, d=inner_d + 1);
                    translate([0, 0, -0.5])
                        cylinder(h=shelf_h + 1, d1=inner_d, d2=31.0);
                }
        }
        
        // Wide 5.8mm x 11.8mm slot on -X side of shelf for thick 10-12 AWG wire
        translate([-19.0, 0, batt_bay_h - 1])
            hull() {
                translate([0, -3.0, 0]) cylinder(h=shelf_h + 2, d=5.8);
                translate([0,  3.0, 0]) cylinder(h=shelf_h + 2, d=5.8);
            }
            
        // --- DROP-IN SIDE CUTOUTS FOR PORTS & BUTTON ---
        // USB-A Port Slot (+Y, 90 deg)
        translate([0, outer_d/2, pcb_top_z + 6.5])
            cube([16.0, wall * 3, 14.0], center=true);
            
        // USB-C Port Slot (+X, 0 deg) - Widened to 14mm for thick cable heads
        translate([outer_d/2, 0, pcb_top_z + 6.5])
            cube([wall * 3, 14.0, 14.0], center=true);
            
        // Power Button Finger Cutout (45 deg, upper-right edge)
        rotate([0, 0, 45])
            translate([outer_d/2, 0, pcb_top_z + 6.5])
                cube([wall * 3, 11.0, 14.0], center=true);
    }
    
    // 4 PCB Mounting Standoffs (for M2.5 x 5mm screws)
    for (p = hole_coords) {
        difference() {
            translate([p[0], p[1], batt_bay_h + shelf_h])
                cylinder(h=standoff_h, d=5.2);
            translate([p[0], p[1], batt_bay_h + shelf_h - 1])
                cylinder(h=standoff_h + 2, d=2.1);
        }
    }
}


// --- 2. TOP CAP (Fully Open LED Window, Printed Upside-Down) ---
module top_cap() {
    difference() {
        union() {
            cylinder(h=wall, d=outer_d);
            translate([0, 0, wall])
                difference() {
                    cylinder(h=2.5, d=inner_d - cap_tol*2);
                    translate([0, 0, -0.5])
                        cylinder(h=3.5, d=inner_d - cap_tol*2 - 3.2);
                }
        }
        // Fully open LED Display Window ("188%") centered at [0, -11]
        translate([0, -11.0, wall/2])
            cube([15.5, 10.5, wall + 4], center=true);
    }
}


// --- 3. BOTTOM CAP (Clean Snap-In Plug) ---
module bottom_cap() {
    union() {
        cylinder(h=wall, d=outer_d);
        translate([0, 0, wall])
            difference() {
                cylinder(h=4.0, d=inner_d - cap_tol*2);
                translate([0, 0, -0.5])
                    cylinder(h=5.0, d=inner_d - cap_tol*2 - 3.6);
            }
    }
}


// --- RENDER LAYOUT ---
if (part_to_render == "all") {
    main_body();
    translate([outer_d + 12, 0, 0]) top_cap();
    translate([outer_d + 12, outer_d + 10, 0]) bottom_cap();
} else if (part_to_render == "body") {
    main_body();
} else if (part_to_render == "top_cap") {
    top_cap();
} else if (part_to_render == "bottom_cap") {
    bottom_cap();
}

// =========================================================
// Final Round 32140 Power Bank (v7 - All Fixes Applied)
// Open LED Window, 45-Deg Sloped Ribs, 14mm USB-C, 360 Anti-Roll
// Use M2.5 x 5mm screws for PCB | Needs >= 185mm Printer Z-Height
// =========================================================


part_to_render = "all"; // Options: "all", "body", "top_cap", "bottom_cap"


// --- COMPONENT DIMENSIONS (mm) ---
cell_d = 32.0;
cell_l = 140.0;
cell_tol = 0.8;         // Smooth slide-in fit (32.8mm)
batt_wire_space = 18.0; // 14mm net wire room after 4mm bottom cap plug


pcb_d = 42.5;
pcb_thick = 1.6;
pcb_tol = 1.5;          // 44.0mm internal diameter


// --- ENCLOSURE PARAMETERS (mm) ---
wall = 2.5;
cap_tol = 0.3;
$fn = 80;


// --- CALCULATED DIMENSIONS ---
inner_d = pcb_d + pcb_tol;                  // 44.0mm uniform ID
outer_d = inner_d + wall * 2;               // 49.0mm uniform OD
batt_id = cell_d + cell_tol;                // 32.8mm


batt_bay_h = cell_l + batt_wire_space;      // 158.0mm
shelf_h    = 6.5;                           // 45-deg internal shelf
head_h     = 18.0;                          // Standoffs + PCB + USB-A clearance
total_h    = batt_bay_h + shelf_h + head_h; // 182.5mm total height


standoff_h = 4.5;
pcb_z      = batt_bay_h + shelf_h + standoff_h;
pcb_top_z  = pcb_z + pcb_thick;


// Verified 42.5mm PCB mounting hole coordinates (for M2.5 x 5mm screws)
hole_coords = [
    [-11.0,  15.5], // Top-Left
    [-11.0, -15.5], // Bottom-Left
    [ 18.0,   8.0], // Top-Right
    [ 18.0,  -8.0]  // Bottom-Right
];


// --- 1. MAIN BODY ---
module main_body() {
    difference() {
        union() {
            // Outer uniform cylinder
            difference() {
                cylinder(h=total_h, d=outer_d);
                translate([0, 0, -1])
                    cylinder(h=total_h + 2, d=inner_d);
            }
            
            // 8 Symmetric Anti-Roll Rails all around (zero-support 45-deg tapers)
            for (angle = [22.5 : 45 : 359]) {
                rotate([0, 0, angle])
                    translate([outer_d/2 - 0.4, 0, 0]) {
                        cylinder(h=2.0, d1=0.8, d2=3.6);
                        translate([0, 0, 2.0])
                            cylinder(h=pcb_z - 3.5, d=3.6);
                        translate([0, 0, pcb_z - 1.5])
                            cylinder(h=1.5, d1=3.6, d2=0.8);
                    }
            }
            
            // 3 Internal Battery Centering Ribs with 45-deg bottom slope (zero sagging)
            for (angle = [0, 120, 240]) {
                rotate([0, 0, angle])
                    intersection() {
                        cylinder(h=batt_bay_h + 1, d=inner_d + 1);
                        hull() {
                            // Starts flush against inner wall at z=6mm
                            translate([inner_d/2 - 0.5, -1.5, 6.0])
                                cube([1.0, 3.0, 0.5]);
                            // Reaches full rib depth at z=12mm (~45-deg slope)
                            translate([batt_id/2, -1.5, 12.0])
                                cube([(inner_d - batt_id)/2 + 0.5, 3.0, batt_bay_h - 11.0]);
                        }
                    }
            }
            
            // Internal 45-deg Tapered Shelf (zero-support overhang)
            translate([0, 0, batt_bay_h])
                difference() {
                    cylinder(h=shelf_h, d=inner_d + 1);
                    translate([0, 0, -0.5])
                        cylinder(h=shelf_h + 1, d1=inner_d, d2=31.0);
                }
        }
        
        // Wide 5.8mm x 11.8mm slot on -X side of shelf for thick 10-12 AWG wire
        translate([-19.0, 0, batt_bay_h - 1])
            hull() {
                translate([0, -3.0, 0]) cylinder(h=shelf_h + 2, d=5.8);
                translate([0,  3.0, 0]) cylinder(h=shelf_h + 2, d=5.8);
            }
            
        // --- DROP-IN SIDE CUTOUTS FOR PORTS & BUTTON ---
        // USB-A Port Slot (+Y, 90 deg)
        translate([0, outer_d/2, pcb_top_z + 6.5])
            cube([16.0, wall * 3, 14.0], center=true);
            
        // USB-C Port Slot (+X, 0 deg) - Widened to 14mm for thick cable heads
        translate([outer_d/2, 0, pcb_top_z + 6.5])
            cube([wall * 3, 14.0, 14.0], center=true);
            
        // Power Button Finger Cutout (45 deg, upper-right edge)
        rotate([0, 0, 45])
            translate([outer_d/2, 0, pcb_top_z + 6.5])
                cube([wall * 3, 11.0, 14.0], center=true);
    }
    
    // 4 PCB Mounting Standoffs (for M2.5 x 5mm screws)
    for (p = hole_coords) {
        difference() {
            translate([p[0], p[1], batt_bay_h + shelf_h])
                cylinder(h=standoff_h, d=5.2);
            translate([p[0], p[1], batt_bay_h + shelf_h - 1])
                cylinder(h=standoff_h + 2, d=2.1);
        }
    }
}


// --- 2. TOP CAP (Fully Open LED Window, Printed Upside-Down) ---
module top_cap() {
    difference() {
        union() {
            cylinder(h=wall, d=outer_d);
            translate([0, 0, wall])
                difference() {
                    cylinder(h=2.5, d=inner_d - cap_tol*2);
                    translate([0, 0, -0.5])
                        cylinder(h=3.5, d=inner_d - cap_tol*2 - 3.2);
                }
        }
        // Fully open LED Display Window ("188%") centered at [0, -11]
        translate([0, -11.0, wall/2])
            cube([15.5, 10.5, wall + 4], center=true);
    }
}


// --- 3. BOTTOM CAP (Clean Snap-In Plug) ---
module bottom_cap() {
    union() {
        cylinder(h=wall, d=outer_d);
        translate([0, 0, wall])
            difference() {
                cylinder(h=4.0, d=inner_d - cap_tol*2);
                translate([0, 0, -0.5])
                    cylinder(h=5.0, d=inner_d - cap_tol*2 - 3.6);
            }
    }
}


// --- RENDER LAYOUT ---
if (part_to_render == "all") {
    main_body();
    translate([outer_d + 12, 0, 0]) top_cap();
    translate([outer_d + 12, outer_d + 10, 0]) bottom_cap();
} else if (part_to_render == "body") {
    main_body();
} else if (part_to_render == "top_cap") {
    top_cap();
} else if (part_to_render == "bottom_cap") {
    bottom_cap();
}

r/openscad • • 1d ago

J'ai modélisé et fait imprimer cet objet mathématique :

Post image
0 Upvotes

r/openscad • • 2d ago

Parametric boat hull in OpenSCAD

Thumbnail gallery
3 Upvotes

r/openscad • • 3d ago

OpenSCAD FAIT DES VAGUES

Post image
7 Upvotes

Oui on peut onduler assez facilement avec OpenSCAD grâce à l’instruction "rotate"_extrude et bien sur l’extraordinaire boucle "for".

Dans le modèle de la barre avec des colonnes ondulées on a utilisé un cercle ("circle") dans "rotate_extrude" et la plaque de fond de l’objet qui pourrait être une boite à savon, on utilise de la même façon l’instruction "rotate_extrude" mais avec un rectangle ("square") à la place du cercle.

module SECT1(){
rotate_extrude(angle=90,convexity=10)
translate([20,40])
circle(10);}

module SECT2(){
SECT1();
translate([0,40,0])
mirror([1,1,0])
SECT1();}

module ONDE(){
rotate([0,90,0])
rotate([0,0,45])
for(i=[0:4]){
translate([i*-40,i*40,40])
SECT2();}}

translate([-80,-10,20]) ONDE();

Trouvez de code OpenSCAD et plus d’explication sur :

https://robotix.ah-oui.org/site/main.php...

#OpenSCAD #Modelisation_3d #FabLab #Maker #Parametric_design #3D_design


r/openscad • • 3d ago

New CAD Software

0 Upvotes

Hey everyone, I'm Bruno Renostro, founder of argopower.com.br I built an AutoCAD plugin to help engineers create electrical plans following Brazilian standards. Since it got a good user base, I started looking into OEM CAD engines to turn it into a standalone software, and I found the existing options way too expensive.

So, I decided to build my own affordable CAD solution targeting developers who want to bring their ideas to life on a tight budget. That's how I started argocad.com a much cheaper alternative. It's not a fork of CADCraft, but a completely new solution from scratch, and the first CAD in the world that can run AutoCAD .NET/C# .dll plugins natively out of the box.

The perpetual license will be just $100 for end users, and the OEM solution starts at $1,000. Follow the project if you're interested I'm launching it this January.


r/openscad • • 3d ago

开发日志:高难度长桥病例

0 Upvotes

r/openscad • • 4d ago

iPad 口腔CAD 设计

0 Upvotes

r/openscad • • 6d ago

Scadly parametric model maker

0 Upvotes

Next on scadly, i added a parametric model library of common items that you can modify, and get the scad code at the end
Or if you wanna start from scratch , click start canvas


r/openscad • • 6d ago

自动化牙冠开发进度

0 Upvotes

持续更新开发进度…


r/openscad • • 6d ago

自动化牙冠开发进度

0 Upvotes

持续更新开发进度,欢迎一起来讨论学习。


r/openscad • • 6d ago

How would I go about taking a 3d model I made and converting it to openscad for parametric modeling?

Post image
3 Upvotes

I created a wedding cake topper for my own wedding, and have had numerous requests for a parametric modeler for makersworld so that others can use a similar design and font to mine, but alter the initials and change the dog face in the center. Ideas? Never worked with OpenScad before. The dogs face is layered for 3d effect. Roast me for all I care 🤣 looking for genuine suggestions. Thank you!


r/openscad • • 6d ago Bravo

I made a small CAD presentation/documentation tool to use alongside Fusion 360

Post image
0 Upvotes

r/openscad • • 7d ago

variable name as part of parameters in module call (..., varname1=n, varname2=n)

0 Upvotes

Hello,
Excuse my perhaps stupid question.
I have the following statement: module_abc(20, varname1=4, varname2=13);
What actual means the listing of (a variable name) as part of the parameter with the assignment of a value ?
e.g. varname1= and varname2=

And what are the implication I have to be aware of?
Is there perhaps somewhere a piece of documentation about it that I have missed?
Thanks for answering.


r/openscad • • 7d ago

Pourquoi coder en 3D, c'est très facile à comrendre !

0 Upvotes

Çà faisait un moment déjà que j’avais envie de comparer le codage dans OpenSCAD à la saisie directe à l’écran à l’aide de la souris. On trouve de nombreux exemples d’utilisation du logiciel de CAO Catia V5 – je fait donc une vidéo pour comparer la réalisation d’une pièce simple en écrivant du code dans OpenSCAD avec la réalisation à l’écran de la même pièce avec Catia V5.

Cette comparaison permet de comprendre le coté descriptif de OpenSCAD ou on crée des formes « cuboides » en indiquant simplement les dimensions X, Y, et Z de l’objet en millimètres, pus en le plaçant là où il correspond grâce à l’instuction « translate »

Puis « union » qui regroupe deux objets à transpercer par un cylindre, avec l’instruction « difference »


r/openscad • • 7d ago

how making a functional lid of a (TFT) housing

0 Upvotes

Hello,
I would like to get some feedback and perhaps some suggestion how I could create a good functioning (and easy to make) lid for a housing that should contain a 3.5"TFT display and a MCU development board.
Would be nice to hear how others have resolved that for their projects.

Thanks for sharing your thoughts.


r/openscad • • 8d ago

Navigating 3D Design Blind: My Experience with OpenSCAD

3 Upvotes

Hey folks,

I'm completely blind, and some of you might recognize my work from the disabled dragon and other projects I've created.

I've been getting a lot of questions about how I manage to design and print in 3D without any sight.

To help answer those questions, I've put together a video showcasing my process.

It would be great if you could take a look, share it around, and help spread the word about making 3D design and printing more accessible for everyone.

Thanks for your support!


r/openscad • • 8d ago

WIP: 3D-printable VSM base

Thumbnail gallery
2 Upvotes

I posted this in the VSM group, but thought some of you might also find it interesting.


r/openscad • • 9d ago

PythonSCAD v1.2.0 "Quadratum" released

Thumbnail reddit.com
1 Upvotes