Note that there is a mechanism in OpenPythonSCAD for unfolding a 3D object to a 2D PDF which can be printed out on paper and then cut out, folded, and glued together --- perhaps that is applicable?
William
Personally, I would appreciate it if any topic that requires Python
contains Python in the Subject, so I can ignore it. The first message
in such a thread is usually clear, but eventually it becomes difficult
to remember that it is irrelevant to me.
Thanks
Jon
On 2/5/2026 10:23 PM, John David via Discuss wrote:
Thank you.
After posting, I found that I had set up "cut()" as a user defined
method in openscade which included projection(cut=True) and passed it
down to the children. I now forget why I did that, but it worked in
openscad... I'll go back and clean up my hacks and see if it works
cleaner. Also, when I later tried "obj.project(cut=true)" I saw that
it worked. I think I misattributed the issue. I had also added
"...color("something")" to color it in the end.
I think I have been using the wrong description for extracting the
edge as a line of a 2D object. I'll post to the list and see if
anyone knows of that trick.
BTW, part of what I am envisioning is that the colors given to the 3D
laser cut box example
<https://www.reddit.com/r/OpenPythonSCAD/comments/1qmwfse/creating_lasercuts_with_pythonscad/
https://urldefense.proofpoint.com/v2/url?u=https-3A__www.reddit.com_r_OpenPythonSCAD_comments_1qmwfse_creating-5Flasercuts-5Fwith-5Fpythonscad_&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=pTebb61l009QqQKXD7o1s8-g7wYtnwfivwioGUcipEmzDJskOfz_ssfNz2hVc4a4&s=EhMyop24OaLMfG0dMDpQH2zMmw0BuwBodr9g7G1yTo0&e=>,
that when it progresses through the 3D object down to the 2D cutout
pattern, that the pattern still either uses the original colors (which
encode the laser cutter parameters), or can be overridden.
Understand on the API subject to change...
EBo --
On Thu, Feb 5, 2026 at 4:03 PM Guenther Sohler
guenther.sohler@gmail.com wrote:
Maybe I can answer some questions myself:
or 3 months?
Nope, 2d colored rendered shapes were sitting around and being
developed for quite some time,
But after they were merged to the main branch, there was no
progress on them anymore
one of the interesting question is: how shall a 2d Slice look like
from a projection cut=True statement.
Main problem here is, that there's no result as PythonSCAD still
has surface colors, once the interior is exposed, there is no
information on its color.
BTW: the correct syntax for cutting is
projection(obj, cut=True)
or
obj.projection(cut=True) ,
however it will not yield a colored 2D
Colored example:
are you referring to:
https://www.reddit.com/r/OpenPythonSCAD/comments/1p06hu6/colored_render_in_2d/
<https://urldefense.proofpoint.com/v2/url?u=https-3A__www.reddit.com_r_OpenPythonSCAD_comments_1p06hu6_colored-5Frender-5Fin-5F2d_&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=pTebb61l009QqQKXD7o1s8-g7wYtnwfivwioGUcipEmzDJskOfz_ssfNz2hVc4a4&s=oVkWyZtlIZBVYv6R4UILJS8ktablhsGiHs0iIiuz7GM&e=>
And for the laser cuts: they make great progress. Here is my
latest demo:
https://imgur.com/a/ZAo6YkW
<https://urldefense.proofpoint.com/v2/url?u=https-3A__imgur.com_a_ZAo6YkW&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=pTebb61l009QqQKXD7o1s8-g7wYtnwfivwioGUcipEmzDJskOfz_ssfNz2hVc4a4&s=NxAWXJKECX5XLNzTrDGhA9ViEFzAi8MWQ5n50Qw7CVw&e=>
But please: beware of the API, its not yet very stable, right now
it's like catching a running horse
C U
On Thu, Feb 5, 2026 at 6:39 PM William F. Adams
<willadams@aol.com> wrote:
On Wednesday, February 4, 2026 at 12:41:25 PM EST, John David
<ebo.2112@gmail.com> wrote:
I have carved out a little time to come back and look at this,
and I have some very simple questions about PythonSCAD and the
status of a colored SVG.
last 2 or 3 months?
No idea, I did colour DXFs because the differing coordinate
system gave me a headache and I can get an SVG from a DXF by
opening in LibreCAD and re-saving.
Since I now have a working PythonSCAD install running next to
OpenSCAD, I have a couple of noob questions that I have not
seen any place:
particular using functions?
I was able to get the project I wanted to use for
setting up a laser-cutting tool-chain to call one of my
OpenSCAD libraries to partially work,
but a function I call to generate a
two-dimensional array is triggering a seg fault and crashing
PythonSCAD. I will post a proper bug report
later, but I have hours of spelunking before I am sure
I am "doing it right(tm)"
This search brings up a couple of discussions of it:
https://old.reddit.com/r/OpenPythonSCAD/search?q=osuse&restrict_sr=on
<https://urldefense.proofpoint.com/v2/url?u=https-3A__old.reddit.com_r_OpenPythonSCAD_search-3Fq-3Dosuse-26restrict-5Fsr-3Don&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=pTebb61l009QqQKXD7o1s8-g7wYtnwfivwioGUcipEmzDJskOfz_ssfNz2hVc4a4&s=nHm76VW187qLahS4rqfmigzchmQlh2hAu8uXkRjK20k&e=>
PythonSCAD? This is what I tried:
obj = funct.generate_obj(...)
obj.cut(True)
and similar variants, but I keep getting the error
"AttributeError: 'openscad.PyOpenSCAD' object has no attribute
'cut"
I'm not seeing any discussion on this --- hopefully Guenther
can chime in.
In the past, I would design everything in 3D, so that I could
visualize part assemblages, and then use "cut(true)" to
generate the laser tool path.
recall, but cannot find? I'll try working from that end to the
middle...
I am really hoping that I can get osuse and the projection
cut functions working, so that I do not have to either rewrite
thousands of lines of OpenSCAD code into PythonSCAD. That
said, if >I can get something to work, I am willing to
refactor my libraries to use PythonSCAD.
There has been some discussion of new features for using a laser:
https://old.reddit.com/r/OpenPythonSCAD/comments/1qmwfse/creating_lasercuts_with_pythonscad/
<https://urldefense.proofpoint.com/v2/url?u=https-3A__old.reddit.com_r_OpenPythonSCAD_comments_1qmwfse_creating-5Flasercuts-5Fwith-5Fpythonscad_&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=pTebb61l009QqQKXD7o1s8-g7wYtnwfivwioGUcipEmzDJskOfz_ssfNz2hVc4a4&s=5SP904XBLA-4H5s8TKVUFhYBk_jncoKWvsXQBPw7-8w&e=>
https://old.reddit.com/r/OpenPythonSCAD/comments/1qsg4my/more_lasercut_progress/
<https://urldefense.proofpoint.com/v2/url?u=https-3A__old.reddit.com_r_OpenPythonSCAD_comments_1qsg4my_more-5Flasercut-5Fprogress_&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=pTebb61l009QqQKXD7o1s8-g7wYtnwfivwioGUcipEmzDJskOfz_ssfNz2hVc4a4&s=IzaWhdRF84ird6ZDbC577eVozD-qScAg6Q-PzWF1HhE&e=>
I'm sure Guenther would appreciate any sort of feedback you
might be able to offer and might even want feature requests
(no laser here, so can't help much)
My own approach has been to model in parallel both for 3D and
2D and write out a DXF --- this affords total control, but is
kind of clunky:
https://github.com/WillAdams/gcodepreview/blob/main/gcpcutdxf.py
<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_WillAdams_gcodepreview_blob_main_gcpcutdxf.py&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=pTebb61l009QqQKXD7o1s8-g7wYtnwfivwioGUcipEmzDJskOfz_ssfNz2hVc4a4&s=J8KQoBTXMLHIOWB3GGDWi0xmgRintyGf7yyfrIRzaag&e=>
(I converted that or a similar file to an SVG --- could that
be what you are thinking?)
Maybe there is information at:
https://raw.githubusercontent.com/pythonscad/pythonscad/refs/heads/master/libraries/python/openscad.pyi
<https://urldefense.proofpoint.com/v2/url?u=https-3A__raw.githubusercontent.com_pythonscad_pythonscad_refs_heads_master_libraries_python_openscad.pyi&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=pTebb61l009QqQKXD7o1s8-g7wYtnwfivwioGUcipEmzDJskOfz_ssfNz2hVc4a4&s=WF8mjolu7p0-mC0YdnG2mXoyM4XDntmswRcdvwAvop0&e=>
which needs to be added to:
https://www.reddit.com/r/OpenPythonSCAD/wiki/index/
<https://urldefense.proofpoint.com/v2/url?u=https-3A__www.reddit.com_r_OpenPythonSCAD_wiki_index_&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=pTebb61l009QqQKXD7o1s8-g7wYtnwfivwioGUcipEmzDJskOfz_ssfNz2hVc4a4&s=gVfuFg8ckeMSYC8FpIMWzTll75QHWOKNYjye-HsYGMQ&e=>
William
OpenSCAD mailing list
To unsubscribe send an email todiscuss-leave@lists.openscad.org
--
This email has been checked for viruses by AVG antivirus software.
www.avg.com
To be fair, I tried to do it in pure openscad first, and only moved to
pythonscad as I could not get it working in openscad. At this point, it is
mixed.
On Fri, Feb 6, 2026 at 8:02 AM Jon Bondy via Discuss <
discuss@lists.openscad.org> wrote:
Personally, I would appreciate it if any topic that requires Python
contains Python in the Subject, so I can ignore it. The first message in
such a thread is usually clear, but eventually it becomes difficult to
remember that it is irrelevant to me.
Thanks
Jon
On 2/5/2026 10:23 PM, John David via Discuss wrote:
Thank you.
After posting, I found that I had set up "cut()" as a user defined method
in openscade which included projection(cut=True) and passed it down to the
children. I now forget why I did that, but it worked in openscad... I'll
go back and clean up my hacks and see if it works cleaner. Also, when I
later tried "obj.project(cut=true)" I saw that it worked. I think I
misattributed the issue. I had also added "...color("something")" to color
it in the end.
I think I have been using the wrong description for extracting the edge as
a line of a 2D object. I'll post to the list and see if anyone knows of
that trick.
BTW, part of what I am envisioning is that the colors given to the 3D
laser cut box example <
https://www.reddit.com/r/OpenPythonSCAD/comments/1qmwfse/creating_lasercuts_with_pythonscad/
https://urldefense.proofpoint.com/v2/url?u=https-3A__www.reddit.com_r_OpenPythonSCAD_comments_1qmwfse_creating-5Flasercuts-5Fwith-5Fpythonscad_&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=pTebb61l009QqQKXD7o1s8-g7wYtnwfivwioGUcipEmzDJskOfz_ssfNz2hVc4a4&s=EhMyop24OaLMfG0dMDpQH2zMmw0BuwBodr9g7G1yTo0&e=>,
that when it progresses through the 3D object down to the 2D cutout
pattern, that the pattern still either uses the original colors (which
encode the laser cutter parameters), or can be overridden.
Understand on the API subject to change...
EBo --
On Thu, Feb 5, 2026 at 4:03 PM Guenther Sohler guenther.sohler@gmail.com
wrote:
Maybe I can answer some questions myself:
months?
Nope, 2d colored rendered shapes were sitting around and being
developed for quite some time,
But after they were merged to the main branch, there was no progress on
them anymore
one of the interesting question is: how shall a 2d Slice look like from a
projection cut=True statement.
Main problem here is, that there's no result as PythonSCAD still has
surface colors, once the interior is exposed, there is no information on
its color.
BTW: the correct syntax for cutting is
projection(obj, cut=True)
or
obj.projection(cut=True) ,
however it will not yield a colored 2D
Colored example:
are you referring to:
https://www.reddit.com/r/OpenPythonSCAD/comments/1p06hu6/colored_render_in_2d/
https://urldefense.proofpoint.com/v2/url?u=https-3A__www.reddit.com_r_OpenPythonSCAD_comments_1p06hu6_colored-5Frender-5Fin-5F2d_&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=pTebb61l009QqQKXD7o1s8-g7wYtnwfivwioGUcipEmzDJskOfz_ssfNz2hVc4a4&s=oVkWyZtlIZBVYv6R4UILJS8ktablhsGiHs0iIiuz7GM&e=
And for the laser cuts: they make great progress. Here is my latest demo:
https://imgur.com/a/ZAo6YkW
https://urldefense.proofpoint.com/v2/url?u=https-3A__imgur.com_a_ZAo6YkW&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=pTebb61l009QqQKXD7o1s8-g7wYtnwfivwioGUcipEmzDJskOfz_ssfNz2hVc4a4&s=NxAWXJKECX5XLNzTrDGhA9ViEFzAi8MWQ5n50Qw7CVw&e=
But please: beware of the API, its not yet very stable, right now
it's like catching a running horse
C U
On Thu, Feb 5, 2026 at 6:39 PM William F. Adams willadams@aol.com
wrote:
On Wednesday, February 4, 2026 at 12:41:25 PM EST, John David <
ebo.2112@gmail.com> wrote:
I have carved out a little time to come back and look at this, and I
have some very simple questions about PythonSCAD and the status of a
colored SVG.
months?
No idea, I did colour DXFs because the differing coordinate system gave
me a headache and I can get an SVG from a DXF by opening in LibreCAD and
re-saving.
Since I now have a working PythonSCAD install running next to OpenSCAD,
I have a couple of noob questions that I have not seen any place:
functions?
I was able to get the project I wanted to use for setting up a
laser-cutting tool-chain to call one of my OpenSCAD libraries to partially
work,
but a function I call to generate a two-dimensional array is
triggering a seg fault and crashing PythonSCAD. I will post a proper bug
report
later, but I have hours of spelunking before I am sure I am
"doing it right(tm)"
This search brings up a couple of discussions of it:
https://old.reddit.com/r/OpenPythonSCAD/search?q=osuse&restrict_sr=on
https://urldefense.proofpoint.com/v2/url?u=https-3A__old.reddit.com_r_OpenPythonSCAD_search-3Fq-3Dosuse-26restrict-5Fsr-3Don&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=pTebb61l009QqQKXD7o1s8-g7wYtnwfivwioGUcipEmzDJskOfz_ssfNz2hVc4a4&s=nHm76VW187qLahS4rqfmigzchmQlh2hAu8uXkRjK20k&e=
This is what I tried:
obj = funct.generate_obj(...)
obj.cut(True)
and similar variants, but I keep getting the error
"AttributeError: 'openscad.PyOpenSCAD' object has no attribute 'cut"
I'm not seeing any discussion on this --- hopefully Guenther can chime
in.
In the past, I would design everything in 3D, so that I could visualize
part assemblages, and then use "cut(true)" to generate the laser tool path.
but cannot find? I'll try working from that end to the middle...
I am really hoping that I can get osuse and the projection cut
functions working, so that I do not have to either rewrite thousands of
lines of OpenSCAD code into PythonSCAD. That said, if >I can get something
to work, I am willing to refactor my libraries to use PythonSCAD.
There has been some discussion of new features for using a laser:
https://old.reddit.com/r/OpenPythonSCAD/comments/1qmwfse/creating_lasercuts_with_pythonscad/
https://urldefense.proofpoint.com/v2/url?u=https-3A__old.reddit.com_r_OpenPythonSCAD_comments_1qmwfse_creating-5Flasercuts-5Fwith-5Fpythonscad_&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=pTebb61l009QqQKXD7o1s8-g7wYtnwfivwioGUcipEmzDJskOfz_ssfNz2hVc4a4&s=5SP904XBLA-4H5s8TKVUFhYBk_jncoKWvsXQBPw7-8w&e=
https://old.reddit.com/r/OpenPythonSCAD/comments/1qsg4my/more_lasercut_progress/
https://urldefense.proofpoint.com/v2/url?u=https-3A__old.reddit.com_r_OpenPythonSCAD_comments_1qsg4my_more-5Flasercut-5Fprogress_&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=pTebb61l009QqQKXD7o1s8-g7wYtnwfivwioGUcipEmzDJskOfz_ssfNz2hVc4a4&s=IzaWhdRF84ird6ZDbC577eVozD-qScAg6Q-PzWF1HhE&e=
I'm sure Guenther would appreciate any sort of feedback you might be
able to offer and might even want feature requests (no laser here, so can't
help much)
My own approach has been to model in parallel both for 3D and 2D and
write out a DXF --- this affords total control, but is kind of clunky:
https://github.com/WillAdams/gcodepreview/blob/main/gcpcutdxf.py
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_WillAdams_gcodepreview_blob_main_gcpcutdxf.py&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=pTebb61l009QqQKXD7o1s8-g7wYtnwfivwioGUcipEmzDJskOfz_ssfNz2hVc4a4&s=J8KQoBTXMLHIOWB3GGDWi0xmgRintyGf7yyfrIRzaag&e=
(I converted that or a similar file to an SVG --- could that be what you
are thinking?)
Maybe there is information at:
https://raw.githubusercontent.com/pythonscad/pythonscad/refs/heads/master/libraries/python/openscad.pyi
https://urldefense.proofpoint.com/v2/url?u=https-3A__raw.githubusercontent.com_pythonscad_pythonscad_refs_heads_master_libraries_python_openscad.pyi&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=pTebb61l009QqQKXD7o1s8-g7wYtnwfivwioGUcipEmzDJskOfz_ssfNz2hVc4a4&s=WF8mjolu7p0-mC0YdnG2mXoyM4XDntmswRcdvwAvop0&e=
which needs to be added to:
https://www.reddit.com/r/OpenPythonSCAD/wiki/index/
https://urldefense.proofpoint.com/v2/url?u=https-3A__www.reddit.com_r_OpenPythonSCAD_wiki_index_&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=pTebb61l009QqQKXD7o1s8-g7wYtnwfivwioGUcipEmzDJskOfz_ssfNz2hVc4a4&s=gVfuFg8ckeMSYC8FpIMWzTll75QHWOKNYjye-HsYGMQ&e=
William
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient
Virus-free.www.avg.com
http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient
<#m_-3528975608144273127_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
Probably. I will have to look at it later. Up until now I have always
unwrapped the parts myself myself.
On Fri, Feb 6, 2026 at 6:55 AM William F. Adams willadams@aol.com wrote:
Note that there is a mechanism in OpenPythonSCAD for unfolding a 3D object
to a 2D PDF which can be printed out on paper and then cut out, folded, and
glued together --- perhaps that is applicable?
William