0

I can import external STL to OpenScad, and use it as is. Yet I fail to manipulate the imported object, mostly with the difference() command. Mostly I need to cut pieces out of the imported STL. I know it can be done on the slicer (I was PrusaSlicer), yet I prefer to do it on the OpenScad because I can do it systematically on the source code. Also, sometimes the needs to cut are not as simple as the slicer can do.

For example: difference() { import("ext_stl.stl", convexity=20); cube([10,30,10]); }

I assume the imported STL is written in a format that OpenScad can't handle, so I wonder if there is any way to translate this input STL file into something that OpenScad could handle it?

I tried importing the STL into a module and use the reference to this module. I also tried loading it into PrusaSlicer and exporting as a new STL - also failed.

Yigal B
  • 21
  • 1
  • 1
    your code is correct, see running example https://stackoverflow.com/questions/19554499/how-to-modify-imported-stl-files-in-openscad/24035755#24035755. Are ther any messages in the openscad-console? please provide your stl-file – a_manthey_67 Apr 01 '22 at 18:29
  • It can happen if the stl isn't closed and, I think, if the faces are inverted – Cadeyrn Jul 13 '22 at 18:31
  • The problem occurred in several occasions where the STL was valid and the OpenSCAD design was valid separated. It looks like an OpenSCAD issue. Perhaps there is need to translate imported STL into something else that OpenSCAD can read and use. – YigalB Jul 19 '22 at 08:50

0 Answers0