# I cannot create stl from imported and modified stl

**URL:** <https://forum.makewithtech.com/t/i-cannot-create-stl-from-imported-and-modified-stl/7320>\
**Category:** General\
**Created:** [May 8, 2023, 10:34am UTC](https://forum.makewithtech.com/t/i-cannot-create-stl-from-imported-and-modified-stl/7320 "2023-05-08T10:34:38Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![straygrey](https://avatars.discourse-cdn.com/v4/letter/s/e56c9b/32.png) [@straygrey](https://forum.makewithtech.com/u/straygrey)\
**Post date:** [May 8, 2023, 10:34am UTC](https://forum.makewithtech.com/t/i-cannot-create-stl-from-imported-and-modified-stl/7320/1 "2023-05-08T10:34:38Z")

</div>

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.

```auto
code

```

difference() {

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

rotate([-2.25,0,0])translate([-6,-172,-1.25])cube([3.5,85,30]);

translate([-30,-90,18])cube([60,80,12]);

}

translate([-27,-90,18])cube([56,77,3]);

```auto
/code

Please help.

```

---

<div class="post-metadata">

**Author:** ![irvshapiro](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.makewithtech.com/irvshapiro/32/2144_2.png) [@irvshapiro](https://forum.makewithtech.com/u/irvshapiro)\
**Post date:** [May 23, 2023, 5:36pm UTC](https://forum.makewithtech.com/t/i-cannot-create-stl-from-imported-and-modified-stl/7320/2 "2023-05-23T17:36:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![irvshapiro](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.makewithtech.com/irvshapiro/32/2144_2.png) [@irvshapiro](https://forum.makewithtech.com/u/irvshapiro)\
**Post date:** [May 23, 2023, 5:38pm UTC](https://forum.makewithtech.com/t/i-cannot-create-stl-from-imported-and-modified-stl/7320/3 "2023-05-23T17:38:44Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![CoreyPDX](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.makewithtech.com/coreypdx/32/2173_2.png) [@CoreyPDX](https://forum.makewithtech.com/u/CoreyPDX)\
**Post date:** [May 23, 2023, 10:13pm UTC](https://forum.makewithtech.com/t/i-cannot-create-stl-from-imported-and-modified-stl/7320/4 "2023-05-23T22:13:13Z")

</div>

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

`translate([10,0])rotate([0,0,45])cube(10);`

which works fine in OpenSCAD 2022.11.27.ci12866 anyway.

---

<div class="post-metadata">

**Author:** ![Alan](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.makewithtech.com/alan/32/26_2.png) [@Alan](https://forum.makewithtech.com/u/Alan)\
**Post date:** [May 24, 2023, 3:53am UTC](https://forum.makewithtech.com/t/i-cannot-create-stl-from-imported-and-modified-stl/7320/5 "2023-05-24T03:53:20Z")

</div>

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

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]);  
translate([-30,-90,18])cube([60,80,12]);  
}  
translate([-27,-90,18])cube([56,77,3]);

---

<div class="post-metadata">

**Author:** ![straygrey](https://avatars.discourse-cdn.com/v4/letter/s/e56c9b/32.png) [@straygrey](https://forum.makewithtech.com/u/straygrey)\
**Post date:** [May 24, 2023, 5:23am UTC](https://forum.makewithtech.com/t/i-cannot-create-stl-from-imported-and-modified-stl/7320/6 "2023-05-24T05:23:07Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![straygrey](https://avatars.discourse-cdn.com/v4/letter/s/e56c9b/32.png) [@straygrey](https://forum.makewithtech.com/u/straygrey)\
**Post date:** [May 24, 2023, 7:21am UTC](https://forum.makewithtech.com/t/i-cannot-create-stl-from-imported-and-modified-stl/7320/7 "2023-05-24T07:21:02Z")

</div>

[Body2.stl](https://forum.makewithtech.com/uploads/short-url/kxRmbuIw1zVWlCeHXf8vYOYM95Q.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:-

 ![Screenshot from 2023-05-24 09-19-11](https://canada1.discourse-cdn.com/flex035/uploads/makewithtech/original/2X/d/d92af1b479840a36f14afadd8cd2add9166634b8.png)

---

<div class="post-metadata">

**Author:** ![straygrey](https://avatars.discourse-cdn.com/v4/letter/s/e56c9b/32.png) [@straygrey](https://forum.makewithtech.com/u/straygrey)\
**Post date:** [May 24, 2023, 7:45am UTC](https://forum.makewithtech.com/t/i-cannot-create-stl-from-imported-and-modified-stl/7320/8 "2023-05-24T07:45:55Z")

</div>

![IMG_20230524_093918](https://canada1.discourse-cdn.com/flex035/uploads/makewithtech/original/2X/8/824f6844aaa17cdfe0c3ecabcda02b6f00098d53.jpeg)  
 ![IMG_20230524_093941](https://canada1.discourse-cdn.com/flex035/uploads/makewithtech/original/2X/9/990447743ed9d8c62eb1a13e9fd5bb2e15c8e2ea.jpeg)  
 ![IMG_20230524_093949](https://canada1.discourse-cdn.com/flex035/uploads/makewithtech/original/2X/9/9baabd2fed3dd03f3d003e1944f2b6fe6477d1ad.jpeg)  
To display my problem the attached show what I have now.

---

<div class="post-metadata">

**Author:** ![Alan](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.makewithtech.com/alan/32/26_2.png) [@Alan](https://forum.makewithtech.com/u/Alan)\
**Post date:** [May 25, 2023, 4:01pm UTC](https://forum.makewithtech.com/t/i-cannot-create-stl-from-imported-and-modified-stl/7320/9 "2023-05-25T16:01:21Z")

</div>

The STL has a bad mesh.

---

<div class="post-metadata">

**Author:** ![Alan](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.makewithtech.com/alan/32/26_2.png) [@Alan](https://forum.makewithtech.com/u/Alan)\
**Post date:** [May 25, 2023, 4:40pm UTC](https://forum.makewithtech.com/t/i-cannot-create-stl-from-imported-and-modified-stl/7320/10 "2023-05-25T16:40:32Z")

</div>

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.

Cheers  
[Body2-edited.stl](https://forum.makewithtech.com/uploads/short-url/xfBlLbtF5EHYi5gjtnHvg3j6xZR.stl) (1.2 MB)

---

<div class="post-metadata">

**Author:** ![straygrey](https://avatars.discourse-cdn.com/v4/letter/s/e56c9b/32.png) [@straygrey](https://forum.makewithtech.com/u/straygrey)\
**Post date:** [May 25, 2023, 6:01pm UTC](https://forum.makewithtech.com/t/i-cannot-create-stl-from-imported-and-modified-stl/7320/11 "2023-05-25T18:01:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![straygrey](https://avatars.discourse-cdn.com/v4/letter/s/e56c9b/32.png) [@straygrey](https://forum.makewithtech.com/u/straygrey)\
**Post date:** [May 25, 2023, 6:33pm UTC](https://forum.makewithtech.com/t/i-cannot-create-stl-from-imported-and-modified-stl/7320/12 "2023-05-25T18:33:18Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Alan](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.makewithtech.com/alan/32/26_2.png) [@Alan](https://forum.makewithtech.com/u/Alan)\
**Post date:** [May 25, 2023, 8:56pm UTC](https://forum.makewithtech.com/t/i-cannot-create-stl-from-imported-and-modified-stl/7320/13 "2023-05-25T20:56:46Z")

</div>

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

Cheers

---

<div class="post-metadata">

**Author:** ![Gramps](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.makewithtech.com/gramps/32/60_2.png) [@Gramps](https://forum.makewithtech.com/u/Gramps)\
**Post date:** [May 25, 2023, 10:21pm UTC](https://forum.makewithtech.com/t/i-cannot-create-stl-from-imported-and-modified-stl/7320/14 "2023-05-25T22:21:38Z")

</div>

Ive had pretty good luck getting [stl’s repair here](https://www.formware.co/OnlineStlRepair), even ones PrusaSlicer couldn’t fix.

---

<div class="post-metadata">

**Author:** ![Alan](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.makewithtech.com/alan/32/26_2.png) [@Alan](https://forum.makewithtech.com/u/Alan)\
**Post date:** [May 26, 2023, 2:30pm UTC](https://forum.makewithtech.com/t/i-cannot-create-stl-from-imported-and-modified-stl/7320/15 "2023-05-26T14:30:38Z")

</div>

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.

Cheers
