Did SVG import or Linear Extrude get broken or change?

6 views
Skip to first unread message

William Adams

unread,
Jan 17, 2026, 7:40:07 AMJan 17
to PythonSCAD
Tried to do this with the code:

$fn = 180;

linear_extrude(height = 500, center = false, convexity = 10)
import(file = "hi_lo.svg", center = true, dpi = 96);

using the attached file, but it would not generate in OpenPythonSCAD (then I updated and it quit working, see the Github issue)

It works as expected in OpenSCAD:


Screenshot 2026-01-17 073935.png

William
hi_lo.svg

William Adams

unread,
Jan 17, 2026, 9:13:09 AMJan 17
to PythonSCAD
For the record, this still happens in 0.8.14

PythonSCAD 0.8.14 

https://www.pythonscad.org/
 

Copyright (C) 2009-2026 The OpenSCAD Developers

Copyright (C) 2024-2026 The PythonSCAD Developers

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

 

Parsing design (AST generation)...

Compiling design (CSG Tree generation)...

Rendering Polygon Mesh using Manifold...

Geometries in cache: 2

Geometry cache size in bytes: 940600

CGAL Polyhedrons in cache: 0

CGAL cache size in bytes: 0

Total rendering time: 0:00:00.088

Top level object is a 3D object (PolySet):

Convex: no

Triangles: 18064

Rendering finished.


Guenther Sohler

unread,
Jan 17, 2026, 2:00:06 PMJan 17
to William Adams, PythonSCAD
Hi William,

The SVG File defines shapes with fill=none, which maps to transparent shapes.
Once you extrude them you see transparent/invisible solids.
PythonSCAD has this behaviour, since it can render colored 2D shapes which are not only cyan.
Feel free to re-color red to see it.

> It works as expected in OpenSCAD:
In that case I would rather say: it works as expected in PythonSCAD

Let me know if coloring your code  yields the correct result :)






--
You received this message because you are subscribed to the Google Groups "PythonSCAD" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pythonscad+...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/pythonscad/a99efb00-8a22-438a-bdc9-da9f47a17be2n%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

William Adams

unread,
Jan 19, 2026, 7:19:16 AMJan 19
to PythonSCAD
Where to add that to:

$fn = 180;

linear_extrude(height = 500, center = false, convexity = 10)
import(file = "hi_lo.svg", center = true, dpi = 96);

William

Guenther Sohler

unread,
Jan 19, 2026, 7:23:14 AMJan 19
to William Adams, PythonSCAD
Hi William, i think any place is fine
e.g.

color("red")
linear_extrude(height = 500, center = false, convexity = 10)
import(file = "hi_lo.svg", center = true, dpi = 96);

You are using SCAD syntax only for direct comparison, right ?


William Adams

unread,
Jan 19, 2026, 7:28:53 AMJan 19
to PythonSCAD
No, I was working in OpenSCAD code in OpenPythonSCAD when the above wasn't working.

Here's the SVG.

The weird thing is, adding that to the .scad file 

$fn = 180;


color("red");
linear_extrude(height = 500, center = false, convexity = 10)
import(file = "hi_lo.svg", center = true, dpi = 96);

claimed to have worked:

but I'm not seeing a visible result when I "View All":

Screenshot 2026-01-17 073935.png

Thoughts?

William
hi_lo.svg

Guenther Sohler

unread,
Jan 19, 2026, 7:37:26 AMJan 19
to William Adams, PythonSCAD
yes of course

you put the color() statement to correct place, but you put an extra ';'  character, which makes color shoot nowhere ...
Please remove the ';'  character and tell me if your result improves ...



William Adams

unread,
Jan 19, 2026, 7:50:33 AMJan 19
to PythonSCAD
OIC.

Scoping issue. 

Thanks!

William

William Adams

unread,
Jan 21, 2026, 2:16:04 PM (14 days ago) Jan 21
to PythonSCAD
Would it make sense to add 

     color("goldenrod");

or something along those lines at the end of the openscad.py import file?

William
Reply all
Reply to author
Forward
0 new messages