discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

rendering imported stl

G
gmagyar6@gmail.com
Sat, Feb 11, 2023 1:00 PM
I would like to import an stl file *** import("f:\stl\korona.stl", convexity=4); ***, but gives an error message when rendering (F5):

"Parsing design (AST generation)...
Compiling design (CSG Products generation)...
WARNING: Can't open import file 'd:/Program Files\f:stlkorona.stl', import() at line 1

Where does the 'd:/Program Files' part come from??
How can I eliminate it?

After the second F5, there is no warning, but nothing is displayed.

Parsing design (AST generation)...
Compiling design (CSG Tree generation)...
Compiling design (CSG Products generation)...
Geometries in cache: 1
Geometry cache size in bytes: 152
CGAL Polyhedrons in cache: 0
CGAL cache size in bytes: 0
Compiling design (CSG Products normalization)...
Normalized tree has 1 elements!
Compile and preview finished.
Total rendering time: 0:00:00.043

What's happening?
Thank you in advance for your help!
Gabor
``` I would like to import an stl file *** import("f:\stl\korona.stl", convexity=4); ***, but gives an error message when rendering (F5): "Parsing design (AST generation)... Compiling design (CSG Products generation)... WARNING: Can't open import file 'd:/Program Files\f:stlkorona.stl', import() at line 1 Where does the 'd:/Program Files' part come from?? How can I eliminate it? After the second F5, there is no warning, but nothing is displayed. Parsing design (AST generation)... Compiling design (CSG Tree generation)... Compiling design (CSG Products generation)... Geometries in cache: 1 Geometry cache size in bytes: 152 CGAL Polyhedrons in cache: 0 CGAL cache size in bytes: 0 Compiling design (CSG Products normalization)... Normalized tree has 1 elements! Compile and preview finished. Total rendering time: 0:00:00.043 What's happening? Thank you in advance for your help! Gabor ```
FH
Father Horton
Sat, Feb 11, 2023 1:09 PM

If you’re on Windows, try forward slashes instead of backslashes.

On Sat, Feb 11, 2023 at 7:01 AM gmagyar6@gmail.com wrote:

I would like to import an stl file *** import("f:\stl\korona.stl", convexity=4); ***, but gives an error message when rendering (F5):

"Parsing design (AST generation)...
Compiling design (CSG Products generation)...
WARNING: Can't open import file 'd:/Program Files\f:stlkorona.stl', import() at line 1

Where does the 'd:/Program Files' part come from??
How can I eliminate it?

After the second F5, there is no warning, but nothing is displayed.

Parsing design (AST generation)...
Compiling design (CSG Tree generation)...
Compiling design (CSG Products generation)...
Geometries in cache: 1
Geometry cache size in bytes: 152
CGAL Polyhedrons in cache: 0
CGAL cache size in bytes: 0
Compiling design (CSG Products normalization)...
Normalized tree has 1 elements!
Compile and preview finished.
Total rendering time: 0:00:00.043

What's happening?
Thank you in advance for your help!
Gabor


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

If you’re on Windows, try forward slashes instead of backslashes. On Sat, Feb 11, 2023 at 7:01 AM <gmagyar6@gmail.com> wrote: > I would like to import an stl file *** import("f:\stl\korona.stl", convexity=4); ***, but gives an error message when rendering (F5): > > "Parsing design (AST generation)... > Compiling design (CSG Products generation)... > WARNING: Can't open import file 'd:/Program Files\f:stlkorona.stl', import() at line 1 > > Where does the 'd:/Program Files' part come from?? > How can I eliminate it? > > After the second F5, there is no warning, but nothing is displayed. > > Parsing design (AST generation)... > Compiling design (CSG Tree generation)... > Compiling design (CSG Products generation)... > Geometries in cache: 1 > Geometry cache size in bytes: 152 > CGAL Polyhedrons in cache: 0 > CGAL cache size in bytes: 0 > Compiling design (CSG Products normalization)... > Normalized tree has 1 elements! > Compile and preview finished. > Total rendering time: 0:00:00.043 > > What's happening? > Thank you in advance for your help! > Gabor > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
JB
Jordan Brown
Sat, Feb 11, 2023 5:51 PM

On 2/11/2023 5:09 AM, Father Horton wrote:

On Sat, Feb 11, 2023 at 7:01 AM gmagyar6@gmail.com wrote:

 |I would like to import an stl file ***
 import("f:\stl\korona.stl", convexity=4); ***, but gives an error
 message when rendering (F5): |

If you’re on Windows, try forward slashes instead of backslashes.

That's a good answer.

The problem is that backslashes are special in strings.  Like in most
modern languages they are used to introduce special characters into the
string.  To get a real backslash in the string you need to double it.

As for where the "d:/Program Files" came from, I don't know exactly but
I suspect that once there are no directory separators in the string and
so it's a relative path, the program made it be relative to the current
directory, defined somehow.

Anyhow, either:

|import("f:/stl/korona.stl", convexity=4); |

|or|

||

|import("f:\stl\korona.stl", convexity=4)|||;

On 2/11/2023 5:09 AM, Father Horton wrote: > On Sat, Feb 11, 2023 at 7:01 AM <gmagyar6@gmail.com> wrote: > > |I would like to import an stl file *** > import("f:\stl\korona.stl", convexity=4); ***, but gives an error > message when rendering (F5): | > > If you’re on Windows, try forward slashes instead of backslashes. That's a good answer. The problem is that backslashes are special in strings.  Like in most modern languages they are used to introduce special characters into the string.  To get a real backslash in the string you need to double it. As for where the "d:/Program Files" came from, I don't know exactly but I suspect that once there are no directory separators in the string and so it's a relative path, the program made it be relative to the current directory, defined somehow. Anyhow, either: |import("f:/stl/korona.stl", convexity=4); | |or| || |import("f:\\stl\\korona.stl", convexity=4)|||;