discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

openscad with jupyter notebook

MM
Michael Marx
Sat, Aug 27, 2022 1:30 AM

Later version don't work on Windows7. Oh well.


From: Sanjeev Prabhakar [mailto:sprabhakar2006@gmail.com]
Sent: Sat, 27 Aug 2022 11:11
To: OpenSCAD general discussion
Subject: [OpenSCAD] Re: openscad with jupyter notebook

I think you maybe using an older version of openscad.

Please try the latest development snapshot

On Sat, 27 Aug, 2022, 6:17 am Michael Marx, michael@marx.id.au wrote:

There are errors in dependencies.scad.

Parsing design (AST generation)...

ERROR: Parser error: syntax error in file dependencies.scad, line 1098

Execution aborted

I fixed the hanging comma, then got the same error at 1994, fixed, then 2706, fixed, then 2753 (didn't look at this one, trend was not looking good...)


From: Sanjeev Prabhakar [mailto:sprabhakar2006@gmail.com]
Sent: Sat, 27 Aug 2022 01:05
To: jon
Cc: OpenSCAD general discussion
Subject: [OpenSCAD] Re: openscad with jupyter notebook

a simpler example would be hub_with_post.scad (attached here)

please see the complex radiuses and it would be difficult with pure openscad

On Fri, 26 Aug 2022 at 20:24, Sanjeev Prabhakar sprabhakar2006@gmail.com wrote:

For rounding, intersection line of 2 prisms is a complex calculation, which was quite fast as per my understanding and maybe if I have to do the same in openscad it would be difficult to write the code itself.

Although I have written the same in openscad also, but it's not perfect.

Initially I was just copying the functions I have written in  openscad , later on I realised the same code can be written much efficiently in numpy.

That's a learning curve.

For example, if you download the wheel_final.scad file, you can see the roundings of so many intersection lines.

For this to work file dependencies.scad also need to be downloaded and kept in the same folder

On Fri, 26 Aug, 2022, 8:02 pm jon, jon@jonbondy.com wrote:

Can you give an example of calculations that are easy in python than in OpenSCAD?

Jon

On 8/26/2022 10:27 AM, Sanjeev Prabhakar wrote:

I didn't know either few months back.

It was not very difficult for a person like me who doesn't have much background in softwares.

At the same time it's just one of the approach where points calculation is done with another software and then these points are passed on to openscad.

I have found that calculations are much easier in python as there are many supporting libraries.

Thanks

On Fri, 26 Aug, 2022, 7:39 pm jon, jon@jonbondy.com wrote:

I know nothing about numpy nor jupyter notebook.  Should I just ignore
this conversation?

On 8/26/2022 12:27 AM, Sanjeev Prabhakar wrote:

Dear All,

I have experimented with jupyter notebook to calculate points in space
and then passing the same to openscad for creating 3d shapes.

Found it to be quite interesting.

Wrote almost all the functions of openscad in jupyter notebook.

you can refer to the page below for few examples:
https://github.com/sprabhakar2006/openSCAD

you need to have some working knowledge of numpy and jupyter notebook
for this to work.

Regards
Sanjeev


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

Later version don't work on Windows7. Oh well. _____ From: Sanjeev Prabhakar [mailto:sprabhakar2006@gmail.com] Sent: Sat, 27 Aug 2022 11:11 To: OpenSCAD general discussion Subject: [OpenSCAD] Re: openscad with jupyter notebook I think you maybe using an older version of openscad. Please try the latest development snapshot On Sat, 27 Aug, 2022, 6:17 am Michael Marx, <michael@marx.id.au> wrote: There are errors in dependencies.scad. Parsing design (AST generation)... ERROR: Parser error: syntax error in file dependencies.scad, line 1098 Execution aborted I fixed the hanging comma, then got the same error at 1994, fixed, then 2706, fixed, then 2753 (didn't look at this one, trend was not looking good...) _____ From: Sanjeev Prabhakar [mailto:sprabhakar2006@gmail.com] Sent: Sat, 27 Aug 2022 01:05 To: jon Cc: OpenSCAD general discussion Subject: [OpenSCAD] Re: openscad with jupyter notebook a simpler example would be hub_with_post.scad (attached here) please see the complex radiuses and it would be difficult with pure openscad On Fri, 26 Aug 2022 at 20:24, Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: For rounding, intersection line of 2 prisms is a complex calculation, which was quite fast as per my understanding and maybe if I have to do the same in openscad it would be difficult to write the code itself. Although I have written the same in openscad also, but it's not perfect. Initially I was just copying the functions I have written in openscad , later on I realised the same code can be written much efficiently in numpy. That's a learning curve. For example, if you download the wheel_final.scad file, you can see the roundings of so many intersection lines. For this to work file dependencies.scad also need to be downloaded and kept in the same folder On Fri, 26 Aug, 2022, 8:02 pm jon, <jon@jonbondy.com> wrote: Can you give an example of calculations that are easy in python than in OpenSCAD? Jon On 8/26/2022 10:27 AM, Sanjeev Prabhakar wrote: I didn't know either few months back. It was not very difficult for a person like me who doesn't have much background in softwares. At the same time it's just one of the approach where points calculation is done with another software and then these points are passed on to openscad. I have found that calculations are much easier in python as there are many supporting libraries. Thanks On Fri, 26 Aug, 2022, 7:39 pm jon, <jon@jonbondy.com> wrote: I know nothing about numpy nor jupyter notebook. Should I just ignore this conversation? On 8/26/2022 12:27 AM, Sanjeev Prabhakar wrote: > Dear All, > > I have experimented with jupyter notebook to calculate points in space > and then passing the same to openscad for creating 3d shapes. > > Found it to be quite interesting. > > Wrote almost all the functions of openscad in jupyter notebook. > > you can refer to the page below for few examples: > https://github.com/sprabhakar2006/openSCAD > > you need to have some working knowledge of numpy and jupyter notebook > for this to work. > > Regards > Sanjeev > > > _______________________________________________ > 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. <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> www.avg.com _______________________________________________ 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
SP
Sanjeev Prabhakar
Sat, Aug 27, 2022 1:35 AM

OK
In that case you have to correct all the syntax errors manually

On Sat, 27 Aug, 2022, 7:01 am Michael Marx, michael@marx.id.au wrote:

Later version don't work on Windows7. Oh well.


From: Sanjeev Prabhakar [mailto:sprabhakar2006@gmail.com]
Sent: Sat, 27 Aug 2022 11:11
To: OpenSCAD general discussion
Subject: [OpenSCAD] Re: openscad with jupyter notebook

I think you maybe using an older version of openscad.

Please try the latest development snapshot

On Sat, 27 Aug, 2022, 6:17 am Michael Marx, michael@marx.id.au wrote:

There are errors in dependencies.scad.

Parsing design (AST generation)...

ERROR: Parser error: syntax error in file dependencies.scad, line 1098

Execution aborted

I fixed the hanging comma, then got the same error at 1994, fixed, then
2706, fixed, then 2753 (didn't look at this one, trend was not looking
good...)


From: Sanjeev Prabhakar [mailto:sprabhakar2006@gmail.com]
Sent: Sat, 27 Aug 2022 01:05
To: jon
Cc: OpenSCAD general discussion
Subject: [OpenSCAD] Re: openscad with jupyter notebook

a simpler example would be hub_with_post.scad (attached here)

please see the complex radiuses and it would be difficult with pure
openscad

On Fri, 26 Aug 2022 at 20:24, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

For rounding, intersection line of 2 prisms is a complex calculation,
which was quite fast as per my understanding and maybe if I have to do the
same in openscad it would be difficult to write the code itself.

Although I have written the same in openscad also, but it's not perfect.

Initially I was just copying the functions I have written in  openscad ,
later on I realised the same code can be written much efficiently in numpy.

That's a learning curve.

For example, if you download the wheel_final.scad file, you can see the
roundings of so many intersection lines.

For this to work file dependencies.scad also need to be downloaded and
kept in the same folder

On Fri, 26 Aug, 2022, 8:02 pm jon, jon@jonbondy.com wrote:

Can you give an example of calculations that are easy in python than in
OpenSCAD?

Jon

On 8/26/2022 10:27 AM, Sanjeev Prabhakar wrote:

I didn't know either few months back.

It was not very difficult for a person like me who doesn't have much
background in softwares.

At the same time it's just one of the approach where points calculation is
done with another software and then these points are passed on to openscad.

I have found that calculations are much easier in python as there are many
supporting libraries.

Thanks

On Fri, 26 Aug, 2022, 7:39 pm jon, jon@jonbondy.com wrote:

I know nothing about numpy nor jupyter notebook.  Should I just ignore
this conversation?

On 8/26/2022 12:27 AM, Sanjeev Prabhakar wrote:

Dear All,

I have experimented with jupyter notebook to calculate points in space
and then passing the same to openscad for creating 3d shapes.

Found it to be quite interesting.

Wrote almost all the functions of openscad in jupyter notebook.

you can refer to the page below for few examples:
https://github.com/sprabhakar2006/openSCAD

you need to have some working knowledge of numpy and jupyter notebook
for this to work.

Regards
Sanjeev


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

OK In that case you have to correct all the syntax errors manually On Sat, 27 Aug, 2022, 7:01 am Michael Marx, <michael@marx.id.au> wrote: > Later version don't work on Windows7. Oh well. > > > ------------------------------ > > *From:* Sanjeev Prabhakar [mailto:sprabhakar2006@gmail.com] > *Sent:* Sat, 27 Aug 2022 11:11 > *To:* OpenSCAD general discussion > *Subject:* [OpenSCAD] Re: openscad with jupyter notebook > > > > I think you maybe using an older version of openscad. > > Please try the latest development snapshot > > > > On Sat, 27 Aug, 2022, 6:17 am Michael Marx, <michael@marx.id.au> wrote: > > There are errors in dependencies.scad. > > Parsing design (AST generation)... > > ERROR: Parser error: syntax error in file dependencies.scad, line 1098 > > Execution aborted > > > > I fixed the hanging comma, then got the same error at 1994, fixed, then > 2706, fixed, then 2753 (didn't look at this one, trend was not looking > good...) > > > ------------------------------ > > *From:* Sanjeev Prabhakar [mailto:sprabhakar2006@gmail.com] > *Sent:* Sat, 27 Aug 2022 01:05 > *To:* jon > *Cc:* OpenSCAD general discussion > *Subject:* [OpenSCAD] Re: openscad with jupyter notebook > > > > a simpler example would be hub_with_post.scad (attached here) > > please see the complex radiuses and it would be difficult with pure > openscad > > > > > > > > On Fri, 26 Aug 2022 at 20:24, Sanjeev Prabhakar <sprabhakar2006@gmail.com> > wrote: > > For rounding, intersection line of 2 prisms is a complex calculation, > which was quite fast as per my understanding and maybe if I have to do the > same in openscad it would be difficult to write the code itself. > > > > Although I have written the same in openscad also, but it's not perfect. > > > > Initially I was just copying the functions I have written in openscad , > later on I realised the same code can be written much efficiently in numpy. > > > > That's a learning curve. > > > > For example, if you download the wheel_final.scad file, you can see the > roundings of so many intersection lines. > > > > For this to work file dependencies.scad also need to be downloaded and > kept in the same folder > > > > > > On Fri, 26 Aug, 2022, 8:02 pm jon, <jon@jonbondy.com> wrote: > > Can you give an example of calculations that are easy in python than in > OpenSCAD? > > Jon > > > > On 8/26/2022 10:27 AM, Sanjeev Prabhakar wrote: > > I didn't know either few months back. > > It was not very difficult for a person like me who doesn't have much > background in softwares. > > > > At the same time it's just one of the approach where points calculation is > done with another software and then these points are passed on to openscad. > > > > I have found that calculations are much easier in python as there are many > supporting libraries. > > > > Thanks > > > > > > On Fri, 26 Aug, 2022, 7:39 pm jon, <jon@jonbondy.com> wrote: > > I know nothing about numpy nor jupyter notebook. Should I just ignore > this conversation? > > > On 8/26/2022 12:27 AM, Sanjeev Prabhakar wrote: > > Dear All, > > > > I have experimented with jupyter notebook to calculate points in space > > and then passing the same to openscad for creating 3d shapes. > > > > Found it to be quite interesting. > > > > Wrote almost all the functions of openscad in jupyter notebook. > > > > you can refer to the page below for few examples: > > https://github.com/sprabhakar2006/openSCAD > > > > you need to have some working knowledge of numpy and jupyter notebook > > for this to work. > > > > Regards > > Sanjeev > > > > > > _______________________________________________ > > 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_-4033492148833699996_m_7497731630892727491_DAB4FAD8-2DD7-40B> > > _______________________________________________ > 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 >
MM
Michael Marx
Sat, Aug 27, 2022 1:49 AM

For anyone else, a dependencies.scad without hanging commas is attached.


From: Sanjeev Prabhakar [mailto:sprabhakar2006@gmail.com]
Sent: Sat, 27 Aug 2022 11:35
To: OpenSCAD general discussion
Subject: [OpenSCAD] Re: openscad with jupyter notebook

OK

In that case you have to correct all the syntax errors manually

On Sat, 27 Aug, 2022, 7:01 am Michael Marx, michael@marx.id.au wrote:

Later version don't work on Windows7. Oh well.


From: Sanjeev Prabhakar [mailto:sprabhakar2006@gmail.com]
Sent: Sat, 27 Aug 2022 11:11
To: OpenSCAD general discussion
Subject: [OpenSCAD] Re: openscad with jupyter notebook

I think you maybe using an older version of openscad.

Please try the latest development snapshot

On Sat, 27 Aug, 2022, 6:17 am Michael Marx, michael@marx.id.au wrote:

There are errors in dependencies.scad.

Parsing design (AST generation)...

ERROR: Parser error: syntax error in file dependencies.scad, line 1098

Execution aborted

I fixed the hanging comma, then got the same error at 1994, fixed, then 2706, fixed, then 2753 (didn't look at this one, trend was not looking good...)


From: Sanjeev Prabhakar [mailto:sprabhakar2006@gmail.com]
Sent: Sat, 27 Aug 2022 01:05
To: jon
Cc: OpenSCAD general discussion
Subject: [OpenSCAD] Re: openscad with jupyter notebook

a simpler example would be hub_with_post.scad (attached here)

please see the complex radiuses and it would be difficult with pure openscad

On Fri, 26 Aug 2022 at 20:24, Sanjeev Prabhakar sprabhakar2006@gmail.com wrote:

For rounding, intersection line of 2 prisms is a complex calculation, which was quite fast as per my understanding and maybe if I have to do the same in openscad it would be difficult to write the code itself.

Although I have written the same in openscad also, but it's not perfect.

Initially I was just copying the functions I have written in  openscad , later on I realised the same code can be written much efficiently in numpy.

That's a learning curve.

For example, if you download the wheel_final.scad file, you can see the roundings of so many intersection lines.

For this to work file dependencies.scad also need to be downloaded and kept in the same folder

On Fri, 26 Aug, 2022, 8:02 pm jon, jon@jonbondy.com wrote:

Can you give an example of calculations that are easy in python than in OpenSCAD?

Jon

On 8/26/2022 10:27 AM, Sanjeev Prabhakar wrote:

I didn't know either few months back.

It was not very difficult for a person like me who doesn't have much background in softwares.

At the same time it's just one of the approach where points calculation is done with another software and then these points are passed on to openscad.

I have found that calculations are much easier in python as there are many supporting libraries.

Thanks

On Fri, 26 Aug, 2022, 7:39 pm jon, jon@jonbondy.com wrote:

I know nothing about numpy nor jupyter notebook.  Should I just ignore
this conversation?

On 8/26/2022 12:27 AM, Sanjeev Prabhakar wrote:

Dear All,

I have experimented with jupyter notebook to calculate points in space
and then passing the same to openscad for creating 3d shapes.

Found it to be quite interesting.

Wrote almost all the functions of openscad in jupyter notebook.

you can refer to the page below for few examples:
https://github.com/sprabhakar2006/openSCAD

you need to have some working knowledge of numpy and jupyter notebook
for this to work.

Regards
Sanjeev


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

For anyone else, a dependencies.scad without hanging commas is attached. _____ From: Sanjeev Prabhakar [mailto:sprabhakar2006@gmail.com] Sent: Sat, 27 Aug 2022 11:35 To: OpenSCAD general discussion Subject: [OpenSCAD] Re: openscad with jupyter notebook OK In that case you have to correct all the syntax errors manually On Sat, 27 Aug, 2022, 7:01 am Michael Marx, <michael@marx.id.au> wrote: Later version don't work on Windows7. Oh well. _____ From: Sanjeev Prabhakar [mailto:sprabhakar2006@gmail.com] Sent: Sat, 27 Aug 2022 11:11 To: OpenSCAD general discussion Subject: [OpenSCAD] Re: openscad with jupyter notebook I think you maybe using an older version of openscad. Please try the latest development snapshot On Sat, 27 Aug, 2022, 6:17 am Michael Marx, <michael@marx.id.au> wrote: There are errors in dependencies.scad. Parsing design (AST generation)... ERROR: Parser error: syntax error in file dependencies.scad, line 1098 Execution aborted I fixed the hanging comma, then got the same error at 1994, fixed, then 2706, fixed, then 2753 (didn't look at this one, trend was not looking good...) _____ From: Sanjeev Prabhakar [mailto:sprabhakar2006@gmail.com] Sent: Sat, 27 Aug 2022 01:05 To: jon Cc: OpenSCAD general discussion Subject: [OpenSCAD] Re: openscad with jupyter notebook a simpler example would be hub_with_post.scad (attached here) please see the complex radiuses and it would be difficult with pure openscad On Fri, 26 Aug 2022 at 20:24, Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: For rounding, intersection line of 2 prisms is a complex calculation, which was quite fast as per my understanding and maybe if I have to do the same in openscad it would be difficult to write the code itself. Although I have written the same in openscad also, but it's not perfect. Initially I was just copying the functions I have written in openscad , later on I realised the same code can be written much efficiently in numpy. That's a learning curve. For example, if you download the wheel_final.scad file, you can see the roundings of so many intersection lines. For this to work file dependencies.scad also need to be downloaded and kept in the same folder On Fri, 26 Aug, 2022, 8:02 pm jon, <jon@jonbondy.com> wrote: Can you give an example of calculations that are easy in python than in OpenSCAD? Jon On 8/26/2022 10:27 AM, Sanjeev Prabhakar wrote: I didn't know either few months back. It was not very difficult for a person like me who doesn't have much background in softwares. At the same time it's just one of the approach where points calculation is done with another software and then these points are passed on to openscad. I have found that calculations are much easier in python as there are many supporting libraries. Thanks On Fri, 26 Aug, 2022, 7:39 pm jon, <jon@jonbondy.com> wrote: I know nothing about numpy nor jupyter notebook. Should I just ignore this conversation? On 8/26/2022 12:27 AM, Sanjeev Prabhakar wrote: > Dear All, > > I have experimented with jupyter notebook to calculate points in space > and then passing the same to openscad for creating 3d shapes. > > Found it to be quite interesting. > > Wrote almost all the functions of openscad in jupyter notebook. > > you can refer to the page below for few examples: > https://github.com/sprabhakar2006/openSCAD > > you need to have some working knowledge of numpy and jupyter notebook > for this to work. > > Regards > Sanjeev > > > _______________________________________________ > 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. <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> www.avg.com _______________________________________________ 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 -- This email has been checked for viruses by AVG. https://www.avg.com
MM
Michael Marx
Sat, Aug 27, 2022 1:51 AM

and what you get


From: Sanjeev Prabhakar [mailto:sprabhakar2006@gmail.com]
Sent: Sat, 27 Aug 2022 11:35
To: OpenSCAD general discussion
Subject: [OpenSCAD] Re: openscad with jupyter notebook

OK

In that case you have to correct all the syntax errors manually

On Sat, 27 Aug, 2022, 7:01 am Michael Marx, michael@marx.id.au wrote:

Later version don't work on Windows7. Oh well.


From: Sanjeev Prabhakar [mailto:sprabhakar2006@gmail.com]
Sent: Sat, 27 Aug 2022 11:11
To: OpenSCAD general discussion
Subject: [OpenSCAD] Re: openscad with jupyter notebook

I think you maybe using an older version of openscad.

Please try the latest development snapshot

On Sat, 27 Aug, 2022, 6:17 am Michael Marx, michael@marx.id.au wrote:

There are errors in dependencies.scad.

Parsing design (AST generation)...

ERROR: Parser error: syntax error in file dependencies.scad, line 1098

Execution aborted

I fixed the hanging comma, then got the same error at 1994, fixed, then 2706, fixed, then 2753 (didn't look at this one, trend was not looking good...)


From: Sanjeev Prabhakar [mailto:sprabhakar2006@gmail.com]
Sent: Sat, 27 Aug 2022 01:05
To: jon
Cc: OpenSCAD general discussion
Subject: [OpenSCAD] Re: openscad with jupyter notebook

a simpler example would be hub_with_post.scad (attached here)

please see the complex radiuses and it would be difficult with pure openscad

On Fri, 26 Aug 2022 at 20:24, Sanjeev Prabhakar sprabhakar2006@gmail.com wrote:

For rounding, intersection line of 2 prisms is a complex calculation, which was quite fast as per my understanding and maybe if I have to do the same in openscad it would be difficult to write the code itself.

Although I have written the same in openscad also, but it's not perfect.

Initially I was just copying the functions I have written in  openscad , later on I realised the same code can be written much efficiently in numpy.

That's a learning curve.

For example, if you download the wheel_final.scad file, you can see the roundings of so many intersection lines.

For this to work file dependencies.scad also need to be downloaded and kept in the same folder

On Fri, 26 Aug, 2022, 8:02 pm jon, jon@jonbondy.com wrote:

Can you give an example of calculations that are easy in python than in OpenSCAD?

Jon

On 8/26/2022 10:27 AM, Sanjeev Prabhakar wrote:

I didn't know either few months back.

It was not very difficult for a person like me who doesn't have much background in softwares.

At the same time it's just one of the approach where points calculation is done with another software and then these points are passed on to openscad.

I have found that calculations are much easier in python as there are many supporting libraries.

Thanks

On Fri, 26 Aug, 2022, 7:39 pm jon, jon@jonbondy.com wrote:

I know nothing about numpy nor jupyter notebook.  Should I just ignore
this conversation?

On 8/26/2022 12:27 AM, Sanjeev Prabhakar wrote:

Dear All,

I have experimented with jupyter notebook to calculate points in space
and then passing the same to openscad for creating 3d shapes.

Found it to be quite interesting.

Wrote almost all the functions of openscad in jupyter notebook.

you can refer to the page below for few examples:
https://github.com/sprabhakar2006/openSCAD

you need to have some working knowledge of numpy and jupyter notebook
for this to work.

Regards
Sanjeev


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

and what you get _____ From: Sanjeev Prabhakar [mailto:sprabhakar2006@gmail.com] Sent: Sat, 27 Aug 2022 11:35 To: OpenSCAD general discussion Subject: [OpenSCAD] Re: openscad with jupyter notebook OK In that case you have to correct all the syntax errors manually On Sat, 27 Aug, 2022, 7:01 am Michael Marx, <michael@marx.id.au> wrote: Later version don't work on Windows7. Oh well. _____ From: Sanjeev Prabhakar [mailto:sprabhakar2006@gmail.com] Sent: Sat, 27 Aug 2022 11:11 To: OpenSCAD general discussion Subject: [OpenSCAD] Re: openscad with jupyter notebook I think you maybe using an older version of openscad. Please try the latest development snapshot On Sat, 27 Aug, 2022, 6:17 am Michael Marx, <michael@marx.id.au> wrote: There are errors in dependencies.scad. Parsing design (AST generation)... ERROR: Parser error: syntax error in file dependencies.scad, line 1098 Execution aborted I fixed the hanging comma, then got the same error at 1994, fixed, then 2706, fixed, then 2753 (didn't look at this one, trend was not looking good...) _____ From: Sanjeev Prabhakar [mailto:sprabhakar2006@gmail.com] Sent: Sat, 27 Aug 2022 01:05 To: jon Cc: OpenSCAD general discussion Subject: [OpenSCAD] Re: openscad with jupyter notebook a simpler example would be hub_with_post.scad (attached here) please see the complex radiuses and it would be difficult with pure openscad On Fri, 26 Aug 2022 at 20:24, Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: For rounding, intersection line of 2 prisms is a complex calculation, which was quite fast as per my understanding and maybe if I have to do the same in openscad it would be difficult to write the code itself. Although I have written the same in openscad also, but it's not perfect. Initially I was just copying the functions I have written in openscad , later on I realised the same code can be written much efficiently in numpy. That's a learning curve. For example, if you download the wheel_final.scad file, you can see the roundings of so many intersection lines. For this to work file dependencies.scad also need to be downloaded and kept in the same folder On Fri, 26 Aug, 2022, 8:02 pm jon, <jon@jonbondy.com> wrote: Can you give an example of calculations that are easy in python than in OpenSCAD? Jon On 8/26/2022 10:27 AM, Sanjeev Prabhakar wrote: I didn't know either few months back. It was not very difficult for a person like me who doesn't have much background in softwares. At the same time it's just one of the approach where points calculation is done with another software and then these points are passed on to openscad. I have found that calculations are much easier in python as there are many supporting libraries. Thanks On Fri, 26 Aug, 2022, 7:39 pm jon, <jon@jonbondy.com> wrote: I know nothing about numpy nor jupyter notebook. Should I just ignore this conversation? On 8/26/2022 12:27 AM, Sanjeev Prabhakar wrote: > Dear All, > > I have experimented with jupyter notebook to calculate points in space > and then passing the same to openscad for creating 3d shapes. > > Found it to be quite interesting. > > Wrote almost all the functions of openscad in jupyter notebook. > > you can refer to the page below for few examples: > https://github.com/sprabhakar2006/openSCAD > > you need to have some working knowledge of numpy and jupyter notebook > for this to work. > > Regards > Sanjeev > > > _______________________________________________ > 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. <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> www.avg.com _______________________________________________ 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 -- This email has been checked for viruses by AVG. https://www.avg.com
SP
Sanjeev Prabhakar
Sat, Aug 27, 2022 2:34 AM

It is just to demonstrate that the points list can be passes from jupyter
notebook to openscad.
You can notice the fillet at the intersection between the hub and the post,
which is not trivial for openscad

On Sat, 27 Aug, 2022, 7:22 am Michael Marx, michael@marx.id.au wrote:

and what you get


From: Sanjeev Prabhakar [mailto:sprabhakar2006@gmail.com]
Sent: Sat, 27 Aug 2022 11:35
To: OpenSCAD general discussion
Subject: [OpenSCAD] Re: openscad with jupyter notebook

OK

In that case you have to correct all the syntax errors manually

On Sat, 27 Aug, 2022, 7:01 am Michael Marx, michael@marx.id.au wrote:

Later version don't work on Windows7. Oh well.


From: Sanjeev Prabhakar [mailto:sprabhakar2006@gmail.com]
Sent: Sat, 27 Aug 2022 11:11
To: OpenSCAD general discussion
Subject: [OpenSCAD] Re: openscad with jupyter notebook

I think you maybe using an older version of openscad.

Please try the latest development snapshot

On Sat, 27 Aug, 2022, 6:17 am Michael Marx, michael@marx.id.au wrote:

There are errors in dependencies.scad.

Parsing design (AST generation)...

ERROR: Parser error: syntax error in file dependencies.scad, line 1098

Execution aborted

I fixed the hanging comma, then got the same error at 1994, fixed, then
2706, fixed, then 2753 (didn't look at this one, trend was not looking
good...)


From: Sanjeev Prabhakar [mailto:sprabhakar2006@gmail.com]
Sent: Sat, 27 Aug 2022 01:05
To: jon
Cc: OpenSCAD general discussion
Subject: [OpenSCAD] Re: openscad with jupyter notebook

a simpler example would be hub_with_post.scad (attached here)

please see the complex radiuses and it would be difficult with pure
openscad

On Fri, 26 Aug 2022 at 20:24, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

For rounding, intersection line of 2 prisms is a complex calculation,
which was quite fast as per my understanding and maybe if I have to do the
same in openscad it would be difficult to write the code itself.

Although I have written the same in openscad also, but it's not perfect.

Initially I was just copying the functions I have written in  openscad ,
later on I realised the same code can be written much efficiently in numpy.

That's a learning curve.

For example, if you download the wheel_final.scad file, you can see the
roundings of so many intersection lines.

For this to work file dependencies.scad also need to be downloaded and
kept in the same folder

On Fri, 26 Aug, 2022, 8:02 pm jon, jon@jonbondy.com wrote:

Can you give an example of calculations that are easy in python than in
OpenSCAD?

Jon

On 8/26/2022 10:27 AM, Sanjeev Prabhakar wrote:

I didn't know either few months back.

It was not very difficult for a person like me who doesn't have much
background in softwares.

At the same time it's just one of the approach where points calculation is
done with another software and then these points are passed on to openscad.

I have found that calculations are much easier in python as there are many
supporting libraries.

Thanks

On Fri, 26 Aug, 2022, 7:39 pm jon, jon@jonbondy.com wrote:

I know nothing about numpy nor jupyter notebook.  Should I just ignore
this conversation?

On 8/26/2022 12:27 AM, Sanjeev Prabhakar wrote:

Dear All,

I have experimented with jupyter notebook to calculate points in space
and then passing the same to openscad for creating 3d shapes.

Found it to be quite interesting.

Wrote almost all the functions of openscad in jupyter notebook.

you can refer to the page below for few examples:
https://github.com/sprabhakar2006/openSCAD

you need to have some working knowledge of numpy and jupyter notebook
for this to work.

Regards
Sanjeev


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_4529395547847457718_m_-4033492148833699996_m_74977316308927>


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

It is just to demonstrate that the points list can be passes from jupyter notebook to openscad. You can notice the fillet at the intersection between the hub and the post, which is not trivial for openscad On Sat, 27 Aug, 2022, 7:22 am Michael Marx, <michael@marx.id.au> wrote: > and what you get > > > > > ------------------------------ > > *From:* Sanjeev Prabhakar [mailto:sprabhakar2006@gmail.com] > *Sent:* Sat, 27 Aug 2022 11:35 > *To:* OpenSCAD general discussion > *Subject:* [OpenSCAD] Re: openscad with jupyter notebook > > > > OK > > In that case you have to correct all the syntax errors manually > > > > On Sat, 27 Aug, 2022, 7:01 am Michael Marx, <michael@marx.id.au> wrote: > > Later version don't work on Windows7. Oh well. > > > ------------------------------ > > *From:* Sanjeev Prabhakar [mailto:sprabhakar2006@gmail.com] > *Sent:* Sat, 27 Aug 2022 11:11 > *To:* OpenSCAD general discussion > *Subject:* [OpenSCAD] Re: openscad with jupyter notebook > > > > I think you maybe using an older version of openscad. > > Please try the latest development snapshot > > > > On Sat, 27 Aug, 2022, 6:17 am Michael Marx, <michael@marx.id.au> wrote: > > There are errors in dependencies.scad. > > Parsing design (AST generation)... > > ERROR: Parser error: syntax error in file dependencies.scad, line 1098 > > Execution aborted > > > > I fixed the hanging comma, then got the same error at 1994, fixed, then > 2706, fixed, then 2753 (didn't look at this one, trend was not looking > good...) > > > ------------------------------ > > *From:* Sanjeev Prabhakar [mailto:sprabhakar2006@gmail.com] > *Sent:* Sat, 27 Aug 2022 01:05 > *To:* jon > *Cc:* OpenSCAD general discussion > *Subject:* [OpenSCAD] Re: openscad with jupyter notebook > > > > a simpler example would be hub_with_post.scad (attached here) > > please see the complex radiuses and it would be difficult with pure > openscad > > > > > > > > On Fri, 26 Aug 2022 at 20:24, Sanjeev Prabhakar <sprabhakar2006@gmail.com> > wrote: > > For rounding, intersection line of 2 prisms is a complex calculation, > which was quite fast as per my understanding and maybe if I have to do the > same in openscad it would be difficult to write the code itself. > > > > Although I have written the same in openscad also, but it's not perfect. > > > > Initially I was just copying the functions I have written in openscad , > later on I realised the same code can be written much efficiently in numpy. > > > > That's a learning curve. > > > > For example, if you download the wheel_final.scad file, you can see the > roundings of so many intersection lines. > > > > For this to work file dependencies.scad also need to be downloaded and > kept in the same folder > > > > > > On Fri, 26 Aug, 2022, 8:02 pm jon, <jon@jonbondy.com> wrote: > > Can you give an example of calculations that are easy in python than in > OpenSCAD? > > Jon > > > > On 8/26/2022 10:27 AM, Sanjeev Prabhakar wrote: > > I didn't know either few months back. > > It was not very difficult for a person like me who doesn't have much > background in softwares. > > > > At the same time it's just one of the approach where points calculation is > done with another software and then these points are passed on to openscad. > > > > I have found that calculations are much easier in python as there are many > supporting libraries. > > > > Thanks > > > > > > On Fri, 26 Aug, 2022, 7:39 pm jon, <jon@jonbondy.com> wrote: > > I know nothing about numpy nor jupyter notebook. Should I just ignore > this conversation? > > > On 8/26/2022 12:27 AM, Sanjeev Prabhakar wrote: > > Dear All, > > > > I have experimented with jupyter notebook to calculate points in space > > and then passing the same to openscad for creating 3d shapes. > > > > Found it to be quite interesting. > > > > Wrote almost all the functions of openscad in jupyter notebook. > > > > you can refer to the page below for few examples: > > https://github.com/sprabhakar2006/openSCAD > > > > you need to have some working knowledge of numpy and jupyter notebook > > for this to work. > > > > Regards > > Sanjeev > > > > > > _______________________________________________ > > 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_4529395547847457718_m_-4033492148833699996_m_74977316308927> > > _______________________________________________ > 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 >
SP
Sanjeev Prabhakar
Sat, Sep 3, 2022 5:33 AM

Please check out this example

https://github.com/sprabhakar2006/openSCAD/tree/main/wheel_ipynb

In the above example points are calculated in jupyter notebook.

On Fri, 26 Aug, 2022, 9:57 am Sanjeev Prabhakar, sprabhakar2006@gmail.com
wrote:

Dear All,

I have experimented with jupyter notebook to calculate points in space and
then passing the same to openscad for creating 3d shapes.

Found it to be quite interesting.

Wrote almost all the functions of openscad in jupyter notebook.

you can refer to the page below for few examples:
https://github.com/sprabhakar2006/openSCAD

you need to have some working knowledge of numpy and jupyter notebook for
this to work.

Regards
Sanjeev

Please check out this example https://github.com/sprabhakar2006/openSCAD/tree/main/wheel_ipynb In the above example points are calculated in jupyter notebook. On Fri, 26 Aug, 2022, 9:57 am Sanjeev Prabhakar, <sprabhakar2006@gmail.com> wrote: > Dear All, > > I have experimented with jupyter notebook to calculate points in space and > then passing the same to openscad for creating 3d shapes. > > Found it to be quite interesting. > > Wrote almost all the functions of openscad in jupyter notebook. > > you can refer to the page below for few examples: > https://github.com/sprabhakar2006/openSCAD > > you need to have some working knowledge of numpy and jupyter notebook for > this to work. > > Regards > Sanjeev > >