Missing layer in model created in openscad
 
Notifications
Clear all

Missing layer in model created in openscad  

Page 1 / 2
  RSS
pAn
 pAn
(@pan)
Active Member
Missing layer in model created in openscad

Hi,

I am looking for some advice. I am relatively new to 3d printing, so I may be missing something obvious. I am having troubles with slicing a model created in openscad, please see the attached zip file (track_branch) , which contains the openscad source code (it uses library which can be found here) and rendered stl, 3mf and amf. What is happening in PrusaSlicer Version 2.3.0+linux-x64 is on attached screenshots. The first one show the imported model:

It looks fine, no error reported. After slicing, there are some layers missing:

I tried to render also 3mf and the result is even stranger:

Finally amf seems to be sliced correctly. So I have some kind of solution, but I'd like to understand what it is happening here. Is there somewhere some bug - in openscad and/or PrusaSlicer (it looks similar to this closed issue)? Or am I doing something wrong?

One strange detail is that the missing layers are changing with the number of facets in the openscad code, but I haven't found any specific relation (e.g. it is getting worse with more facets). It also changes if I cut the model and keep only one half.

Is there some way how to detect this other than viewing all the sliced layers? PrusaSlicer doesn't report any error.

Using the amf format seems to be the solution, but can I relay on it?

 

Thank you for any advises.

 

Pavel

 

Posted : 16/02/2021 2:28 pm
JoanTabb
(@joantabb)
Veteran Member Moderator
RE: Missing layer in model created in openscad

Try fixing the STL, with Netfabb (right click on the model in 3d view, and a drop down menu should appear... 

regards Joan

I try to make safe suggestions,You should understand the context and ensure you are happy that they are safe before attempting to apply my suggestions, what you do, is YOUR responsibility. Location Halifax UK

Posted : 16/02/2021 5:55 pm
pAn
 pAn
(@pan)
Active Member
Topic starter answered:
RE: Missing layer in model created in openscad

@joantabb

Hi Joan,

thank you, this actually helped, the fixed stl seems to slice as expected. So the practical part of my question is solved, but I'd really like to understand what is happening here. Does this mean that openscad produces bad stl files? Or is PrusaSlicer simply not capable of proper processing of some stl files? Or am I doing something wrong? Or is stl simply not the best choice for this task? What about the amf? Is it just a coincidence that it works or is it a better format?

Any article I should read?

Thank you for any information.

Pavel

Pavel

Posted : 16/02/2021 9:34 pm
JoanTabb
(@joantabb)
Veteran Member Moderator
RE: Missing layer in model created in openscad

Sometimes programs create errors...   
Don't get hung up on it. just Bash the STL with Netfabb if it needs it... 
Otherwise you could be changing programs all of the time... 🙂

regards Joan

I try to make safe suggestions,You should understand the context and ensure you are happy that they are safe before attempting to apply my suggestions, what you do, is YOUR responsibility. Location Halifax UK

Posted : 17/02/2021 12:00 am
fuchsr
(@fuchsr)
Famed Member
RE: Missing layer in model created in openscad

I found Openscad to be quite notorious for producing STLs that need to be fixed in Netfabb. I’m not using it often enough to know if there are any specific “tricks” to avoid it. 

Posted : 17/02/2021 12:49 am
jsw
 jsw
(@jsw)
Famed Member
RE: Missing layer in model created in openscad
Posted by: @fuchsr

I found Openscad to be quite notorious for producing STLs that need to be fixed in Netfabb. I’m not using it often enough to know if there are any specific “tricks” to avoid it. 

OpenSCAD is extremely powerful, but it sure lets you shoot yourself in the foot if you are not careful!  😉

Posted : 17/02/2021 1:04 am
Holger
(@holger-2)
Honorable Member
RE: Missing layer in model created in openscad

Hi, I loaded your .scad file under Windows 10 with OpenSCAD V2019.05 and created a new stl. However, I cannot see a fault in the PS. No missing layers, no error message. I attach my stl file here. Maybe it will help solve your issue.

Greetings, Holger 🙂 

 

Attachment removed

2x Personal MK3IR-BMG09 (Full) BEAR + MMU3 mod., ...

Posted : 17/02/2021 4:04 am
Holger
(@holger-2)
Honorable Member
RE: Missing layer in model created in openscad

Did you try cura or s3d slicer? Your stl looks correct when using it. It doesn't look like an issue with OpenSCAD to me.

2x Personal MK3IR-BMG09 (Full) BEAR + MMU3 mod., ...

Posted : 17/02/2021 5:39 am
Neophyl
(@neophyl)
Illustrious Member
RE: Missing layer in model created in openscad

It is an issue with openscad generated models as when you open them in something like blender you can generate a list of the errors and see where they are.  Cura is better at silently fixing them in the background.  Something the prusa devs have mentioned they are looking at fixing / doing the same on github simply due to the high number of problems reported when using open scad models.

While its good that slicers can/will cope with faulty models, its far better if the model does not have errors to start with.

Posted : 17/02/2021 6:55 am
pAn
 pAn
(@pan)
Active Member
Topic starter answered:
RE: Missing layer in model created in openscad

Thank you all!

I don't intent to fix the software, maybe report a bug. What I want is more understanding.

@holger-3 It seems that you sliced it with exactly the same problem as I did. It is not just so easily visible from the top layer. Look few layers bellow the top one to approx 11.2 mm. I'll try the other slicers, but based on the other comments, it seems that OpenScad is here to blame.

Do you have any advice regarding the formats? AMF vs. STL?

 

Thanks

 

Pavel

Posted : 17/02/2021 8:13 am
Neophyl
(@neophyl)
Illustrious Member
RE: Missing layer in model created in openscad

Well I haven't used amf for ages (since I had a davinci xyz printer) but formats like 3mf/amf will sometimes 'fix' an issue. 
We have seen in the past when people post problem 3mf files that the issue doesnt appear when you load their 3mf, when you load the original stl file in and slice the problem is there.  When they open their saved 3mf they dont have the issue either.  Stl is more of a 'raw' format.  So yes sometimes using a different format can make problems 'go away'.  
The problem is, that is hiding the issues.

Posted : 17/02/2021 8:34 am
jsw
 jsw
(@jsw)
Famed Member
RE: Missing layer in model created in openscad
Posted by: @holger-3

Did you try cura or s3d slicer?

I've found that Cura is (usually) more forgiving of wonky .stl files than is PS.

Posted : 17/02/2021 9:00 am
pAn
 pAn
(@pan)
Active Member
Topic starter answered:
RE: Missing layer in model created in openscad

@neophyl

As understand it, those people converted the stl to 3mf to "fix" a problem. This is not what I meant. I am directly creating amf from OpenScad. BTW - 3mf produces also broken slices.

Posted : 17/02/2021 9:04 am
Diem
 Diem
(@diem)
Illustrious Member
RE: Missing layer in model created in openscad

Sometimes a quick and dirty fix can be to enclose the whole in a render() block but this doesn't address the cause.

The issue arises when computed differences (one shape cutting bits out of another) come to values that differ in the umpteenth decimal place leaving an impossible to print micro-thin, invisible, remnant. The workaround when this happens is to make the cut-out bigger than it needs to be so that it fully penetrates.

This is a physical manifestation of the difficulty in translating from one number base to another, some decimal values cannot easily be represented in binary.

So increment the cut depth by a tiny amount, render and slice again. If the problem persists come back and let us take a look at the openSCAD script.

Posted : 17/02/2021 3:01 pm
fuchsr
(@fuchsr)
Famed Member
RE: Missing layer in model created in openscad

Yes, that's a trick I learned. E.g, when creating a hole with difference(), make sure the tool component is long enough to penetrate the surrounding surfaces, not just be flush with them.

 
Posted : 17/02/2021 3:08 pm
pAn
 pAn
(@pan)
Active Member
Topic starter answered:
RE: Missing layer in model created in openscad

Thanks, I know this trick. I need to take a deeper look into the library.

Posted : 17/02/2021 3:16 pm
IzK
 IzK
(@izk)
Active Member
RE: Missing layer in model created in openscad

I found the solution!

I had this stl loaded on prusaslicer (a mmu_holder modded by me), and appeared an ugly line of 1mm depth.

 

The solution is completely stupid and works in my file and in the tracks too:

Add part > box. Insert the box inside your model on a solid part, no matter the place, as the goal is to print nothing more than your model. Then slice it.

I tried a 0.01x0.01x0.01 box and work, so it shouldn't be a problem to hide it!

This post was modified 3 years ago by IzK
Posted : 18/02/2021 2:44 pm
fuchsr
(@fuchsr)
Famed Member
RE: Missing layer in model created in openscad

Not sure I’d call that a “solution”. Feels like a kludge, to work around a problem. Which — I admit — may well be all you need. 

Posted : 18/02/2021 2:51 pm
IzK liked
Marvin
(@marvin)
Eminent Member
RE: Missing layer in model created in openscad

Just found out that many problems with stl files from OpenSCAD only appear with binary stl.

In OpenSCAD, go to Edit->Preferences->Advanced and check "Default to ASCII STL export" (Version 2021.01-RC6).

Posted : 22/02/2021 8:57 pm
Geier liked
fuchsr
(@fuchsr)
Famed Member
RE: Missing layer in model created in openscad

@marvin-4

Now that is VERY interesting! May explain why I personally never noticed any issues with OpenSCAD exports because my default is ASCII. So if there’s some sort of bug in either OpenSCAD’s binary export or Prusaslicer’s binary STL import,  this is at least one way to address it.

Posted : 22/02/2021 9:00 pm
Page 1 / 2
Share: