discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

openSCAD with Python

SP
Sanjeev Prabhakar
Sun, Jan 26, 2025 3:37 AM

Due to a recent major change in python and numpy, I had to change a lot of
code in my library openscad2.py:
https://github.com/sprabhakar2006/openSCAD/blob/main/openscad2.py

I have also written documentation on how to model the parts.
This has many examples of very complex parts and surfaces
https://github.com/sprabhakar2006/openSCAD/blob/main/example_of_various_functions.ipynb

pdf of the documentation can be downloaded from here:
https://github.com/sprabhakar2006/openSCAD/blob/main/explanation%20of%20approaches/examples%20of%20various%20functions.pdf

The above documentation file/s is very big >20mb and you can't see it on
github and need to download to view.

I hope this helps a few of you.

Regards
Sanjeev

Due to a recent major change in python and numpy, I had to change a lot of code in my library openscad2.py: https://github.com/sprabhakar2006/openSCAD/blob/main/openscad2.py I have also written documentation on how to model the parts. This has many examples of very complex parts and surfaces https://github.com/sprabhakar2006/openSCAD/blob/main/example_of_various_functions.ipynb pdf of the documentation can be downloaded from here: https://github.com/sprabhakar2006/openSCAD/blob/main/explanation%20of%20approaches/examples%20of%20various%20functions.pdf The above documentation file/s is very big >20mb and you can't see it on github and need to download to view. I hope this helps a few of you. Regards Sanjeev
SP
Sanjeev Prabhakar
Sun, Jan 26, 2025 5:57 AM

python libraries which needs to be installed are:
numpy
scipy
sympy

On Sun, 26 Jan 2025 at 09:07, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

Due to a recent major change in python and numpy, I had to change a lot of
code in my library openscad2.py:
https://github.com/sprabhakar2006/openSCAD/blob/main/openscad2.py

I have also written documentation on how to model the parts.
This has many examples of very complex parts and surfaces

https://github.com/sprabhakar2006/openSCAD/blob/main/example_of_various_functions.ipynb

pdf of the documentation can be downloaded from here:

https://github.com/sprabhakar2006/openSCAD/blob/main/explanation%20of%20approaches/examples%20of%20various%20functions.pdf

The above documentation file/s is very big >20mb and you can't see it on
github and need to download to view.

I hope this helps a few of you.

Regards
Sanjeev

python libraries which needs to be installed are: numpy scipy sympy On Sun, 26 Jan 2025 at 09:07, Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > Due to a recent major change in python and numpy, I had to change a lot of > code in my library openscad2.py: > https://github.com/sprabhakar2006/openSCAD/blob/main/openscad2.py > > I have also written documentation on how to model the parts. > This has many examples of very complex parts and surfaces > > https://github.com/sprabhakar2006/openSCAD/blob/main/example_of_various_functions.ipynb > > pdf of the documentation can be downloaded from here: > > https://github.com/sprabhakar2006/openSCAD/blob/main/explanation%20of%20approaches/examples%20of%20various%20functions.pdf > > The above documentation file/s is very big >20mb and you can't see it on > github and need to download to view. > > I hope this helps a few of you. > > Regards > Sanjeev >
SP
Sanjeev Prabhakar
Sun, Jan 26, 2025 1:38 PM

I have made a small video to explain the process of downloading and
installing the jupyter notebook and running the library

https://youtu.be/XqGUITqE-3k

On Sun, 26 Jan 2025 at 11:27, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

python libraries which needs to be installed are:
numpy
scipy
sympy

On Sun, 26 Jan 2025 at 09:07, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

Due to a recent major change in python and numpy, I had to change a lot
of code in my library openscad2.py:
https://github.com/sprabhakar2006/openSCAD/blob/main/openscad2.py

I have also written documentation on how to model the parts.
This has many examples of very complex parts and surfaces

https://github.com/sprabhakar2006/openSCAD/blob/main/example_of_various_functions.ipynb

pdf of the documentation can be downloaded from here:

https://github.com/sprabhakar2006/openSCAD/blob/main/explanation%20of%20approaches/examples%20of%20various%20functions.pdf

The above documentation file/s is very big >20mb and you can't see it on
github and need to download to view.

I hope this helps a few of you.

Regards
Sanjeev

I have made a small video to explain the process of downloading and installing the jupyter notebook and running the library https://youtu.be/XqGUITqE-3k On Sun, 26 Jan 2025 at 11:27, Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > python libraries which needs to be installed are: > numpy > scipy > sympy > > On Sun, 26 Jan 2025 at 09:07, Sanjeev Prabhakar <sprabhakar2006@gmail.com> > wrote: > >> Due to a recent major change in python and numpy, I had to change a lot >> of code in my library openscad2.py: >> https://github.com/sprabhakar2006/openSCAD/blob/main/openscad2.py >> >> I have also written documentation on how to model the parts. >> This has many examples of very complex parts and surfaces >> >> https://github.com/sprabhakar2006/openSCAD/blob/main/example_of_various_functions.ipynb >> >> pdf of the documentation can be downloaded from here: >> >> https://github.com/sprabhakar2006/openSCAD/blob/main/explanation%20of%20approaches/examples%20of%20various%20functions.pdf >> >> The above documentation file/s is very big >20mb and you can't see it on >> github and need to download to view. >> >> I hope this helps a few of you. >> >> Regards >> Sanjeev >> >
LM
Leonard Martin Struttmann
Wed, Jan 29, 2025 2:04 AM

Thanks for this, Sanjeev.  I am starting to learn how to use this since I
enjoy coding in Python very much.

It's going to take me a while to become proficient, since I don't have a
lot of free time at this point. Also, it takes me a long time to understand
the code because you use such compact, but non-descriptive, names for your
functions. For example, when I look at an example I have no idea what
functions pts1(), cr(), swp_c(), etc., do, just from their names. So, for
each of these functions I need to find them in the source code and try to
decipher their functionality.  It just takes a lot of time.

So, here I go on my journey to understand.  Again, thank you!

On Sun, Jan 26, 2025 at 7:38 AM Sanjeev Prabhakar via Discuss <
discuss@lists.openscad.org> wrote:

I have made a small video to explain the process of downloading and
installing the jupyter notebook and running the library

https://youtu.be/XqGUITqE-3k

On Sun, 26 Jan 2025 at 11:27, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

python libraries which needs to be installed are:
numpy
scipy
sympy

On Sun, 26 Jan 2025 at 09:07, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

Due to a recent major change in python and numpy, I had to change a lot
of code in my library openscad2.py:
https://github.com/sprabhakar2006/openSCAD/blob/main/openscad2.py

I have also written documentation on how to model the parts.
This has many examples of very complex parts and surfaces

https://github.com/sprabhakar2006/openSCAD/blob/main/example_of_various_functions.ipynb

pdf of the documentation can be downloaded from here:

https://github.com/sprabhakar2006/openSCAD/blob/main/explanation%20of%20approaches/examples%20of%20various%20functions.pdf

The above documentation file/s is very big >20mb and you can't see it on
github and need to download to view.

I hope this helps a few of you.

Regards
Sanjeev


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

Thanks for this, Sanjeev. I am starting to learn how to use this since I enjoy coding in Python very much. It's going to take me a while to become proficient, since I don't have a lot of free time at this point. Also, it takes me a long time to understand the code because you use such compact, but non-descriptive, names for your functions. For example, when I look at an example I have no idea what functions pts1(), cr(), swp_c(), etc., do, just from their names. So, for each of these functions I need to find them in the source code and try to decipher their functionality. It just takes a lot of time. So, here I go on my journey to understand. Again, thank you! On Sun, Jan 26, 2025 at 7:38 AM Sanjeev Prabhakar via Discuss < discuss@lists.openscad.org> wrote: > I have made a small video to explain the process of downloading and > installing the jupyter notebook and running the library > > https://youtu.be/XqGUITqE-3k > > On Sun, 26 Jan 2025 at 11:27, Sanjeev Prabhakar <sprabhakar2006@gmail.com> > wrote: > >> python libraries which needs to be installed are: >> numpy >> scipy >> sympy >> >> On Sun, 26 Jan 2025 at 09:07, Sanjeev Prabhakar <sprabhakar2006@gmail.com> >> wrote: >> >>> Due to a recent major change in python and numpy, I had to change a lot >>> of code in my library openscad2.py: >>> https://github.com/sprabhakar2006/openSCAD/blob/main/openscad2.py >>> >>> I have also written documentation on how to model the parts. >>> This has many examples of very complex parts and surfaces >>> >>> https://github.com/sprabhakar2006/openSCAD/blob/main/example_of_various_functions.ipynb >>> >>> pdf of the documentation can be downloaded from here: >>> >>> https://github.com/sprabhakar2006/openSCAD/blob/main/explanation%20of%20approaches/examples%20of%20various%20functions.pdf >>> >>> The above documentation file/s is very big >20mb and you can't see it on >>> github and need to download to view. >>> >>> I hope this helps a few of you. >>> >>> Regards >>> Sanjeev >>> >> _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
SP
Sanjeev Prabhakar
Wed, Jan 29, 2025 3:01 AM

Hi Leonard,

Thanks

I am not a trained software developer and that is the reason for this non
professional code writing.

In jupyter notebook, if you type : pts1??

The description and the code for this function will be displayed, you need
not go to the file openscad2.py for these things.

But you can give your own names to the functions, i have written in
openscad2.py file.

That might help a lot of other people, if they like your naming ideas.

Regards

On Wed, 29 Jan, 2025, 7:34 am Leonard Martin Struttmann via Discuss, <
discuss@lists.openscad.org> wrote:

Thanks for this, Sanjeev.  I am starting to learn how to use this since I
enjoy coding in Python very much.

It's going to take me a while to become proficient, since I don't have a
lot of free time at this point. Also, it takes me a long time to understand
the code because you use such compact, but non-descriptive, names for your
functions. For example, when I look at an example I have no idea what
functions pts1(), cr(), swp_c(), etc., do, just from their names. So, for
each of these functions I need to find them in the source code and try to
decipher their functionality.  It just takes a lot of time.

So, here I go on my journey to understand.  Again, thank you!

On Sun, Jan 26, 2025 at 7:38 AM Sanjeev Prabhakar via Discuss <
discuss@lists.openscad.org> wrote:

I have made a small video to explain the process of downloading and
installing the jupyter notebook and running the library

https://youtu.be/XqGUITqE-3k

On Sun, 26 Jan 2025 at 11:27, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

python libraries which needs to be installed are:
numpy
scipy
sympy

On Sun, 26 Jan 2025 at 09:07, Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

Due to a recent major change in python and numpy, I had to change a lot
of code in my library openscad2.py:
https://github.com/sprabhakar2006/openSCAD/blob/main/openscad2.py

I have also written documentation on how to model the parts.
This has many examples of very complex parts and surfaces

https://github.com/sprabhakar2006/openSCAD/blob/main/example_of_various_functions.ipynb

pdf of the documentation can be downloaded from here:

https://github.com/sprabhakar2006/openSCAD/blob/main/explanation%20of%20approaches/examples%20of%20various%20functions.pdf

The above documentation file/s is very big >20mb and you can't see it
on github and need to download to view.

I hope this helps a few of you.

Regards
Sanjeev


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

Hi Leonard, Thanks I am not a trained software developer and that is the reason for this non professional code writing. In jupyter notebook, if you type : pts1?? The description and the code for this function will be displayed, you need not go to the file openscad2.py for these things. But you can give your own names to the functions, i have written in openscad2.py file. That might help a lot of other people, if they like your naming ideas. Regards On Wed, 29 Jan, 2025, 7:34 am Leonard Martin Struttmann via Discuss, < discuss@lists.openscad.org> wrote: > Thanks for this, Sanjeev. I am starting to learn how to use this since I > enjoy coding in Python very much. > > It's going to take me a while to become proficient, since I don't have a > lot of free time at this point. Also, it takes me a long time to understand > the code because you use such compact, but non-descriptive, names for your > functions. For example, when I look at an example I have no idea what > functions pts1(), cr(), swp_c(), etc., do, just from their names. So, for > each of these functions I need to find them in the source code and try to > decipher their functionality. It just takes a lot of time. > > So, here I go on my journey to understand. Again, thank you! > > On Sun, Jan 26, 2025 at 7:38 AM Sanjeev Prabhakar via Discuss < > discuss@lists.openscad.org> wrote: > >> I have made a small video to explain the process of downloading and >> installing the jupyter notebook and running the library >> >> https://youtu.be/XqGUITqE-3k >> >> On Sun, 26 Jan 2025 at 11:27, Sanjeev Prabhakar <sprabhakar2006@gmail.com> >> wrote: >> >>> python libraries which needs to be installed are: >>> numpy >>> scipy >>> sympy >>> >>> On Sun, 26 Jan 2025 at 09:07, Sanjeev Prabhakar < >>> sprabhakar2006@gmail.com> wrote: >>> >>>> Due to a recent major change in python and numpy, I had to change a lot >>>> of code in my library openscad2.py: >>>> https://github.com/sprabhakar2006/openSCAD/blob/main/openscad2.py >>>> >>>> I have also written documentation on how to model the parts. >>>> This has many examples of very complex parts and surfaces >>>> >>>> https://github.com/sprabhakar2006/openSCAD/blob/main/example_of_various_functions.ipynb >>>> >>>> pdf of the documentation can be downloaded from here: >>>> >>>> https://github.com/sprabhakar2006/openSCAD/blob/main/explanation%20of%20approaches/examples%20of%20various%20functions.pdf >>>> >>>> The above documentation file/s is very big >20mb and you can't see it >>>> on github and need to download to view. >>>> >>>> I hope this helps a few of you. >>>> >>>> Regards >>>> Sanjeev >>>> >>> _______________________________________________ >> 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 >
SP
Sanjeev Prabhakar
Sun, Feb 2, 2025 8:43 AM

I have posted a video to explain the function "prism" for creating solids

https://youtu.be/YIlzedTLXxQ

On Wed, 29 Jan 2025 at 08:31, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

Hi Leonard,

Thanks

I am not a trained software developer and that is the reason for this non
professional code writing.

In jupyter notebook, if you type : pts1??

The description and the code for this function will be displayed, you need
not go to the file openscad2.py for these things.

But you can give your own names to the functions, i have written in
openscad2.py file.

That might help a lot of other people, if they like your naming ideas.

Regards

On Wed, 29 Jan, 2025, 7:34 am Leonard Martin Struttmann via Discuss, <
discuss@lists.openscad.org> wrote:

Thanks for this, Sanjeev.  I am starting to learn how to use this since I
enjoy coding in Python very much.

It's going to take me a while to become proficient, since I don't have a
lot of free time at this point. Also, it takes me a long time to understand
the code because you use such compact, but non-descriptive, names for your
functions. For example, when I look at an example I have no idea what
functions pts1(), cr(), swp_c(), etc., do, just from their names. So, for
each of these functions I need to find them in the source code and try to
decipher their functionality.  It just takes a lot of time.

So, here I go on my journey to understand.  Again, thank you!

On Sun, Jan 26, 2025 at 7:38 AM Sanjeev Prabhakar via Discuss <
discuss@lists.openscad.org> wrote:

I have made a small video to explain the process of downloading and
installing the jupyter notebook and running the library

https://youtu.be/XqGUITqE-3k

On Sun, 26 Jan 2025 at 11:27, Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

python libraries which needs to be installed are:
numpy
scipy
sympy

On Sun, 26 Jan 2025 at 09:07, Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

Due to a recent major change in python and numpy, I had to change a
lot of code in my library openscad2.py:
https://github.com/sprabhakar2006/openSCAD/blob/main/openscad2.py

I have also written documentation on how to model the parts.
This has many examples of very complex parts and surfaces

https://github.com/sprabhakar2006/openSCAD/blob/main/example_of_various_functions.ipynb

pdf of the documentation can be downloaded from here:

https://github.com/sprabhakar2006/openSCAD/blob/main/explanation%20of%20approaches/examples%20of%20various%20functions.pdf

The above documentation file/s is very big >20mb and you can't see it
on github and need to download to view.

I hope this helps a few of you.

Regards
Sanjeev


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

I have posted a video to explain the function "prism" for creating solids https://youtu.be/YIlzedTLXxQ On Wed, 29 Jan 2025 at 08:31, Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > Hi Leonard, > > Thanks > > I am not a trained software developer and that is the reason for this non > professional code writing. > > In jupyter notebook, if you type : pts1?? > > The description and the code for this function will be displayed, you need > not go to the file openscad2.py for these things. > > But you can give your own names to the functions, i have written in > openscad2.py file. > > That might help a lot of other people, if they like your naming ideas. > > Regards > > On Wed, 29 Jan, 2025, 7:34 am Leonard Martin Struttmann via Discuss, < > discuss@lists.openscad.org> wrote: > >> Thanks for this, Sanjeev. I am starting to learn how to use this since I >> enjoy coding in Python very much. >> >> It's going to take me a while to become proficient, since I don't have a >> lot of free time at this point. Also, it takes me a long time to understand >> the code because you use such compact, but non-descriptive, names for your >> functions. For example, when I look at an example I have no idea what >> functions pts1(), cr(), swp_c(), etc., do, just from their names. So, for >> each of these functions I need to find them in the source code and try to >> decipher their functionality. It just takes a lot of time. >> >> So, here I go on my journey to understand. Again, thank you! >> >> On Sun, Jan 26, 2025 at 7:38 AM Sanjeev Prabhakar via Discuss < >> discuss@lists.openscad.org> wrote: >> >>> I have made a small video to explain the process of downloading and >>> installing the jupyter notebook and running the library >>> >>> https://youtu.be/XqGUITqE-3k >>> >>> On Sun, 26 Jan 2025 at 11:27, Sanjeev Prabhakar < >>> sprabhakar2006@gmail.com> wrote: >>> >>>> python libraries which needs to be installed are: >>>> numpy >>>> scipy >>>> sympy >>>> >>>> On Sun, 26 Jan 2025 at 09:07, Sanjeev Prabhakar < >>>> sprabhakar2006@gmail.com> wrote: >>>> >>>>> Due to a recent major change in python and numpy, I had to change a >>>>> lot of code in my library openscad2.py: >>>>> https://github.com/sprabhakar2006/openSCAD/blob/main/openscad2.py >>>>> >>>>> I have also written documentation on how to model the parts. >>>>> This has many examples of very complex parts and surfaces >>>>> >>>>> https://github.com/sprabhakar2006/openSCAD/blob/main/example_of_various_functions.ipynb >>>>> >>>>> pdf of the documentation can be downloaded from here: >>>>> >>>>> https://github.com/sprabhakar2006/openSCAD/blob/main/explanation%20of%20approaches/examples%20of%20various%20functions.pdf >>>>> >>>>> The above documentation file/s is very big >20mb and you can't see it >>>>> on github and need to download to view. >>>>> >>>>> I hope this helps a few of you. >>>>> >>>>> Regards >>>>> Sanjeev >>>>> >>>> _______________________________________________ >>> 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 >> >
SP
Sanjeev Prabhakar
Mon, Feb 3, 2025 1:42 AM

Here is another video to explain function path extrude.

I use this function quite often and this maybe useful to people who decide
to use this python library

https://youtu.be/aAJdQoSt-XY?si=lSxrZ8obwdWPmXKu

On Sun, 26 Jan, 2025, 7:08 pm Sanjeev Prabhakar, sprabhakar2006@gmail.com
wrote:

I have made a small video to explain the process of downloading and
installing the jupyter notebook and running the library

https://youtu.be/XqGUITqE-3k

On Sun, 26 Jan 2025 at 11:27, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

python libraries which needs to be installed are:
numpy
scipy
sympy

On Sun, 26 Jan 2025 at 09:07, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

Due to a recent major change in python and numpy, I had to change a lot
of code in my library openscad2.py:
https://github.com/sprabhakar2006/openSCAD/blob/main/openscad2.py

I have also written documentation on how to model the parts.
This has many examples of very complex parts and surfaces

https://github.com/sprabhakar2006/openSCAD/blob/main/example_of_various_functions.ipynb

pdf of the documentation can be downloaded from here:

https://github.com/sprabhakar2006/openSCAD/blob/main/explanation%20of%20approaches/examples%20of%20various%20functions.pdf

The above documentation file/s is very big >20mb and you can't see it on
github and need to download to view.

I hope this helps a few of you.

Regards
Sanjeev

Here is another video to explain function path extrude. I use this function quite often and this maybe useful to people who decide to use this python library https://youtu.be/aAJdQoSt-XY?si=lSxrZ8obwdWPmXKu On Sun, 26 Jan, 2025, 7:08 pm Sanjeev Prabhakar, <sprabhakar2006@gmail.com> wrote: > I have made a small video to explain the process of downloading and > installing the jupyter notebook and running the library > > https://youtu.be/XqGUITqE-3k > > On Sun, 26 Jan 2025 at 11:27, Sanjeev Prabhakar <sprabhakar2006@gmail.com> > wrote: > >> python libraries which needs to be installed are: >> numpy >> scipy >> sympy >> >> On Sun, 26 Jan 2025 at 09:07, Sanjeev Prabhakar <sprabhakar2006@gmail.com> >> wrote: >> >>> Due to a recent major change in python and numpy, I had to change a lot >>> of code in my library openscad2.py: >>> https://github.com/sprabhakar2006/openSCAD/blob/main/openscad2.py >>> >>> I have also written documentation on how to model the parts. >>> This has many examples of very complex parts and surfaces >>> >>> https://github.com/sprabhakar2006/openSCAD/blob/main/example_of_various_functions.ipynb >>> >>> pdf of the documentation can be downloaded from here: >>> >>> https://github.com/sprabhakar2006/openSCAD/blob/main/explanation%20of%20approaches/examples%20of%20various%20functions.pdf >>> >>> The above documentation file/s is very big >20mb and you can't see it on >>> github and need to download to view. >>> >>> I hope this helps a few of you. >>> >>> Regards >>> Sanjeev >>> >>