discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Fixing a mesh problem

T(
Terry (Gmail)
Sat, Sep 12, 2026 3:51 PM

Hi,

Around 9 am I began what I'd hoped would be maybe half an hour's work,
But quickly found that because of infrequent use I had forgotten most of
what little I'd once learned of OpenSCAD coding. Some eight hours later
and I've relearned the basics but the task remains unfinished. It's a
small edit to an imported model from a ThingVerse .stl download. It's
clear that I could do it in a few minutes with a file or drill, but I
was convinced that it should be possible using OpenSCAD and Cura.

I want to subtract the two blue cubes from the imported
model; a slot for wiring.

https://www.dropbox.com/scl/fi/ucpawfhvg9cm28zelg2jb/ReadyForDifference.jpg?rlkey=2l928fe67390w5n4yz5hlon8w&raw=1

difference() {

import("C:/Users/terry/Dropbox/3D Printing/3DP_PROJECTS/SERVO

MOUNTS/Micro Servo SG90 Mount - 4248363/files/SG90mount.stl");

translate([-10.5,-2,8])
color("blue")
cube([4,3,8]);

translate([-10.5,22,8])
color("blue")
cube([4,3,8]);

}

But when I restored the commented lines it delivered the unexpected
result shown in my other screenshot.

https://www.dropbox.com/scl/fi/dy02li06bzwwr198ykw34/SG90Mount_e3.jpg?rlkey=kg2hs34qvue01wkw9ixehn4wa&raw=1

Subsequent work soon revealed that the original had mesh flaws/holes,
generating messages like
"..not watertight and may not print properly"
".. Current top level object is empty."

Later results in OpenSCAD with a variety of 'repairs' were totally
empty.

Despite help (of varying quality) from ChatGPT and Gemini, plus the use
of various other tools including Prura and AutoDesk MeshMixer I'm coming
to the conclusion that it will have to be the drill. Do the resident
gurus have any other ideas please; I just hate unsolved puzzles ;-)

Terry, UK

Hi, Around 9 am I began what I'd hoped would be maybe half an hour's work, But quickly found that because of infrequent use I had forgotten most of what little I'd once learned of OpenSCAD coding. Some eight hours later and I've relearned the basics but the task remains unfinished. It's a small edit to an imported model from a ThingVerse .stl download. It's clear that I could do it in a few minutes with a file or drill, but I was convinced that it should be possible using OpenSCAD and Cura. I want to subtract the two blue cubes from the imported model; a slot for wiring. https://www.dropbox.com/scl/fi/ucpawfhvg9cm28zelg2jb/ReadyForDifference.jpg?rlkey=2l928fe67390w5n4yz5hlon8w&raw=1 difference() { import("C:/Users/terry/Dropbox/3D Printing/3DP_PROJECTS/SERVO MOUNTS/Micro Servo SG90 Mount - 4248363/files/SG90mount.stl"); translate([-10.5,-2,8]) color("blue") cube([4,3,8]); translate([-10.5,22,8]) color("blue") cube([4,3,8]); } But when I restored the commented lines it delivered the unexpected result shown in my other screenshot. https://www.dropbox.com/scl/fi/dy02li06bzwwr198ykw34/SG90Mount_e3.jpg?rlkey=kg2hs34qvue01wkw9ixehn4wa&raw=1 Subsequent work soon revealed that the original had mesh flaws/holes, generating messages like "..not watertight and may not print properly" ".. Current top level object is empty." Later results in OpenSCAD with a variety of 'repairs' were totally empty. Despite help (of varying quality) from ChatGPT and Gemini, plus the use of various other tools including Prura and AutoDesk MeshMixer I'm coming to the conclusion that it will have to be the drill. Do the resident gurus have any other ideas please; I just hate unsolved puzzles ;-) Terry, UK
JB
Jordan Brown
Sat, Sep 12, 2026 4:34 PM

That second screen shot looks like a classic convexity problem. Add “convexity=10” to the import call.

That second screen shot looks like a classic convexity problem. Add “convexity=10” to the import call.