r/openscad

[UPDATE] Evolution of my VGO Leak Detector: From School Eraser Prototype to 3D Printed PETGIoT

Hi u/Stone_Age_Sculptor and u/Bitter_Extension333!

Following your advice, I rewritten the script to follow the "Outside-In" approach and cleaned up the parameters to English. Here is the video showing my first version. As you can see, I was using a simple school eraser for the needle valve, which was good for a low-pressure test.

The new code (2.0) focuses on professional specs for high-pressure (70 mca) IoT testing:

PETG/ABS heat-insert and bolt pass for a proper M5 needle valve.

Designed a dedicated O-Ring Seat (6.3mm dia) with proper clearance (0.6mm compression reliefs).

Correct Venturi angle (21mm to 1.5mm throat) and overlaps (3mm) for strength.

I would love your thoughts on the O-ring Dynamic Seal geometry before printing!

``` openscad

$fn = 120;

// ============================================

// PARAMETERS

// ============================================

throat_dia = 1.5;

total_len = 95;

body_dia = 38;

thread_h = 22;

// O-RING PARAMETERS (PROFESSIONAL)

oring_dia = 6.3; // compression (adjustable)

oring_width = 2.2; // channel width

// ============================================

// MODULE: CUSTOM THREAD

// ============================================

module vgo_thread(d_ext, h, male=true) {

pitch = 1.814;

height = 1.2;

turns = h/pitch;

union() {

cylinder(d = male ? d_ext - 2 : d_ext + 2, h = h);

linear_extrude(height = h, twist = -360 * turns, slices = 400, convexity = 10)

translate([d_ext/2 - (male ? 0.6 : -0.6), 0, 0])

polygon([

[0, 0],

[height, pitch/2],

[0, pitch]

]);

}

}

// ============================================

// MAIN ASSEMBLY

// ============================================

difference() {

// =========================

// EXTERNAL BODY

// =========================

union() {

// MALE INPUT THREAD

translate([0,0,-3])

vgo_thread(20.95, thread_h + 6, true);

// MAIN BODY

translate([0,0,thread_h - 3])

cylinder(h = total_len - (thread_h * 2) + 6, d = body_dia);

// TOP OUTPUT

translate([0,0,total_len - thread_h - 1])

cylinder(h = thread_h + 2, d = body_dia);

}

// =========================

// INTERNAL VENTURI

// =========================

translate([0,0,-4])

cylinder(h=50, d1=21, d2=throat_dia);

translate([0,0,46])

cylinder(h=25, d=throat_dia);

translate([0,0,71])

cylinder(h=28, d1=throat_dia, d2=19.5);

// =========================

// FEMALE THREAD (WITH CLEARANCE)

// =========================

translate([0,0,total_len - thread_h - 2])

vgo_thread(19.0, thread_h + 4, false);

// =========================

// LATERAL SYSTEM (M5)

// =========================

translate([0,0,58.5])

rotate([0,90,0]) {

// BOLT PASSAGE

cylinder(h=body_dia + 20, d=5, center=true);

// M5 HEAT INSERT (6.7mm)

translate([0,0,body_dia/2 - 7])

cylinder(h=10, d=6.7);

// O-RING SEAT

translate([0,0,-(body_dia/2 - 2)]) {

cylinder(h=oring_width, d=oring_dia);

translate([0,0,oring_width])

cylinder(h=1, d=oring_dia + 0.6);

translate([0,0,-1])

cylinder(h=1, d=oring_dia + 0.6);

}

}

} ```

u/Maleficent-Issue-223 — 2 hours ago

[UPDATE] Evolution of my VGO Leak Detector: From School Eraser Prototype to 3D Printed PETGIoT

Hi u/Stone_Age_Sculptor and u/Bitter_Extension333!

Following your advice, I rewritten the script to follow the "Outside-In" approach and cleaned up the parameters to English. Here is the video showing my first version. As you can see, I was using a simple school eraser for the needle valve, which was good for a low-pressure test.

The new code (2.0) focuses on professional specs for high-pressure (70 mca) IoT testing:

PETG/ABS heat-insert and bolt pass for a proper M5 needle valve.

Designed a dedicated O-Ring Seat (6.3mm dia) with proper clearance (0.6mm compression reliefs).

Correct Venturi angle (21mm to 1.5mm throat) and overlaps (3mm) for strength.

I would love your thoughts on the O-ring Dynamic Seal geometry before printing!

``` openscad

$fn = 120;

// ============================================

// PARAMETERS

// ============================================

throat_dia = 1.5;

total_len = 95;

body_dia = 38;

thread_h = 22;

// O-RING PARAMETERS (PROFESSIONAL)

oring_dia = 6.3; // compressão (ajustável)

oring_width = 2.2; // largura do canal

// ============================================

// MODULE: CUSTOM THREAD

// ============================================

module vgo_thread(d_ext, h, male=true) {

pitch = 1.814;

height = 1.2;

turns = h/pitch;

union() {

cylinder(d = male ? d_ext - 2 : d_ext + 2, h = h);

linear_extrude(height = h, twist = -360 * turns, slices = 400, convexity = 10)

translate([d_ext/2 - (male ? 0.6 : -0.6), 0, 0])

polygon([

[0, 0],

[height, pitch/2],

[0, pitch]

]);

}

}

// ============================================

// MAIN ASSEMBLY

// ============================================

difference() {

// =========================

// EXTERNAL BODY

// =========================

union() {

// MALE INPUT THREAD

translate([0,0,-3])

vgo_thread(20.95, thread_h + 6, true);

// MAIN BODY

translate([0,0,thread_h - 3])

cylinder(h = total_len - (thread_h * 2) + 6, d = body_dia);

// TOP OUTPUT

translate([0,0,total_len - thread_h - 1])

cylinder(h = thread_h + 2, d = body_dia);

}

// =========================

// INTERNAL VENTURI

// =========================

translate([0,0,-4])

cylinder(h=50, d1=21, d2=throat_dia);

translate([0,0,46])

cylinder(h=25, d=throat_dia);

translate([0,0,71])

cylinder(h=28, d1=throat_dia, d2=19.5);

// =========================

// FEMALE THREAD (COM FOLGA)

// =========================

translate([0,0,total_len - thread_h - 2])

vgo_thread(19.0, thread_h + 4, false);

// =========================

// LATERAL SYSTEM (M5)

// =========================

translate([0,0,58.5])

rotate([0,90,0]) {

// PASSAGEM DO PARAFUSO

cylinder(h=body_dia + 20, d=5, center=true);

// INSERTO M5

translate([0,0,body_dia/2 - 7])

cylinder(h=10, d=6.7);

// ====================================

// O-RING PROFISSIONAL

// ====================================

translate([0,0,-(body_dia/2 - 2)]) {

// canal principal (vedação)

cylinder(h=oring_width, d=oring_dia);

// alívio superior

translate([0,0,oring_width])

cylinder(h=1, d=oring_dia + 0.6);

// alívio inferior

translate([0,0,-1])

cylinder(h=1, d=oring_dia + 0.6);

}

}

} ```

u/Maleficent-Issue-223 — 2 hours ago
Help needed: Professional Venturi device for water leak detection. Issues with 1/2" BSP threads and manifold errors.

Help needed: Professional Venturi device for water leak detection. Issues with 1/2" BSP threads and manifold errors.

Hi everyone, I am a sanitation professional in Brazil working on a device called VGO (Wave Generator Valve) for hydraulic leak detection (Geophone assistance).

I am struggling with the OpenSCAD code. I have two main issues:

Jagged Threads: My 1/2" BSP threads look like gears/steps instead of a smooth helix.

Floating Geometry: Sometimes the threads appear disconnected from the main body, causing 3D print shops to reject my file because it's "non-manifold" or has gaps.

Technical Requirements (Memorial Descritivo):

Internal: A Venturi channel narrowing down to 1.5mm (critical for pulse intensity).

Side Adjustment: A lateral 5mm hole passing exactly through the center of the throat.

Hardware: It must accommodate an M5 Heat-set metallic insert (6.7mm x 8mm) and a 6.5mm O-ring groove for sealing under high pressure (up to 70 mca).

Connections: Standard 1/2" BSP threads (Male/Female).

Print Specs: 100% infill, PETG/ABS, 0.12mm layer height.

I need the code to be "watertight" (manifold) so the print shops stop rejecting it. Any help to clean up the geometry and fix the spiral threads would be greatly appreciated!

My current code and the "strange" thread photo are attached.

[$fn=120; // 120 já é excelente e o render fica mais rápido que 180

// =========================

// PARÂMETROS (RESUMO JOÃO PAULO)

// =========================

gar = 1.5;

comp = 95;

corpo = 38;

alt_rosca = 22;

// =========================

// MÓDULO DE ROSCA AJUSTADO

// =========================

module rosca_vgo(d_ext, h, macho=true) {

passo = 1.814;

altura = 1.2;

voltas = h/passo;

union() {

cylinder(d = macho ? d_ext - 2 : d_ext + 2, h = h);

// ADICIONEI O "SLICES = 400" PARA A RAMPA FICAR LISA

linear_extrude(height = h, twist = -360 * voltas, slices = 400)

translate([d_ext/2 - (macho ? 0.6 : -0.6), 0, 0])

polygon([

[0,0],

[altura, passo/2],

[0, passo]

]);

}

}

// =========================

// MONTAGEM DO VGO

// =========================

difference(){

union(){

// ROSCA MACHO (COM SOBREPOSIÇÃO PARA FORÇA)

translate([0,0,-3])

rosca_vgo(20.95, alt_rosca+6, true);

// CORPO CENTRAL

translate([0,0,alt_rosca-3])

cylinder(h=comp-(alt_rosca*2)+6, d=corpo);

// TOPO (SAÍDA)

translate([0,0,comp-alt_rosca-1])

cylinder(h=alt_rosca+2, d=corpo);

}

// VENTURI (CANAL INTERNO LISO)

translate([0,0,-2]) cylinder(h=48, d1=20.5, d2=gar);

translate([0,0,45]) cylinder(h=14, d=gar);

translate([0,0,58]) cylinder(h=40, d1=gar, d2=19);

// ROSCA FÊMEA (REFORÇADA)

translate([0,0,comp-alt_rosca-2])

rosca_vgo(18.8, alt_rosca+4, false);

// SISTEMA LATERAL (M5 + O-RING)

translate([0,0,52.5]) rotate([0,90,0]){

cylinder(h=corpo+20, d=5, center=true);

// Inserto 6.7mm

translate([0,0,corpo/2 - 7]) cylinder(h=10, d=6.7);

// O-ring 6.5mm

translate([0,0,-(corpo/2 - 2)]) cylinder(h=10, d=6.5);

}

}

]

u/Maleficent-Issue-223 — 6 hours ago

Alguna IA para generar modelos?

Buenos días!

Me gustaría saber si alguno utiliza alguna IA para generar modelos en openscad.

Quiero aprender un poco a utilizarlo, pero no he programado en mi vida, por lo que me gustaría que yo le describa lo que quiero, y así ir teniendo ejemplos.

reddit.com
u/Chachejavi — 9 hours ago
Week