DS
David Schooley
Sun, Dec 12, 2021 9:43 AM
I have a feeling this has come up before…
I’m curious about any thoughts/previous discussions have happened regarding incorporating Python as an embedded scripting language to OpenSCAD. Some work has been done with Python and CSG, so this isn’t entirely impossible, but it could be a lot of work; I get that.
The OpenSCAD language isn’t bad, but it’s no great shakes either. It’s interesting to see work happening to make structures a reality, but maybe it would be better to incorporate a language that has real variables and objects. There was a recent discussion around calculating parameters on the fly, which is easy with Python but is more difficult or impossible using the OpenSCAD language.
I’m not at all interested in generating OpenSCAD code from Python that just adds another layer of “Why doesn’t this work?” I think being able to write some Python code that generates an object that OpenSCAD can display and turn into something I can 3D print or cut using a laser would be amazing.
I have a feeling this has come up before…
I’m curious about any thoughts/previous discussions have happened regarding incorporating Python as an embedded scripting language to OpenSCAD. Some work has been done with Python and CSG, so this isn’t entirely impossible, but it could be a lot of work; I get that.
The OpenSCAD language isn’t bad, but it’s no great shakes either. It’s interesting to see work happening to make structures a reality, but maybe it would be better to incorporate a language that has real variables and objects. There was a recent discussion around calculating parameters on the fly, which is easy with Python but is more difficult or impossible using the OpenSCAD language.
I’m not at all interested in generating OpenSCAD code from Python that just adds another layer of “Why doesn’t this work?” I think being able to write some Python code that generates an object that OpenSCAD can display and turn into something I can 3D print or cut using a laser would be amazing.
MM
Michael Marx
Sun, Dec 12, 2021 12:38 PM
In a nut shell, this topic raises its head sometimes, and goes:
'OpenSCAD the language' is 'OpenSCAD' the topic of this 'OpenSCAD' discussion group.
This proposed discussion, about another language, is about NOT 'OpenSCAD the language'.
So go and Goggle all the discussions about NOT 'OpenSCAD the language'.
OpenSCAD IS the 'OpenSCAD language' plus the libraries used to preview and render the geometry.
IF you talk about NOT using the 'OpenSCAD language', you are NOT talking about OpenSCAD,
YOU ARE TALKING ABOUT ANOTHER IMPLIMENTATION OF THE LIBRARIES USING E.G. PYTHON and OpenCSG/CGAL, WHICH IS NOT 'OpenSCAD'.
Conversation ends.
You MAY think it is a different discussion but, in the end NO.
I'm not meaning to be abrupt, but history agrees with the above.
(just trying to save time for everyone here)
Feel free to look at all the other attempts. Google is your friend.
-----Original Message-----
From: David Schooley [mailto:dcschooley@gmail.com]
Sent: Sun, 12 Dec 2021 20:43
To: OpenSCAD general discussion
Subject: [OpenSCAD] Python Equality
I have a feeling this has come up before…
I’m curious about any thoughts/previous discussions have happened regarding incorporating
Python as an embedded scripting language to OpenSCAD. Some work has been done with Python
and CSG, so this isn’t entirely impossible, but it could be a lot of work; I get that.
The OpenSCAD language isn’t bad, but it’s no great shakes either. It’s interesting to see
work happening to make structures a reality, but maybe it would be better to incorporate a
language that has real variables and objects. There was a recent discussion around
calculating parameters on the fly, which is easy with Python but is more difficult or
impossible using the OpenSCAD language.
I’m not at all interested in generating OpenSCAD code from Python that just adds another
layer of “Why doesn’t this work?” I think being able to write some Python code that
generates an object that OpenSCAD can display and turn into something I can 3D print or
cut using a laser would be amazing.
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
In a nut shell, this topic raises its head sometimes, and goes:
'OpenSCAD the language' is 'OpenSCAD' the topic of this 'OpenSCAD' discussion group.
This proposed discussion, about another language, is about NOT 'OpenSCAD the language'.
So go and Goggle all the discussions about NOT 'OpenSCAD the language'.
OpenSCAD IS the 'OpenSCAD language' plus the libraries used to preview and render the geometry.
IF you talk about NOT using the 'OpenSCAD language', you are NOT talking about OpenSCAD,
YOU ARE TALKING ABOUT ANOTHER IMPLIMENTATION OF THE LIBRARIES USING E.G. PYTHON and OpenCSG/CGAL, WHICH IS NOT 'OpenSCAD'.
Conversation ends.
You MAY think it is a different discussion but, in the end NO.
I'm not meaning to be abrupt, but history agrees with the above.
(just trying to save time for everyone here)
Feel free to look at all the other attempts. Google is your friend.
> -----Original Message-----
> From: David Schooley [mailto:dcschooley@gmail.com]
> Sent: Sun, 12 Dec 2021 20:43
> To: OpenSCAD general discussion
> Subject: [OpenSCAD] Python Equality
>
> I have a feeling this has come up before…
>
> I’m curious about any thoughts/previous discussions have happened regarding incorporating
> Python as an embedded scripting language to OpenSCAD. Some work has been done with Python
> and CSG, so this isn’t entirely impossible, but it could be a lot of work; I get that.
>
> The OpenSCAD language isn’t bad, but it’s no great shakes either. It’s interesting to see
> work happening to make structures a reality, but maybe it would be better to incorporate a
> language that has real variables and objects. There was a recent discussion around
> calculating parameters on the fly, which is easy with Python but is more difficult or
> impossible using the OpenSCAD language.
>
> I’m not at all interested in generating OpenSCAD code from Python that just adds another
> layer of “Why doesn’t this work?” I think being able to write some Python code that
> generates an object that OpenSCAD can display and turn into something I can 3D print or
> cut using a laser would be amazing.
>
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
--
This email has been checked for viruses by AVG.
https://www.avg.com
WF
William F. Adams
Sun, Dec 12, 2021 2:54 PM
I have a feeling this has come up before…
I’m curious about any thoughts/previous discussions have happened
regarding incorporating Python as an embedded scripting language to
OpenSCAD. Some work has been done with Python and CSG, so this
isn’t entirely impossible, but it could be a lot of work; I get that.
The OpenSCAD language isn’t bad, but it’s no great shakes either.
It’s interesting to see work happening to make structures a reality,
but maybe it would be better to incorporate a language that has real
variables and objects. There was a recent discussion around calculating
parameters on the fly, which is easy with Python but is more difficult or
impossible using the OpenSCAD language.
I’m not at all interested in generating OpenSCAD code from Python
that just adds another layer of “Why doesn’t this work?” I think being
able to write some Python code that generates an object that OpenSCAD
can display and turn into something I can 3D print or cut using a laser would be amazing.
I believe that what you want is CADquery.
That said, there's a list of various 3D tools for Python at:
https://wiki.shapeoko.com/index.php/Programming#Python
some of which fall into the generate OpenSCAD code camp, and others which are quite different.
It would be interesting to have a mailing list for discussing general 3D programming techniques using arbitrary languages --- anyone know of one?
William
David Schooley <dcschooley@gmail.com> wrote:
>I have a feeling this has come up before…
>
>I’m curious about any thoughts/previous discussions have happened
>regarding incorporating Python as an embedded scripting language to
>OpenSCAD. Some work has been done with Python and CSG, so this
>isn’t entirely impossible, but it could be a lot of work; I get that.
>
>The OpenSCAD language isn’t bad, but it’s no great shakes either.
>It’s interesting to see work happening to make structures a reality,
>but maybe it would be better to incorporate a language that has real
>variables and objects. There was a recent discussion around calculating
>parameters on the fly, which is easy with Python but is more difficult or
>impossible using the OpenSCAD language.
>
>I’m not at all interested in generating OpenSCAD code from Python
>that just adds another layer of “Why doesn’t this work?” I think being
>able to write some Python code that generates an object that OpenSCAD
>can display and turn into something I can 3D print or cut using a laser would be amazing.
I believe that what you want is CADquery.
That said, there's a list of various 3D tools for Python at:
https://wiki.shapeoko.com/index.php/Programming#Python
some of which fall into the generate OpenSCAD code camp, and others which are quite different.
It would be interesting to have a mailing list for discussing general 3D programming techniques using arbitrary languages --- anyone know of one?
William
I
info@hjcreations.nl
Mon, Dec 13, 2021 10:34 AM
Hi David,
Do you know this book :
Python for 3D Printing openSCAD by Craig, John Clark
I got it and seems interesting, but had no time read it at all.
If you'reinterested I can give you more info.
Regards,
Harm Jeurink
David Schooley schreef op 2021-12-12 10:43:
I have a feeling this has come up before…
I’m curious about any thoughts/previous discussions have happened
regarding incorporating Python as an embedded scripting language to
OpenSCAD. Some work has been done with Python and CSG, so this isn’t
entirely impossible, but it could be a lot of work; I get that.
The OpenSCAD language isn’t bad, but it’s no great shakes either. It’s
interesting to see work happening to make structures a reality, but
maybe it would be better to incorporate a language that has real
variables and objects. There was a recent discussion around
calculating parameters on the fly, which is easy with Python but is
more difficult or impossible using the OpenSCAD language.
I’m not at all interested in generating OpenSCAD code from Python that
just adds another layer of “Why doesn’t this work?” I think being able
to write some Python code that generates an object that OpenSCAD can
display and turn into something I can 3D print or cut using a laser
would be amazing.
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
Hi David,
Do you know this book :
Python for 3D Printing openSCAD by Craig, John Clark
I got it and seems interesting, but had no time read it at all.
If you'reinterested I can give you more info.
Regards,
Harm Jeurink
David Schooley schreef op 2021-12-12 10:43:
> I have a feeling this has come up before…
>
> I’m curious about any thoughts/previous discussions have happened
> regarding incorporating Python as an embedded scripting language to
> OpenSCAD. Some work has been done with Python and CSG, so this isn’t
> entirely impossible, but it could be a lot of work; I get that.
>
> The OpenSCAD language isn’t bad, but it’s no great shakes either. It’s
> interesting to see work happening to make structures a reality, but
> maybe it would be better to incorporate a language that has real
> variables and objects. There was a recent discussion around
> calculating parameters on the fly, which is easy with Python but is
> more difficult or impossible using the OpenSCAD language.
>
> I’m not at all interested in generating OpenSCAD code from Python that
> just adds another layer of “Why doesn’t this work?” I think being able
> to write some Python code that generates an object that OpenSCAD can
> display and turn into something I can 3D print or cut using a laser
> would be amazing.
>
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
ER
edmund ronald
Tue, Dec 14, 2021 7:44 AM
Everybody and their dog seems to have done Python covers of OpenSCAD.
Which seems to indicate that there is a perceived need in the 3d Print
userbase.
My guess is sooner or later another project will mature enough to serve
that population, at which point the question will go away.
Edmund
On Mon, Dec 13, 2021 at 11:34 AM info@hjcreations.nl wrote:
Hi David,
Do you know this book :
Python for 3D Printing openSCAD by Craig, John Clark
I got it and seems interesting, but had no time read it at all.
If you'reinterested I can give you more info.
Regards,
Harm Jeurink
David Schooley schreef op 2021-12-12 10:43:
I have a feeling this has come up before…
I’m curious about any thoughts/previous discussions have happened
regarding incorporating Python as an embedded scripting language to
OpenSCAD. Some work has been done with Python and CSG, so this isn’t
entirely impossible, but it could be a lot of work; I get that.
The OpenSCAD language isn’t bad, but it’s no great shakes either. It’s
interesting to see work happening to make structures a reality, but
maybe it would be better to incorporate a language that has real
variables and objects. There was a recent discussion around
calculating parameters on the fly, which is easy with Python but is
more difficult or impossible using the OpenSCAD language.
I’m not at all interested in generating OpenSCAD code from Python that
just adds another layer of “Why doesn’t this work?” I think being able
to write some Python code that generates an object that OpenSCAD can
display and turn into something I can 3D print or cut using a laser
would be amazing.
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
Everybody and their dog seems to have done Python covers of OpenSCAD.
Which seems to indicate that there is a perceived need in the 3d Print
userbase.
My guess is sooner or later another project will mature enough to serve
that population, at which point the question will go away.
Edmund
On Mon, Dec 13, 2021 at 11:34 AM <info@hjcreations.nl> wrote:
> Hi David,
>
> Do you know this book :
> Python for 3D Printing openSCAD by Craig, John Clark
>
> I got it and seems interesting, but had no time read it at all.
> If you'reinterested I can give you more info.
>
> Regards,
>
> Harm Jeurink
>
> David Schooley schreef op 2021-12-12 10:43:
> > I have a feeling this has come up before…
> >
> > I’m curious about any thoughts/previous discussions have happened
> > regarding incorporating Python as an embedded scripting language to
> > OpenSCAD. Some work has been done with Python and CSG, so this isn’t
> > entirely impossible, but it could be a lot of work; I get that.
> >
> > The OpenSCAD language isn’t bad, but it’s no great shakes either. It’s
> > interesting to see work happening to make structures a reality, but
> > maybe it would be better to incorporate a language that has real
> > variables and objects. There was a recent discussion around
> > calculating parameters on the fly, which is easy with Python but is
> > more difficult or impossible using the OpenSCAD language.
> >
> > I’m not at all interested in generating OpenSCAD code from Python that
> > just adds another layer of “Why doesn’t this work?” I think being able
> > to write some Python code that generates an object that OpenSCAD can
> > display and turn into something I can 3D print or cut using a laser
> > would be amazing.
> >
> > _______________________________________________
> > OpenSCAD mailing list
> > To unsubscribe send an email to discuss-leave@lists.openscad.org
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
>
DS
David Schooley
Tue, Dec 14, 2021 4:14 PM
Thank you everyone for the comments up to the point. Even the “no, that’s not going to happen” type of feedback is useful.
To put things in context: I was a contributor to gnuplot years ago. (I did a really nice Mac version.) I’ve made a lot of 2D plots using Perl-generated gnuplot scripts. After playing with flex and bison a bit, I started thinking about a new plotting program using a more modern interpreter. Python was still relatively new, I hadn’t used Python at all at the time, but the syntax for this never-written plotting software would have been very Python-like. I started using Python a short time later, abandoned by software project, and now things that would have been Perl+gnuplot are Python with matplotlib. Life is good.
When I started 3D printing, I started with FreeCAD (which has a Python workbench) and then moved to OpenSCAD. I have a large number of OpenSCAD scripts laying around.
OpenSCAD meets my needs for almost everything I do. (It does fall down when it comes to things such as fillets around complex shapes.) There are times when I need real variables and there are times when the design needs to change depending on the size or something else, i.e., the hole pattern changes depending on the size of the object. The next step would be data-driven designs, which I can visualize but can’t really do at this point without using Python to create OpenSCAD scripts.
An example might be a 3D printed map using GIS data. You could perhaps do this with the OpenSCAD language by extruding a bitmap generated using Python. It would be cleaner, and you would have more control, if you did the whole thing in Python.
Thinking of OpenSCAD (the software) as a wrapper for OpenSCAD (the language) is perfectly reasonable. It’s not the answer I wanted, but it’s the answer I got.
So that’s where I am at. I’ll take a look at the book that Harm suggested. I think I can get the Kindle version for free.
On Dec 14, 2021, at 1:44 AM, edmund ronald edmundronald@gmail.com wrote:
Everybody and their dog seems to have done Python covers of OpenSCAD.
Which seems to indicate that there is a perceived need in the 3d Print userbase.
My guess is sooner or later another project will mature enough to serve that population, at which point the question will go away.
Edmund
On Mon, Dec 13, 2021 at 11:34 AM <info@hjcreations.nl mailto:info@hjcreations.nl> wrote:
Hi David,
Do you know this book :
Python for 3D Printing openSCAD by Craig, John Clark
I got it and seems interesting, but had no time read it at all.
If you'reinterested I can give you more info.
Regards,
Harm Jeurink
David Schooley schreef op 2021-12-12 10:43:
I have a feeling this has come up before…
I’m curious about any thoughts/previous discussions have happened
regarding incorporating Python as an embedded scripting language to
OpenSCAD. Some work has been done with Python and CSG, so this isn’t
entirely impossible, but it could be a lot of work; I get that.
The OpenSCAD language isn’t bad, but it’s no great shakes either. It’s
interesting to see work happening to make structures a reality, but
maybe it would be better to incorporate a language that has real
variables and objects. There was a recent discussion around
calculating parameters on the fly, which is easy with Python but is
more difficult or impossible using the OpenSCAD language.
I’m not at all interested in generating OpenSCAD code from Python that
just adds another layer of “Why doesn’t this work?” I think being able
to write some Python code that generates an object that OpenSCAD can
display and turn into something I can 3D print or cut using a laser
would be amazing.
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org mailto:discuss-leave@lists.openscad.org
Thank you everyone for the comments up to the point. Even the “no, that’s not going to happen” type of feedback is useful.
To put things in context: I was a contributor to gnuplot years ago. (I did a really nice Mac version.) I’ve made a lot of 2D plots using Perl-generated gnuplot scripts. After playing with flex and bison a bit, I started thinking about a new plotting program using a more modern interpreter. Python was still relatively new, I hadn’t used Python at all at the time, but the syntax for this never-written plotting software would have been very Python-like. I started using Python a short time later, abandoned by software project, and now things that would have been Perl+gnuplot are Python with matplotlib. Life is good.
When I started 3D printing, I started with FreeCAD (which has a Python workbench) and then moved to OpenSCAD. I have a large number of OpenSCAD scripts laying around.
OpenSCAD meets my needs for almost everything I do. (It does fall down when it comes to things such as fillets around complex shapes.) There are times when I need real variables and there are times when the design needs to change depending on the size or something else, i.e., the hole pattern changes depending on the size of the object. The next step would be data-driven designs, which I can visualize but can’t really do at this point without using Python to create OpenSCAD scripts.
An example might be a 3D printed map using GIS data. You could perhaps do this with the OpenSCAD language by extruding a bitmap generated using Python. It would be cleaner, and you would have more control, if you did the whole thing in Python.
Thinking of OpenSCAD (the software) as a wrapper for OpenSCAD (the language) is perfectly reasonable. It’s not the answer I wanted, but it’s the answer I got.
So that’s where I am at. I’ll take a look at the book that Harm suggested. I think I can get the Kindle version for free.
> On Dec 14, 2021, at 1:44 AM, edmund ronald <edmundronald@gmail.com> wrote:
>
> Everybody and their dog seems to have done Python covers of OpenSCAD.
> Which seems to indicate that there is a perceived need in the 3d Print userbase.
>
> My guess is sooner or later another project will mature enough to serve that population, at which point the question will go away.
>
> Edmund
>
>
>
> On Mon, Dec 13, 2021 at 11:34 AM <info@hjcreations.nl <mailto:info@hjcreations.nl>> wrote:
> Hi David,
>
> Do you know this book :
> Python for 3D Printing openSCAD by Craig, John Clark
>
> I got it and seems interesting, but had no time read it at all.
> If you'reinterested I can give you more info.
>
> Regards,
>
> Harm Jeurink
>
> David Schooley schreef op 2021-12-12 10:43:
> > I have a feeling this has come up before…
> >
> > I’m curious about any thoughts/previous discussions have happened
> > regarding incorporating Python as an embedded scripting language to
> > OpenSCAD. Some work has been done with Python and CSG, so this isn’t
> > entirely impossible, but it could be a lot of work; I get that.
> >
> > The OpenSCAD language isn’t bad, but it’s no great shakes either. It’s
> > interesting to see work happening to make structures a reality, but
> > maybe it would be better to incorporate a language that has real
> > variables and objects. There was a recent discussion around
> > calculating parameters on the fly, which is easy with Python but is
> > more difficult or impossible using the OpenSCAD language.
> >
> > I’m not at all interested in generating OpenSCAD code from Python that
> > just adds another layer of “Why doesn’t this work?” I think being able
> > to write some Python code that generates an object that OpenSCAD can
> > display and turn into something I can 3D print or cut using a laser
> > would be amazing.
> >
> > _______________________________________________
> > OpenSCAD mailing list
> > To unsubscribe send an email to discuss-leave@lists.openscad.org <mailto:discuss-leave@lists.openscad.org>
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org <mailto:discuss-leave@lists.openscad.org>
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
LM
Leonard Martin Struttmann
Tue, Dec 14, 2021 4:39 PM
David,
First and foremost, I want to congratulate you and thank you for your
contributions to gnuplot. Gnuplot was a mainstay during my career and I
wrote many a Perl and then Python scripts to generate gnuplots.
And I, too, sometimes use Python to generate OpenSCAD code. An example is
a Python script that generates designs for tensegrity towers and makes
OpenSCAD files to help visualize the designs.
*Thinking of OpenSCAD (the software) as a wrapper for OpenSCAD (the
language) *
This, to me, is a very important point. What makes OpenSCAD so valuable to
me is that OpenSCAD (the software) is a tightly Integrated Development
Environment. I tried using external code editors such as Notepad++ and
Sublime, but that seemed clumsy. Personally, I would love to have either 1)
Preferably, OpenSCAD (the IDE) modified to allow Python and OpenSCAD (the
language) files, or 2) A separate Python IDE that provided the same preview
and rendering facilities as the OpenSCAD IDE.
Good luck with your research.
On Tue, Dec 14, 2021 at 10:14 AM David Schooley dcschooley@gmail.com
wrote:
Thank you everyone for the comments up to the point. Even the “no, that’s
not going to happen” type of feedback is useful.
To put things in context: I was a contributor to gnuplot years ago. (I did
a really nice Mac version.) I’ve made a lot of 2D plots using
Perl-generated gnuplot scripts. After playing with flex and bison a bit, I
started thinking about a new plotting program using a more modern
interpreter. Python was still relatively new, I hadn’t used Python at all
at the time, but the syntax for this never-written plotting software would
have been very Python-like. I started using Python a short time later,
abandoned by software project, and now things that would have been
Perl+gnuplot are Python with matplotlib. Life is good.
When I started 3D printing, I started with FreeCAD (which has a Python
workbench) and then moved to OpenSCAD. I have a large number of OpenSCAD
scripts laying around.
OpenSCAD meets my needs for almost everything I do. (It does fall down
when it comes to things such as fillets around complex shapes.) There are
times when I need real variables and there are times when the design needs
to change depending on the size or something else, i.e., the hole pattern
changes depending on the size of the object. The next step would be
data-driven designs, which I can visualize but can’t really do at this
point without using Python to create OpenSCAD scripts.
An example might be a 3D printed map using GIS data. You could perhaps do
this with the OpenSCAD language by extruding a bitmap generated using
Python. It would be cleaner, and you would have more control, if you did
the whole thing in Python.
Thinking of OpenSCAD (the software) as a wrapper for OpenSCAD (the
language) is perfectly reasonable. It’s not the answer I wanted, but it’s
the answer I got.
So that’s where I am at. I’ll take a look at the book that Harm suggested.
I think I can get the Kindle version for free.
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
David,
First and foremost, I want to congratulate you and thank you for your
contributions to gnuplot. Gnuplot was a mainstay during my career and I
wrote many a Perl and then Python scripts to generate gnuplots.
And I, too, sometimes use Python to generate OpenSCAD code. An example is
a Python script that generates designs for tensegrity towers and makes
OpenSCAD files to help visualize the designs.
*Thinking of OpenSCAD (the software) as a wrapper for OpenSCAD (the
language) *
This, to me, is a very important point. What makes OpenSCAD so valuable to
me is that OpenSCAD (the software) is a tightly Integrated Development
Environment. I tried using external code editors such as Notepad++ and
Sublime, but that seemed clumsy. Personally, I would love to have either 1)
Preferably, OpenSCAD (the IDE) modified to allow Python and OpenSCAD (the
language) files, or 2) A separate Python IDE that provided the same preview
and rendering facilities as the OpenSCAD IDE.
Good luck with your research.
On Tue, Dec 14, 2021 at 10:14 AM David Schooley <dcschooley@gmail.com>
wrote:
> Thank you everyone for the comments up to the point. Even the “no, that’s
> not going to happen” type of feedback is useful.
>
> To put things in context: I was a contributor to gnuplot years ago. (I did
> a really nice Mac version.) I’ve made a lot of 2D plots using
> Perl-generated gnuplot scripts. After playing with flex and bison a bit, I
> started thinking about a new plotting program using a more modern
> interpreter. Python was still relatively new, I hadn’t used Python at all
> at the time, but the syntax for this never-written plotting software would
> have been very Python-like. I started using Python a short time later,
> abandoned by software project, and now things that would have been
> Perl+gnuplot are Python with matplotlib. Life is good.
>
> When I started 3D printing, I started with FreeCAD (which has a Python
> workbench) and then moved to OpenSCAD. I have a large number of OpenSCAD
> scripts laying around.
>
> OpenSCAD meets my needs for almost everything I do. (It does fall down
> when it comes to things such as fillets around complex shapes.) There are
> times when I need real variables and there are times when the design needs
> to change depending on the size or something else, i.e., the hole pattern
> changes depending on the size of the object. The next step would be
> data-driven designs, which I can visualize but can’t really do at this
> point without using Python to create OpenSCAD scripts.
>
> An example might be a 3D printed map using GIS data. You could perhaps do
> this with the OpenSCAD language by extruding a bitmap generated using
> Python. It would be cleaner, and you would have more control, if you did
> the whole thing in Python.
>
> Thinking of OpenSCAD (the software) as a wrapper for OpenSCAD (the
> language) is perfectly reasonable. It’s not the answer I wanted, but it’s
> the answer I got.
>
> So that’s where I am at. I’ll take a look at the book that Harm suggested.
> I think I can get the Kindle version for free.
>
>
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
>
TP
Torsten Paul
Tue, Dec 14, 2021 4:52 PM
On 14.12.21 17:39, Leonard Martin Struttmann wrote:
And I, too, sometimes use Python to generate OpenSCAD code.
Just as additional option, the latest Snapshot versions
allow to import JSON files. So it's possible to generate
data in a general purpose language and easily transfer
that into OpenSCAD without the need to actually generate
code (well, JSON sort-of is code, but pretty much all
languages have simple to use export options).
Example JSON File:
{
"number": 2,
"float": 3.5e-10,
"bool": true,
"string": "hallo world!",
"array_number": [ 0, 1, 2, 3, 5 ],
"array-string": [ "one", "two", "three" ],
"array-mixed": [ "one", 1, false ],
"object": {
"name": "The object name",
"nested": {
"value": 42
},
"number": 4
}
}
Usage:
j = import("scad-data.json");
echo(j.string); // ECHO: "hallo world!"
echo(j.array_number); // ECHO: [0, 1, 2, 3, 5]
echo(j["array-string"]); // ECHO: ["one", "two", "three"]
echo(j.object.name); // ECHO: "The object name"
echo(j.object.nested.value); // ECHO: 42
ciao,
Torsten.
On 14.12.21 17:39, Leonard Martin Struttmann wrote:
> And I, too, sometimes use Python to generate OpenSCAD code.
Just as additional option, the latest Snapshot versions
allow to import JSON files. So it's possible to generate
data in a general purpose language and easily transfer
that into OpenSCAD without the need to actually generate
code (well, JSON sort-of is code, but pretty much all
languages have simple to use export options).
Example JSON File:
{
"number": 2,
"float": 3.5e-10,
"bool": true,
"string": "hallo world!",
"array_number": [ 0, 1, 2, 3, 5 ],
"array-string": [ "one", "two", "three" ],
"array-mixed": [ "one", 1, false ],
"object": {
"name": "The object name",
"nested": {
"value": 42
},
"number": 4
}
}
Usage:
j = import("scad-data.json");
echo(j.string); // ECHO: "hallo world!"
echo(j.array_number); // ECHO: [0, 1, 2, 3, 5]
echo(j["array-string"]); // ECHO: ["one", "two", "three"]
echo(j.object.name); // ECHO: "The object name"
echo(j.object.nested.value); // ECHO: 42
ciao,
Torsten.
CN
Csaba Nagy
Tue, Dec 14, 2021 5:22 PM
Hi David,
at first I thought I was looking for the same, a python 3D programming
language. So I started using SolidPython:
https://github.com/SolidCode/SolidPython
It is a fairly straightforward wrapper around OpenSCAD, allowing you to
write your 3D model in python, which is then translated to OpenSCAD.
But soon I realized that what I needed is a better way to express
parameters of a complex model.
So I wrote my own python framework to process JSON descriptors, with
meta-class magic that merges the parameters across the inheritance
hierarchy. That way I can define sub-classes which basically inherit
the parameters of their base class, and can override just that single
one they actually change. The framework messes with the setters/getters
too so parameters defined in that decriptor are available with the
attribute access syntax as well as dictionary entries (the "Part" class
extends an ordered dictionary). Class instantiation can override any of
the parameters, the ones not set are left at the default value. That
overall makes for a hierarchical access of all parameters - in simple
cases simplifies the code a lot, in complex ones makes for spaghetti-
like names, but I think it is still the better way to handle 100+
variables.
Working with PyCharm I also have some magic built in the Part class
which allows me to render the current file and open it in OpenSCAD view
with the press of a key-combination. Same can be done for any file in
the project view, or for a class highlighted in the editor. That makes
for fairly streamlined work-flow where coding and preview alternate.
The catch with all this is that at the moment it is tailored for
exactly what I needed to model and it is less then pre-alpha quality
for public release. I also can't find the motivation to spend the time
necessary to improve it for the sake of publishing, real life and my
own modeling tasks are what finally win.
I will include an OpenSCAD file and the top level python class which
generated it for a sample of what can be done. I will not publish the
code as I'm not satisfied with it and will surely radically change it
still in the future - but if somebody is interested enough in it to
help preparing a publishable version, I'm ready to do a few on-line
sessions to explain what I have and discuss what and how to publish.
Without help, it will take me a few more years with the speed I'm
progressing now.
The project is hosted on gitlab.com, at the moment private and it seems
gitlab will not allow me to change that (bug I assume). Anybody wanting
to check the code, ask me and I will give you access.
Cheers,
Csaba
P.S. the scad file is a table-tennis ball machine I'm working on right
now. All elements you see are fully configurable, almost no hard-coded
number outside the CONFIG_DESCRIPTOR of each used Part/Assembly. The
iter_components method in the python file will generate a list of 3D-
printable components, processing is bound to a PyCharm key combination
too. Any class name extending Part/Assembly in the python file can be
highlighted and previewed using a key-press too (of course only in my
local setup, I would need to package the key shortcuts in a PyCharm
plugin).
On Tue, 2021-12-14 at 10:14 -0600, David Schooley wrote:
Thank you everyone for the comments up to the point. Even the “no,
that’s not going to happen” type of feedback is useful.
To put things in context: I was a contributor to gnuplot years ago.
(I did a really nice Mac version.) I’ve made a lot of 2D plots using
Perl-generated gnuplot scripts. After playing with flex and bison a
bit, I started thinking about a new plotting program using a more
modern interpreter. Python was still relatively new, I hadn’t used
Python at all at the time, but the syntax for this never-written
plotting software would have been very Python-like. I started using
Python a short time later, abandoned by software project, and now
things that would have been Perl+gnuplot are Python with matplotlib.
Life is good.
When I started 3D printing, I started with FreeCAD (which has a
Python workbench) and then moved to OpenSCAD. I have a large number
of OpenSCAD scripts laying around.
OpenSCAD meets my needs for almost everything I do. (It does fall
down when it comes to things such as fillets around complex shapes.)
There are times when I need real variables and there are times when
the design needs to change depending on the size or something else,
i.e., the hole pattern changes depending on the size of the object.
The next step would be data-driven designs, which I can visualize but
can’t really do at this point without using Python to create OpenSCAD
scripts.
An example might be a 3D printed map using GIS data. You could
perhaps do this with the OpenSCAD language by extruding a bitmap
generated using Python. It would be cleaner, and you would have more
control, if you did the whole thing in Python.
Thinking of OpenSCAD (the software) as a wrapper for OpenSCAD (the
language) is perfectly reasonable. It’s not the answer I wanted, but
it’s the answer I got.
So that’s where I am at. I’ll take a look at the book that Harm
suggested. I think I can get the Kindle version for free.
On Dec 14, 2021, at 1:44 AM, edmund ronald edmundronald@gmail.com
wrote:
Everybody and their dog seems to have done Python covers of
OpenSCAD.
Which seems to indicate that there is a perceived need in the 3d
Print userbase.
My guess is sooner or later another project will mature enough to
serve that population, at which point the question will go away.
Edmund
On Mon, Dec 13, 2021 at 11:34 AM info@hjcreations.nl wrote:
Hi David,
Do you know this book :
Python for 3D Printing openSCAD by Craig, John Clark
I got it and seems interesting, but had no time read it at all.
If you'reinterested I can give you more info.
Regards,
Harm Jeurink
David Schooley schreef op 2021-12-12 10:43:
I have a feeling this has come up before…
I’m curious about any thoughts/previous discussions have
regarding incorporating Python as an embedded scripting
OpenSCAD. Some work has been done with Python and CSG, so this
entirely impossible, but it could be a lot of work; I get that.
The OpenSCAD language isn’t bad, but it’s no great shakes
interesting to see work happening to make structures a reality,
maybe it would be better to incorporate a language that has
variables and objects. There was a recent discussion around
calculating parameters on the fly, which is easy with Python
more difficult or impossible using the OpenSCAD language.
I’m not at all interested in generating OpenSCAD code from
just adds another layer of “Why doesn’t this work?” I think
to write some Python code that generates an object that
display and turn into something I can 3D print or cut using a
would be amazing.
OpenSCAD mailing list
To unsubscribe send an email to
Hi David,
at first I thought I was looking for the same, a python 3D programming
language. So I started using SolidPython:
https://github.com/SolidCode/SolidPython
It is a fairly straightforward wrapper around OpenSCAD, allowing you to
write your 3D model in python, which is then translated to OpenSCAD.
But soon I realized that what I needed is a better way to express
parameters of a complex model.
So I wrote my own python framework to process JSON descriptors, with
meta-class magic that merges the parameters across the inheritance
hierarchy. That way I can define sub-classes which basically inherit
the parameters of their base class, and can override just that single
one they actually change. The framework messes with the setters/getters
too so parameters defined in that decriptor are available with the
attribute access syntax as well as dictionary entries (the "Part" class
extends an ordered dictionary). Class instantiation can override any of
the parameters, the ones not set are left at the default value. That
overall makes for a hierarchical access of all parameters - in simple
cases simplifies the code a lot, in complex ones makes for spaghetti-
like names, but I think it is still the better way to handle 100+
variables.
Working with PyCharm I also have some magic built in the Part class
which allows me to render the current file and open it in OpenSCAD view
with the press of a key-combination. Same can be done for any file in
the project view, or for a class highlighted in the editor. That makes
for fairly streamlined work-flow where coding and preview alternate.
The catch with all this is that at the moment it is tailored for
exactly what I needed to model and it is less then pre-alpha quality
for public release. I also can't find the motivation to spend the time
necessary to improve it for the sake of publishing, real life and my
own modeling tasks are what finally win.
I will include an OpenSCAD file and the top level python class which
generated it for a sample of what can be done. I will not publish the
code as I'm not satisfied with it and will surely radically change it
still in the future - but if somebody is interested enough in it to
help preparing a publishable version, I'm ready to do a few on-line
sessions to explain what I have and discuss what and how to publish.
Without help, it will take me a few more years with the speed I'm
progressing now.
The project is hosted on gitlab.com, at the moment private and it seems
gitlab will not allow me to change that (bug I assume). Anybody wanting
to check the code, ask me and I will give you access.
Cheers,
Csaba
P.S. the scad file is a table-tennis ball machine I'm working on right
now. All elements you see are fully configurable, almost no hard-coded
number outside the CONFIG_DESCRIPTOR of each used Part/Assembly. The
iter_components method in the python file will generate a list of 3D-
printable components, processing is bound to a PyCharm key combination
too. Any class name extending Part/Assembly in the python file can be
highlighted and previewed using a key-press too (of course only in my
local setup, I would need to package the key shortcuts in a PyCharm
plugin).
On Tue, 2021-12-14 at 10:14 -0600, David Schooley wrote:
> Thank you everyone for the comments up to the point. Even the “no,
> that’s not going to happen” type of feedback is useful.
>
> To put things in context: I was a contributor to gnuplot years ago.
> (I did a really nice Mac version.) I’ve made a lot of 2D plots using
> Perl-generated gnuplot scripts. After playing with flex and bison a
> bit, I started thinking about a new plotting program using a more
> modern interpreter. Python was still relatively new, I hadn’t used
> Python at all at the time, but the syntax for this never-written
> plotting software would have been very Python-like. I started using
> Python a short time later, abandoned by software project, and now
> things that would have been Perl+gnuplot are Python with matplotlib.
> Life is good.
>
> When I started 3D printing, I started with FreeCAD (which has a
> Python workbench) and then moved to OpenSCAD. I have a large number
> of OpenSCAD scripts laying around.
>
> OpenSCAD meets my needs for almost everything I do. (It does fall
> down when it comes to things such as fillets around complex shapes.)
> There are times when I need real variables and there are times when
> the design needs to change depending on the size or something else,
> i.e., the hole pattern changes depending on the size of the object.
> The next step would be data-driven designs, which I can visualize but
> can’t really do at this point without using Python to create OpenSCAD
> scripts.
>
> An example might be a 3D printed map using GIS data. You could
> perhaps do this with the OpenSCAD language by extruding a bitmap
> generated using Python. It would be cleaner, and you would have more
> control, if you did the whole thing in Python.
>
> Thinking of OpenSCAD (the software) as a wrapper for OpenSCAD (the
> language) is perfectly reasonable. It’s not the answer I wanted, but
> it’s the answer I got.
>
> So that’s where I am at. I’ll take a look at the book that Harm
> suggested. I think I can get the Kindle version for free.
>
> > On Dec 14, 2021, at 1:44 AM, edmund ronald <edmundronald@gmail.com>
> > wrote:
> >
> > Everybody and their dog seems to have done Python covers of
> > OpenSCAD.
> > Which seems to indicate that there is a perceived need in the 3d
> > Print userbase.
> >
> > My guess is sooner or later another project will mature enough to
> > serve that population, at which point the question will go away.
> >
> > Edmund
> >
> >
> >
> > On Mon, Dec 13, 2021 at 11:34 AM <info@hjcreations.nl> wrote:
> > > Hi David,
> > >
> > > Do you know this book :
> > > Python for 3D Printing openSCAD by Craig, John Clark
> > >
> > > I got it and seems interesting, but had no time read it at all.
> > > If you'reinterested I can give you more info.
> > >
> > > Regards,
> > >
> > > Harm Jeurink
> > >
> > > David Schooley schreef op 2021-12-12 10:43:
> > > > I have a feeling this has come up before…
> > > >
> > > > I’m curious about any thoughts/previous discussions have
> > >
> > > happened
> > > > regarding incorporating Python as an embedded scripting
> > >
> > > language to
> > > > OpenSCAD. Some work has been done with Python and CSG, so this
> > >
> > > isn’t
> > > > entirely impossible, but it could be a lot of work; I get that.
> > > >
> > > > The OpenSCAD language isn’t bad, but it’s no great shakes
> > >
> > > either. It’s
> > > > interesting to see work happening to make structures a reality,
> > >
> > > but
> > > > maybe it would be better to incorporate a language that has
> > >
> > > real
> > > > variables and objects. There was a recent discussion around
> > > > calculating parameters on the fly, which is easy with Python
> > >
> > > but is
> > > > more difficult or impossible using the OpenSCAD language.
> > > >
> > > > I’m not at all interested in generating OpenSCAD code from
> > >
> > > Python that
> > > > just adds another layer of “Why doesn’t this work?” I think
> > >
> > > being able
> > > > to write some Python code that generates an object that
> > >
> > > OpenSCAD can
> > > > display and turn into something I can 3D print or cut using a
> > >
> > > laser
> > > > would be amazing.
> > > >
> > > > _______________________________________________
> > > > OpenSCAD mailing list
> > > > To unsubscribe send an email to
> > >
> > > discuss-leave@lists.openscad.org
> > > _______________________________________________
> > > OpenSCAD mailing list
> > > To unsubscribe send an email to discuss-leave@lists.openscad.org
> >
> > _______________________________________________
> > OpenSCAD mailing list
> > To unsubscribe send an email to discuss-leave@lists.openscad.org
>
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
ER
edmund ronald
Tue, Dec 14, 2021 5:48 PM
Hi David,
at first I thought I was looking for the same, a python 3D programming
language. So I started using SolidPython:
https://github.com/SolidCode/SolidPython
It is a fairly straightforward wrapper around OpenSCAD, allowing you to
write your 3D model in python, which is then translated to OpenSCAD.
But soon I realized that what I needed is a better way to express
parameters of a complex model.
So I wrote my own python framework to process JSON descriptors, with
meta-class magic that merges the parameters across the inheritance
hierarchy. That way I can define sub-classes which basically inherit
the parameters of their base class, and can override just that single
one they actually change. The framework messes with the setters/getters
too so parameters defined in that decriptor are available with the
attribute access syntax as well as dictionary entries (the "Part" class
extends an ordered dictionary). Class instantiation can override any of
the parameters, the ones not set are left at the default value. That
overall makes for a hierarchical access of all parameters - in simple
cases simplifies the code a lot, in complex ones makes for spaghetti-
like names, but I think it is still the better way to handle 100+
variables.
Working with PyCharm I also have some magic built in the Part class
which allows me to render the current file and open it in OpenSCAD view
with the press of a key-combination. Same can be done for any file in
the project view, or for a class highlighted in the editor. That makes
for fairly streamlined work-flow where coding and preview alternate.
The catch with all this is that at the moment it is tailored for
exactly what I needed to model and it is less then pre-alpha quality
for public release. I also can't find the motivation to spend the time
necessary to improve it for the sake of publishing, real life and my
own modeling tasks are what finally win.
I will include an OpenSCAD file and the top level python class which
generated it for a sample of what can be done. I will not publish the
code as I'm not satisfied with it and will surely radically change it
still in the future - but if somebody is interested enough in it to
help preparing a publishable version, I'm ready to do a few on-line
sessions to explain what I have and discuss what and how to publish.
Without help, it will take me a few more years with the speed I'm
progressing now.
The project is hosted on gitlab.com, at the moment private and it seems
gitlab will not allow me to change that (bug I assume). Anybody wanting
to check the code, ask me and I will give you access.
Cheers,
Csaba
P.S. the scad file is a table-tennis ball machine I'm working on right
now. All elements you see are fully configurable, almost no hard-coded
number outside the CONFIG_DESCRIPTOR of each used Part/Assembly. The
iter_components method in the python file will generate a list of 3D-
printable components, processing is bound to a PyCharm key combination
too. Any class name extending Part/Assembly in the python file can be
highlighted and previewed using a key-press too (of course only in my
local setup, I would need to package the key shortcuts in a PyCharm
plugin).
On Tue, 2021-12-14 at 10:14 -0600, David Schooley wrote:
Thank you everyone for the comments up to the point. Even the “no,
that’s not going to happen” type of feedback is useful.
To put things in context: I was a contributor to gnuplot years ago.
(I did a really nice Mac version.) I’ve made a lot of 2D plots using
Perl-generated gnuplot scripts. After playing with flex and bison a
bit, I started thinking about a new plotting program using a more
modern interpreter. Python was still relatively new, I hadn’t used
Python at all at the time, but the syntax for this never-written
plotting software would have been very Python-like. I started using
Python a short time later, abandoned by software project, and now
things that would have been Perl+gnuplot are Python with matplotlib.
Life is good.
When I started 3D printing, I started with FreeCAD (which has a
Python workbench) and then moved to OpenSCAD. I have a large number
of OpenSCAD scripts laying around.
OpenSCAD meets my needs for almost everything I do. (It does fall
down when it comes to things such as fillets around complex shapes.)
There are times when I need real variables and there are times when
the design needs to change depending on the size or something else,
i.e., the hole pattern changes depending on the size of the object.
The next step would be data-driven designs, which I can visualize but
can’t really do at this point without using Python to create OpenSCAD
scripts.
An example might be a 3D printed map using GIS data. You could
perhaps do this with the OpenSCAD language by extruding a bitmap
generated using Python. It would be cleaner, and you would have more
control, if you did the whole thing in Python.
Thinking of OpenSCAD (the software) as a wrapper for OpenSCAD (the
language) is perfectly reasonable. It’s not the answer I wanted, but
it’s the answer I got.
So that’s where I am at. I’ll take a look at the book that Harm
suggested. I think I can get the Kindle version for free.
On Dec 14, 2021, at 1:44 AM, edmund ronald edmundronald@gmail.com
wrote:
Everybody and their dog seems to have done Python covers of
OpenSCAD.
Which seems to indicate that there is a perceived need in the 3d
Print userbase.
My guess is sooner or later another project will mature enough to
serve that population, at which point the question will go away.
Edmund
On Mon, Dec 13, 2021 at 11:34 AM info@hjcreations.nl wrote:
Hi David,
Do you know this book :
Python for 3D Printing openSCAD by Craig, John Clark
I got it and seems interesting, but had no time read it at all.
If you'reinterested I can give you more info.
Regards,
Harm Jeurink
David Schooley schreef op 2021-12-12 10:43:
I have a feeling this has come up before…
I’m curious about any thoughts/previous discussions have
regarding incorporating Python as an embedded scripting
OpenSCAD. Some work has been done with Python and CSG, so this
entirely impossible, but it could be a lot of work; I get that.
The OpenSCAD language isn’t bad, but it’s no great shakes
interesting to see work happening to make structures a reality,
maybe it would be better to incorporate a language that has
variables and objects. There was a recent discussion around
calculating parameters on the fly, which is easy with Python
more difficult or impossible using the OpenSCAD language.
I’m not at all interested in generating OpenSCAD code from
just adds another layer of “Why doesn’t this work?” I think
to write some Python code that generates an object that
display and turn into something I can 3D print or cut using a
would be amazing.
OpenSCAD mailing list
To unsubscribe send an email to
Here is a Medium post where John Clark Craig describes his wrapper. He
seems to have a userbase of sorts, and to be a smart cookie so there is
probably a need for something like this, and I expect sooner or later
someone will make an integrated 3D system of their own similar to this as
the openScad crowd don't like the idea.
Edmund
https://jccraig.medium.com/yes-you-can-use-python-for-3d-design-and-printing-508b1791c863
Edmund
On Tuesday, December 14, 2021, Csaba Nagy <ncsaba@javampire.com> wrote:
> Hi David,
>
> at first I thought I was looking for the same, a python 3D programming
> language. So I started using SolidPython:
>
> https://github.com/SolidCode/SolidPython
>
> It is a fairly straightforward wrapper around OpenSCAD, allowing you to
> write your 3D model in python, which is then translated to OpenSCAD.
> But soon I realized that what I needed is a better way to express
> parameters of a complex model.
>
> So I wrote my own python framework to process JSON descriptors, with
> meta-class magic that merges the parameters across the inheritance
> hierarchy. That way I can define sub-classes which basically inherit
> the parameters of their base class, and can override just that single
> one they actually change. The framework messes with the setters/getters
> too so parameters defined in that decriptor are available with the
> attribute access syntax as well as dictionary entries (the "Part" class
> extends an ordered dictionary). Class instantiation can override any of
> the parameters, the ones not set are left at the default value. That
> overall makes for a hierarchical access of all parameters - in simple
> cases simplifies the code a lot, in complex ones makes for spaghetti-
> like names, but I think it is still the better way to handle 100+
> variables.
>
> Working with PyCharm I also have some magic built in the Part class
> which allows me to render the current file and open it in OpenSCAD view
> with the press of a key-combination. Same can be done for any file in
> the project view, or for a class highlighted in the editor. That makes
> for fairly streamlined work-flow where coding and preview alternate.
>
> The catch with all this is that at the moment it is tailored for
> exactly what I needed to model and it is less then pre-alpha quality
> for public release. I also can't find the motivation to spend the time
> necessary to improve it for the sake of publishing, real life and my
> own modeling tasks are what finally win.
>
> I will include an OpenSCAD file and the top level python class which
> generated it for a sample of what can be done. I will not publish the
> code as I'm not satisfied with it and will surely radically change it
> still in the future - but if somebody is interested enough in it to
> help preparing a publishable version, I'm ready to do a few on-line
> sessions to explain what I have and discuss what and how to publish.
> Without help, it will take me a few more years with the speed I'm
> progressing now.
>
> The project is hosted on gitlab.com, at the moment private and it seems
> gitlab will not allow me to change that (bug I assume). Anybody wanting
> to check the code, ask me and I will give you access.
>
> Cheers,
> Csaba
>
> P.S. the scad file is a table-tennis ball machine I'm working on right
> now. All elements you see are fully configurable, almost no hard-coded
> number outside the CONFIG_DESCRIPTOR of each used Part/Assembly. The
> iter_components method in the python file will generate a list of 3D-
> printable components, processing is bound to a PyCharm key combination
> too. Any class name extending Part/Assembly in the python file can be
> highlighted and previewed using a key-press too (of course only in my
> local setup, I would need to package the key shortcuts in a PyCharm
> plugin).
>
> On Tue, 2021-12-14 at 10:14 -0600, David Schooley wrote:
> > Thank you everyone for the comments up to the point. Even the “no,
> > that’s not going to happen” type of feedback is useful.
> >
> > To put things in context: I was a contributor to gnuplot years ago.
> > (I did a really nice Mac version.) I’ve made a lot of 2D plots using
> > Perl-generated gnuplot scripts. After playing with flex and bison a
> > bit, I started thinking about a new plotting program using a more
> > modern interpreter. Python was still relatively new, I hadn’t used
> > Python at all at the time, but the syntax for this never-written
> > plotting software would have been very Python-like. I started using
> > Python a short time later, abandoned by software project, and now
> > things that would have been Perl+gnuplot are Python with matplotlib.
> > Life is good.
> >
> > When I started 3D printing, I started with FreeCAD (which has a
> > Python workbench) and then moved to OpenSCAD. I have a large number
> > of OpenSCAD scripts laying around.
> >
> > OpenSCAD meets my needs for almost everything I do. (It does fall
> > down when it comes to things such as fillets around complex shapes.)
> > There are times when I need real variables and there are times when
> > the design needs to change depending on the size or something else,
> > i.e., the hole pattern changes depending on the size of the object.
> > The next step would be data-driven designs, which I can visualize but
> > can’t really do at this point without using Python to create OpenSCAD
> > scripts.
> >
> > An example might be a 3D printed map using GIS data. You could
> > perhaps do this with the OpenSCAD language by extruding a bitmap
> > generated using Python. It would be cleaner, and you would have more
> > control, if you did the whole thing in Python.
> >
> > Thinking of OpenSCAD (the software) as a wrapper for OpenSCAD (the
> > language) is perfectly reasonable. It’s not the answer I wanted, but
> > it’s the answer I got.
> >
> > So that’s where I am at. I’ll take a look at the book that Harm
> > suggested. I think I can get the Kindle version for free.
> >
> > > On Dec 14, 2021, at 1:44 AM, edmund ronald <edmundronald@gmail.com>
> > > wrote:
> > >
> > > Everybody and their dog seems to have done Python covers of
> > > OpenSCAD.
> > > Which seems to indicate that there is a perceived need in the 3d
> > > Print userbase.
> > >
> > > My guess is sooner or later another project will mature enough to
> > > serve that population, at which point the question will go away.
> > >
> > > Edmund
> > >
> > >
> > >
> > > On Mon, Dec 13, 2021 at 11:34 AM <info@hjcreations.nl> wrote:
> > > > Hi David,
> > > >
> > > > Do you know this book :
> > > > Python for 3D Printing openSCAD by Craig, John Clark
> > > >
> > > > I got it and seems interesting, but had no time read it at all.
> > > > If you'reinterested I can give you more info.
> > > >
> > > > Regards,
> > > >
> > > > Harm Jeurink
> > > >
> > > > David Schooley schreef op 2021-12-12 10:43:
> > > > > I have a feeling this has come up before…
> > > > >
> > > > > I’m curious about any thoughts/previous discussions have
> > > >
> > > > happened
> > > > > regarding incorporating Python as an embedded scripting
> > > >
> > > > language to
> > > > > OpenSCAD. Some work has been done with Python and CSG, so this
> > > >
> > > > isn’t
> > > > > entirely impossible, but it could be a lot of work; I get that.
> > > > >
> > > > > The OpenSCAD language isn’t bad, but it’s no great shakes
> > > >
> > > > either. It’s
> > > > > interesting to see work happening to make structures a reality,
> > > >
> > > > but
> > > > > maybe it would be better to incorporate a language that has
> > > >
> > > > real
> > > > > variables and objects. There was a recent discussion around
> > > > > calculating parameters on the fly, which is easy with Python
> > > >
> > > > but is
> > > > > more difficult or impossible using the OpenSCAD language.
> > > > >
> > > > > I’m not at all interested in generating OpenSCAD code from
> > > >
> > > > Python that
> > > > > just adds another layer of “Why doesn’t this work?” I think
> > > >
> > > > being able
> > > > > to write some Python code that generates an object that
> > > >
> > > > OpenSCAD can
> > > > > display and turn into something I can 3D print or cut using a
> > > >
> > > > laser
> > > > > would be amazing.
> > > > >
> > > > > _______________________________________________
> > > > > OpenSCAD mailing list
> > > > > To unsubscribe send an email to
> > > >
> > > > discuss-leave@lists.openscad.org
> > > > _______________________________________________
> > > > OpenSCAD mailing list
> > > > To unsubscribe send an email to discuss-leave@lists.openscad.org
> > >
> > > _______________________________________________
> > > OpenSCAD mailing list
> > > To unsubscribe send an email to discuss-leave@lists.openscad.org
> >
> > _______________________________________________
> > OpenSCAD mailing list
> > To unsubscribe send an email to discuss-leave@lists.openscad.org
>