I cannot create stl from imported and modified stl

I am using openscad version 2021.01 on my Linux Debian desktop**.**

I cannot get the following to render and therefore it cannot be saved as a new stl.


difference() {

translate([13,500,-98])rotate([90,0,0])import(“/media/alf/My Passport/CurrentDevelopment/3d/Blade_Bell_222_V2/Body2.stl”);






Please help.

Do you have a picture of what you are trying to produce. I would be happy to help.

It also looks like you do not have spaces between the commands. For example:

translate([13,500,-98]) rotate([90,0,0]) import(“sample.stl”);

You need at least one space between the translate and the rotate and the import.

I would also try adding one statement at a time instead of trying to debug the whole model at once.

I don’t think a space is needed. I tried this experiment:


which works fine in OpenSCAD 2022.11.27.ci12866 anyway.

I’m so sorry. I looked at this back when you posted, but I guess I forgot to post. :frowning_face:

Anyway, this test program works for me, fwiw:

difference() {
color(“green”) translate([13,500,-98]) rotate([90,0,0]) import(“Paperclip.stl”);
color(“gold”) rotate([-2.25,0,0])translate([-6,-172,-1.25])cube([3.5,85,30]);

I have unfortunately not explained well what I am trying to do, sorry.
I am attempting to remove portions of the stl that I downloaded from the internet and my code seems to work but when it comes to Render(F6) the display is a mess, even though the preview(F5) looks fine. Without the render one cannot create an stl.
Unfortunately as a new member I am unable to upload the file in question to show it.

Body2.stl (3.4 MB)
If one looks at the uploaded stl one can see that it is part of a radio control helicopter fuselage.
It incorporates two blocks inside the fuselage. I wish to remove these blocks as with them in my mechanics do not fit.
As I said I can preview the stl with blocks removed but cannot render it. A render looks like:-

To display my problem the attached show what I have now.

The STL has a bad mesh.

I put the STL into TinkerCAD and hacked out the two center structures that seem to be in the way. That file is attached. The new STL sliced ok in both PrusaSlicer (with auto mesh repair turned on) and Cura (after repairing with the Mesh Tools plugin).

Hope this helps.

Body2-edited.stl (1.2 MB)

Thank you Alan. I will now see if I can do the same with the other section of the fuselage.

When I attempt uploading the other part of the fuselage into Tinkercad I get told “error in uploading”. I suspect that the file may be too big. I will try again tomorrow.

It could be too big or the mesh is too bad. You may have to try an industrial-strength fix like Meshmixer.


Ive had pretty good luck getting stl’s repair here, even ones PrusaSlicer couldn’t fix.

Thanks for the link! It successfully repaired Body2.stl:

" → In queue. Waiting before you in the queue: 0 (refreshing each second)

→ Reading file and indexing vertices
→ Analysed your file:
→ 0 Naked edges (?)
→ 0 Planar holes (?)
→ 0 Non-planar holes (?)
→ 12 Non-manifold edges (?)
→ 39 Inverted faces (?)
→ 10 Degenerate faces (?)
→ 2 Duplicate faces (?)
→ 0 Disjoint shells (?)

→ Repairing: 100.00%

----- Repair completed in 13679ms ------
→ Vertex count changed from 35800 to 36286 (+486)
→ Triangle count changed from 71683 to 73086 (+1403)
→ Body2.stl available for download. Click the button below to download"

And, Meshmixer didn’t find any flaws in the repaired file.


1 Like