discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

complex fillet

SP
Sanjeev Prabhakar
Sun, Dec 17, 2023 11:17 AM

difficult to make in openscad as per me.

[image: Screenshot 2023-12-17 at 4.25.16 PM.png]

file can be downloaded from here:
https://github.com/sprabhakar2006/openSCAD/blob/main/complex_fillet.scad

difficult to make in openscad as per me. [image: Screenshot 2023-12-17 at 4.25.16 PM.png] file can be downloaded from here: https://github.com/sprabhakar2006/openSCAD/blob/main/complex_fillet.scad
CK
Chun Kit LAM
Sun, Dec 17, 2023 12:12 PM

Interesting, this is indeed difficult to make and makes my firefox hang
when trying to view the github page, probably some weird css issue due
to long lines.

I got something much simpler but not as nice:

$fn = 100;

module part() {
translate([-9, 0, -5])
linear_extrude(10, convexity=10)
difference() {
offset(-2) offset(2) union() {
translate([-2, -1]) square([12, 2]);
translate([14, 0]) circle(5);
}
translate([14, 0]) circle(3.5);
}
}

intersection() {
part();
rotate([90, 0, 180]) part();
}

No idea how to round the edges without using minkowski.

Best,
John

On 17/12/2023 19:17, Sanjeev Prabhakar via Discuss wrote:

difficult to make in openscad as per me.

Screenshot 2023-12-17 at 4.25.16 PM.png

file can be downloaded from here:
https://github.com/sprabhakar2006/openSCAD/blob/main/complex_fillet.scad


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

Interesting, this is indeed difficult to make and makes my firefox hang when trying to view the github page, probably some weird css issue due to long lines. I got something much simpler but not as nice: $fn = 100; module part() { translate([-9, 0, -5]) linear_extrude(10, convexity=10) difference() { offset(-2) offset(2) union() { translate([-2, -1]) square([12, 2]); translate([14, 0]) circle(5); } translate([14, 0]) circle(3.5); } } intersection() { part(); rotate([90, 0, 180]) part(); } No idea how to round the edges without using minkowski. Best, John On 17/12/2023 19:17, Sanjeev Prabhakar via Discuss wrote: > difficult to make in openscad as per me. > > Screenshot 2023-12-17 at 4.25.16 PM.png > > file can be downloaded from here: > https://github.com/sprabhakar2006/openSCAD/blob/main/complex_fillet.scad > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email todiscuss-leave@lists.openscad.org
SP
Sanjeev Prabhakar
Sun, Dec 17, 2023 12:34 PM

It's only 1.5 mb file. Should be easy to download

On Sun, 17 Dec, 2023, 5:42 pm Chun Kit LAM via Discuss, <
discuss@lists.openscad.org> wrote:

Interesting, this is indeed difficult to make and makes my firefox hang
when trying to view the github page, probably some weird css issue due to
long lines.

It's only 1.5 mb file. Should be easy to download On Sun, 17 Dec, 2023, 5:42 pm Chun Kit LAM via Discuss, < discuss@lists.openscad.org> wrote: > Interesting, this is indeed difficult to make and makes my firefox hang > when trying to view the github page, probably some weird css issue due to > long lines. > > > > >
CK
Chun Kit LAM
Sun, Dec 17, 2023 12:39 PM

Yeah I did downloaded it, the remark about firefox hanging is just
something I found interesting while downloading it.

Btw how did you compute the coordinates? Is there a script that can
automatically compute fillet?

On 17/12/2023 20:34, Sanjeev Prabhakar wrote:

It's only 1.5 mb file. Should be easy to download

On Sun, 17 Dec, 2023, 5:42 pm Chun Kit LAM via Discuss,
discuss@lists.openscad.org wrote:

 Interesting, this is indeed difficult to make and makes my firefox
 hang when trying to view the github page, probably some weird css
 issue due to long lines.
Yeah I did downloaded it, the remark about firefox hanging is just something I found interesting while downloading it. Btw how did you compute the coordinates? Is there a script that can automatically compute fillet? On 17/12/2023 20:34, Sanjeev Prabhakar wrote: > It's only 1.5 mb file. Should be easy to download > > On Sun, 17 Dec, 2023, 5:42 pm Chun Kit LAM via Discuss, > <discuss@lists.openscad.org> wrote: > > Interesting, this is indeed difficult to make and makes my firefox > hang when trying to view the github page, probably some weird css > issue due to long lines. > > > >
SP
Sanjeev Prabhakar
Sun, Dec 17, 2023 12:47 PM

Here is the python code to compute in case you are interested (you need to
download "openscad1.py" file from the github page and need to keep in the
same folder):

from openscad1 import *

c1=circle(20)
c2=circle(5,[25,0])
f_1=two_cir_tarc(c1,c2,10)
f_2=two_cir_tarc(c1,c2,10,1)
p0,p1,p2,p3,p4,p5=f_1[0],f_1[-1],[60,-5],[60,5],f_2[0],f_2[-1]

sec=[p3]+arc_2p(p4,p5,10,1)+arc_long_2p(p5,p0,20,-1,s=50)+arc_2p(p0,p1,10,1)+[p2]
sec=remove_extra_points(array(sec).round(5))
sec=equidistant_path(sec,1000)
sol=slice_sol(translate([0,0,-21],linear_extrude(sec,42)),2)
sol1=translate([40-.1,0,0],q_rot(['x90','z180'],sol))
ip_1=ip_sol2sol(sol1,sol)
ip_a=[p[0] for p in ip_1]
ip_b=[p[-1] for p in ip_1]
ip_c=ip_a+flip(ip_b)
f_1=i_line_fillet(sol,sol1,ip_c,-2,2)
f_1=cpo(f_1)[:-1]
f_1=[equidistant_pathc(p,400)  for p in f_1]
f_2=surface_offset(f_1,4)
sol3=swp_prism_h(f_2,f_1)

sol4=o_solid([0,0,1],circle(15),20,-10)
sol5=o_solid([0,1,0],circle(15),20,-10,40,0)
with open('trial.scad','w+')as f:
f.write(f'''

difference(){{

intersection(){{
{swp(sol)}
{swp(sol1)}
}}
{swp_c(sol3)}
{swp(sol4)}
{swp(sol5)}
}}
''')

Apart from that in case you want to learn all the functions I wrote. You
can download this pdf file:
https://github.com/sprabhakar2006/openSCAD/blob/main/explanation%20of%20approaches/examples_of_various_functions.pdf

On Sun, 17 Dec 2023 at 18:09, Chun Kit LAM john.lck40@gmail.com wrote:

Yeah I did downloaded it, the remark about firefox hanging is just
something I found interesting while downloading it.

Btw how did you compute the coordinates? Is there a script that can
automatically compute fillet?
On 17/12/2023 20:34, Sanjeev Prabhakar wrote:

It's only 1.5 mb file. Should be easy to download

On Sun, 17 Dec, 2023, 5:42 pm Chun Kit LAM via Discuss, <
discuss@lists.openscad.org> wrote:

Interesting, this is indeed difficult to make and makes my firefox hang
when trying to view the github page, probably some weird css issue due to
long lines.

Here is the python code to compute in case you are interested (you need to download "openscad1.py" file from the github page and need to keep in the same folder): from openscad1 import * c1=circle(20) c2=circle(5,[25,0]) f_1=two_cir_tarc(c1,c2,10) f_2=two_cir_tarc(c1,c2,10,1) p0,p1,p2,p3,p4,p5=f_1[0],f_1[-1],[60,-5],[60,5],f_2[0],f_2[-1] sec=[p3]+arc_2p(p4,p5,10,1)+arc_long_2p(p5,p0,20,-1,s=50)+arc_2p(p0,p1,10,1)+[p2] sec=remove_extra_points(array(sec).round(5)) sec=equidistant_path(sec,1000) sol=slice_sol(translate([0,0,-21],linear_extrude(sec,42)),2) sol1=translate([40-.1,0,0],q_rot(['x90','z180'],sol)) ip_1=ip_sol2sol(sol1,sol) ip_a=[p[0] for p in ip_1] ip_b=[p[-1] for p in ip_1] ip_c=ip_a+flip(ip_b) f_1=i_line_fillet(sol,sol1,ip_c,-2,2) f_1=cpo(f_1)[:-1] f_1=[equidistant_pathc(p,400) for p in f_1] f_2=surface_offset(f_1,4) sol3=swp_prism_h(f_2,f_1) sol4=o_solid([0,0,1],circle(15),20,-10) sol5=o_solid([0,1,0],circle(15),20,-10,40,0) with open('trial.scad','w+')as f: f.write(f''' difference(){{ intersection(){{ {swp(sol)} {swp(sol1)} }} {swp_c(sol3)} {swp(sol4)} {swp(sol5)} }} ''') Apart from that in case you want to learn all the functions I wrote. You can download this pdf file: https://github.com/sprabhakar2006/openSCAD/blob/main/explanation%20of%20approaches/examples_of_various_functions.pdf On Sun, 17 Dec 2023 at 18:09, Chun Kit LAM <john.lck40@gmail.com> wrote: > Yeah I did downloaded it, the remark about firefox hanging is just > something I found interesting while downloading it. > > Btw how did you compute the coordinates? Is there a script that can > automatically compute fillet? > On 17/12/2023 20:34, Sanjeev Prabhakar wrote: > > It's only 1.5 mb file. Should be easy to download > > On Sun, 17 Dec, 2023, 5:42 pm Chun Kit LAM via Discuss, < > discuss@lists.openscad.org> wrote: > >> Interesting, this is indeed difficult to make and makes my firefox hang >> when trying to view the github page, probably some weird css issue due to >> long lines. >> >> >> >> >>
SP
Sanjeev Prabhakar
Sun, Dec 17, 2023 1:03 PM

Few months back I circulated an approach to create fillets.
That is the process used here as well.
I personally feel this can be used in pure openscad.
What is required is a method to compute intersection points between 2
solids or surfaces.
When you have these intersection lines, these could be manipulated to get
the fillets.
Although this may not work in 100% of the cases, but will work in most of
the complex cases.
Here you can download the explanation:
https://github.com/sprabhakar2006/openSCAD/blob/main/explanation%20of%20approaches/explanation%20of%20creating%20fillet.pdf

On Sun, 17 Dec 2023 at 18:17, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

Here is the python code to compute in case you are interested (you need to
download "openscad1.py" file from the github page and need to keep in the
same folder):

from openscad1 import *

c1=circle(20)
c2=circle(5,[25,0])
f_1=two_cir_tarc(c1,c2,10)
f_2=two_cir_tarc(c1,c2,10,1)
p0,p1,p2,p3,p4,p5=f_1[0],f_1[-1],[60,-5],[60,5],f_2[0],f_2[-1]

sec=[p3]+arc_2p(p4,p5,10,1)+arc_long_2p(p5,p0,20,-1,s=50)+arc_2p(p0,p1,10,1)+[p2]
sec=remove_extra_points(array(sec).round(5))
sec=equidistant_path(sec,1000)
sol=slice_sol(translate([0,0,-21],linear_extrude(sec,42)),2)
sol1=translate([40-.1,0,0],q_rot(['x90','z180'],sol))
ip_1=ip_sol2sol(sol1,sol)
ip_a=[p[0] for p in ip_1]
ip_b=[p[-1] for p in ip_1]
ip_c=ip_a+flip(ip_b)
f_1=i_line_fillet(sol,sol1,ip_c,-2,2)
f_1=cpo(f_1)[:-1]
f_1=[equidistant_pathc(p,400)  for p in f_1]
f_2=surface_offset(f_1,4)
sol3=swp_prism_h(f_2,f_1)

sol4=o_solid([0,0,1],circle(15),20,-10)
sol5=o_solid([0,1,0],circle(15),20,-10,40,0)
with open('trial.scad','w+')as f:
f.write(f'''

 difference(){{

intersection(){{
{swp(sol)}
{swp(sol1)}
}}
{swp_c(sol3)}
{swp(sol4)}
{swp(sol5)}
}}
''')

Apart from that in case you want to learn all the functions I wrote. You
can download this pdf file:

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

On Sun, 17 Dec 2023 at 18:09, Chun Kit LAM john.lck40@gmail.com wrote:

Yeah I did downloaded it, the remark about firefox hanging is just
something I found interesting while downloading it.

Btw how did you compute the coordinates? Is there a script that can
automatically compute fillet?
On 17/12/2023 20:34, Sanjeev Prabhakar wrote:

It's only 1.5 mb file. Should be easy to download

On Sun, 17 Dec, 2023, 5:42 pm Chun Kit LAM via Discuss, <
discuss@lists.openscad.org> wrote:

Interesting, this is indeed difficult to make and makes my firefox hang
when trying to view the github page, probably some weird css issue due to
long lines.

Few months back I circulated an approach to create fillets. That is the process used here as well. I personally feel this can be used in pure openscad. What is required is a method to compute intersection points between 2 solids or surfaces. When you have these intersection lines, these could be manipulated to get the fillets. Although this may not work in 100% of the cases, but will work in most of the complex cases. Here you can download the explanation: https://github.com/sprabhakar2006/openSCAD/blob/main/explanation%20of%20approaches/explanation%20of%20creating%20fillet.pdf On Sun, 17 Dec 2023 at 18:17, Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > Here is the python code to compute in case you are interested (you need to > download "openscad1.py" file from the github page and need to keep in the > same folder): > > from openscad1 import * > > c1=circle(20) > c2=circle(5,[25,0]) > f_1=two_cir_tarc(c1,c2,10) > f_2=two_cir_tarc(c1,c2,10,1) > p0,p1,p2,p3,p4,p5=f_1[0],f_1[-1],[60,-5],[60,5],f_2[0],f_2[-1] > > > sec=[p3]+arc_2p(p4,p5,10,1)+arc_long_2p(p5,p0,20,-1,s=50)+arc_2p(p0,p1,10,1)+[p2] > sec=remove_extra_points(array(sec).round(5)) > sec=equidistant_path(sec,1000) > sol=slice_sol(translate([0,0,-21],linear_extrude(sec,42)),2) > sol1=translate([40-.1,0,0],q_rot(['x90','z180'],sol)) > ip_1=ip_sol2sol(sol1,sol) > ip_a=[p[0] for p in ip_1] > ip_b=[p[-1] for p in ip_1] > ip_c=ip_a+flip(ip_b) > f_1=i_line_fillet(sol,sol1,ip_c,-2,2) > f_1=cpo(f_1)[:-1] > f_1=[equidistant_pathc(p,400) for p in f_1] > f_2=surface_offset(f_1,4) > sol3=swp_prism_h(f_2,f_1) > > sol4=o_solid([0,0,1],circle(15),20,-10) > sol5=o_solid([0,1,0],circle(15),20,-10,40,0) > with open('trial.scad','w+')as f: > f.write(f''' > > difference(){{ > intersection(){{ > {swp(sol)} > {swp(sol1)} > }} > {swp_c(sol3)} > {swp(sol4)} > {swp(sol5)} > }} > ''') > > Apart from that in case you want to learn all the functions I wrote. You > can download this pdf file: > > https://github.com/sprabhakar2006/openSCAD/blob/main/explanation%20of%20approaches/examples_of_various_functions.pdf > > On Sun, 17 Dec 2023 at 18:09, Chun Kit LAM <john.lck40@gmail.com> wrote: > >> Yeah I did downloaded it, the remark about firefox hanging is just >> something I found interesting while downloading it. >> >> Btw how did you compute the coordinates? Is there a script that can >> automatically compute fillet? >> On 17/12/2023 20:34, Sanjeev Prabhakar wrote: >> >> It's only 1.5 mb file. Should be easy to download >> >> On Sun, 17 Dec, 2023, 5:42 pm Chun Kit LAM via Discuss, < >> discuss@lists.openscad.org> wrote: >> >>> Interesting, this is indeed difficult to make and makes my firefox hang >>> when trying to view the github page, probably some weird css issue due to >>> long lines. >>> >>> >>> >>> >>>
DW
Dan White
Sun, Dec 17, 2023 8:40 PM

I think I am seeing in these examples is a way to generate points using python source code and then have the python output to an OpenSCAD source file for rendering.

Is this accurate ?

—————————————————————————————————-

"Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us."

Bill Waterson (Calvin & Hobbes)

On Dec 17, 2023, at 8:03 AM, Sanjeev Prabhakar via Discuss <discuss@lists.openscad.org> wrote:

Few months back I circulated an approach to create fillets.That is the process used here as well.

I personally feel this can be used in pure openscad.

What is required is a method to compute intersection points between 2 solids or surfaces.

When you have these intersection lines, these could be manipulated to get the fillets.

Although this may not work in 100% of the cases, but will work in most of the complex cases.

Here you can download the explanation:

https://github.com/sprabhakar2006/openSCAD/blob/main/explanation%20of%20approaches/explanation%20of%20creating%20fillet.pdf

On Sun, 17 Dec 2023 at 18:17, Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote:

Here is the python code to compute in case you are interested (you need to download "openscad1.py" file from the github page and need to keep in the same folder):

from openscad1 import *

c1=circle(20)
c2=circle(5,[25,0])
f_1=two_cir_tarc(c1,c2,10)
f_2=two_cir_tarc(c1,c2,10,1)
p0,p1,p2,p3,p4,p5=f_1[0],f_1[-1],[60,-5],[60,5],f_2[0],f_2[-1]

sec=[p3]+arc_2p(p4,p5,10,1)+arc_long_2p(p5,p0,20,-1,s=50)+arc_2p(p0,p1,10,1)+[p2]
sec=remove_extra_points(array(sec).round(5))
sec=equidistant_path(sec,1000)
sol=slice_sol(translate([0,0,-21],linear_extrude(sec,42)),2)
sol1=translate([40-.1,0,0],q_rot(['x90','z180'],sol))
ip_1=ip_sol2sol(sol1,sol)
ip_a=[p[0] for p in ip_1]
ip_b=[p[-1] for p in ip_1]
ip_c=ip_a+flip(ip_b)
f_1=i_line_fillet(sol,sol1,ip_c,-2,2)
f_1=cpo(f_1)[:-1]
f_1=[equidistant_pathc(p,400) for p in f_1]
f_2=surface_offset(f_1,4)
sol3=swp_prism_h(f_2,f_1)

sol4=o_solid([0,0,1],circle(15),20,-10)
sol5=o_solid([0,1,0],circle(15),20,-10,40,0)
with open('trial.scad','w+')as f:
f.write(f'''

difference(){{
intersection(){{
{swp(sol)}
{swp(sol1)}
}}
{swp_c(sol3)}
{swp(sol4)}
{swp(sol5)}
}}
''')

Apart from that in case you want to learn all the functions I wrote. You can download this pdf file:

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

On Sun, 17 Dec 2023 at 18:09, Chun Kit LAM <john.lck40@gmail.com> wrote:

Yeah I did downloaded it, the remark about firefox hanging is just something I found interesting while downloading it.

Btw how did you compute the coordinates? Is there a script that can automatically compute fillet?

On 17/12/2023 20:34, Sanjeev Prabhakar wrote:

It's only 1.5 mb file. Should be easy to download

On Sun, 17 Dec, 2023, 5:42 pm Chun Kit LAM via Discuss, <discuss@lists.openscad.org> wrote:

Interesting, this is indeed difficult to make and makes my firefox hang when trying to view the github page, probably some weird css issue due to long lines.

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

WF
William F. Adams
Sun, Dec 17, 2023 8:59 PM

On Sunday, December 17, 2023 at 03:41:14 PM EST, Dan White via Discuss discuss@lists.openscad.org wrote:

I think I am seeing in these examples is a way to generate points using python source code >and then have the python output to an OpenSCAD source file for rendering.

Is this accurate ?

No.
The version of OpenSCAD being used here has Python enabled w/in it, so can do rendering from Python files, or working from Python commands/data structures:

http://pythonscad.org/

There is work on-going to integrate it into OpenSCAD directly:
https://github.com/openscad/openscad/issues/4880

and for folks who aren't good at Python, it is workable to just use it as a project warrants --- for example in the work I have been doing:
https://github.com/WillAdams/gcodepreview

I <use ...> one Python file, wrap it in an OpenSCAD file which is also brough in via <use ....>, then reference that OpenSCAD file using <include ...> and that then allows me to use OpenSCAD quite naturally, while taking advantage of (for example) persistent Python variables (so that the position of a virtual CNC machine can be tracked), and the ability of Python to write out files (so that DXF files which do not describe closed regions may be output, or G-code can be written out directly, forgoing the need for a traditional CAM program).
William

On Sunday, December 17, 2023 at 03:41:14 PM EST, Dan White via Discuss <discuss@lists.openscad.org> wrote: >I think I am seeing in these examples is a way to generate points using python source code >and then have the python output to an OpenSCAD source file for rendering. >>Is this accurate ? No. The version of OpenSCAD being used here has Python enabled w/in it, so can do rendering from Python files, or working from Python commands/data structures: http://pythonscad.org/ There is work on-going to integrate it into OpenSCAD directly: https://github.com/openscad/openscad/issues/4880 and for folks who aren't good at Python, it is workable to just use it as a project warrants --- for example in the work I have been doing: https://github.com/WillAdams/gcodepreview I <use ...> one Python file, wrap it in an OpenSCAD file which is also brough in via <use ....>, then reference that OpenSCAD file using <include ...> and that then allows me to use OpenSCAD quite naturally, while taking advantage of (for example) persistent Python variables (so that the position of a virtual CNC machine can be tracked), and the ability of Python to write out files (so that DXF files which do not describe closed regions may be output, or G-code can be written out directly, forgoing the need for a traditional CAM program). William
DW
Dan White
Sun, Dec 17, 2023 10:16 PM

Thanks for clarifying
I will look at pythonscad

"Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us."
Bill Waterson (Calvin & Hobbes)

On Dec 17, 2023, at 3:59 PM, William F. Adams via Discuss discuss@lists.openscad.org wrote:


On Sunday, December 17, 2023 at 03:41:14 PM EST, Dan White via Discuss discuss@lists.openscad.org wrote:

I think I am seeing in these examples is a way to generate points using python source code
and then have the python output to an OpenSCAD source file for rendering.

Is this accurate ?

No.

The version of OpenSCAD being used here has Python enabled w/in it, so can do rendering from Python files, or working from Python commands/data structures:

http://pythonscad.org/

There is work on-going to integrate it into OpenSCAD directly:

https://github.com/openscad/openscad/issues/4880

and for folks who aren't good at Python, it is workable to just use it as a project warrants --- for example in the work I have been doing:

https://github.com/WillAdams/gcodepreview

I <use ...> one Python file, wrap it in an OpenSCAD file which is also brough in via <use ....>, then reference that OpenSCAD file using <include ...> and that then allows me to use OpenSCAD quite naturally, while taking advantage of (for example) persistent Python variables (so that the position of a virtual CNC machine can be tracked), and the ability of Python to write out files (so that DXF files which do not describe closed regions may be output, or G-code can be written out directly, forgoing the need for a traditional CAM program).

William


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

Thanks for clarifying I will look at pythonscad "Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us." Bill Waterson (Calvin & Hobbes) > On Dec 17, 2023, at 3:59 PM, William F. Adams via Discuss <discuss@lists.openscad.org> wrote: > >  > On Sunday, December 17, 2023 at 03:41:14 PM EST, Dan White via Discuss <discuss@lists.openscad.org> wrote: > > >I think I am seeing in these examples is a way to generate points using python source code > >and then have the python output to an OpenSCAD source file for rendering. > > > >Is this accurate ? > > No. > > The version of OpenSCAD being used here has Python enabled w/in it, so can do rendering from Python files, or working from Python commands/data structures: > > http://pythonscad.org/ > > There is work on-going to integrate it into OpenSCAD directly: > > https://github.com/openscad/openscad/issues/4880 > > and for folks who aren't good at Python, it is workable to just use it as a project warrants --- for example in the work I have been doing: > > https://github.com/WillAdams/gcodepreview > > I <use ...> one Python file, wrap it in an OpenSCAD file which is also brough in via <use ....>, then reference that OpenSCAD file using <include ...> and that then allows me to use OpenSCAD quite naturally, while taking advantage of (for example) persistent Python variables (so that the position of a virtual CNC machine can be tracked), and the ability of Python to write out files (so that DXF files which do not describe closed regions may be output, or G-code can be written out directly, forgoing the need for a traditional CAM program). > > William > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
SP
Sanjeev Prabhakar
Mon, Dec 18, 2023 2:16 AM

I am using Jupyter notebook to write python codes for openscad.
I tried pythonscad but somehow it did not work.

On Mon, 18 Dec 2023 at 03:46, Dan White via Discuss <
discuss@lists.openscad.org> wrote:

Thanks for clarifying
I will look at pythonscad

"Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us."

Bill Waterson (Calvin & Hobbes)

On Dec 17, 2023, at 3:59 PM, William F. Adams via Discuss <
discuss@lists.openscad.org> wrote:


On Sunday, December 17, 2023 at 03:41:14 PM EST, Dan White via Discuss <
discuss@lists.openscad.org> wrote:

I think I am seeing in these examples is a way to generate points using

python source code

and then have the python output to an OpenSCAD source file for rendering.

Is this accurate ?

No.

The version of OpenSCAD being used here has Python enabled w/in it, so can
do rendering from Python files, or working from Python commands/data
structures:

http://pythonscad.org/

There is work on-going to integrate it into OpenSCAD directly:

https://github.com/openscad/openscad/issues/4880

and for folks who aren't good at Python, it is workable to just use it as
a project warrants --- for example in the work I have been doing:

https://github.com/WillAdams/gcodepreview

I <use ...> one Python file, wrap it in an OpenSCAD file which is also
brough in via <use ....>, then reference that OpenSCAD file using <include
...> and that then allows me to use OpenSCAD quite naturally, while taking
advantage of (for example) persistent Python variables (so that the
position of a virtual CNC machine can be tracked), and the ability of
Python to write out files (so that DXF files which do not describe closed
regions may be output, or G-code can be written out directly, forgoing the
need for a traditional CAM program).

William


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 am using Jupyter notebook to write python codes for openscad. I tried pythonscad but somehow it did not work. On Mon, 18 Dec 2023 at 03:46, Dan White via Discuss < discuss@lists.openscad.org> wrote: > Thanks for clarifying > I will look at pythonscad > > "Sometimes I think the surest sign that intelligent life exists elsewhere > in the universe is that none of it has tried to contact us." > > Bill Waterson (Calvin & Hobbes) > > On Dec 17, 2023, at 3:59 PM, William F. Adams via Discuss < > discuss@lists.openscad.org> wrote: > >  > On Sunday, December 17, 2023 at 03:41:14 PM EST, Dan White via Discuss < > discuss@lists.openscad.org> wrote: > > >I think I am seeing in these examples is a way to generate points using > python source code > >and then have the python output to an OpenSCAD source file for rendering. > > > >Is this accurate ? > > No. > > The version of OpenSCAD being used here has Python enabled w/in it, so can > do rendering from Python files, or working from Python commands/data > structures: > > http://pythonscad.org/ > > There is work on-going to integrate it into OpenSCAD directly: > > https://github.com/openscad/openscad/issues/4880 > > and for folks who aren't good at Python, it is workable to just use it as > a project warrants --- for example in the work I have been doing: > > https://github.com/WillAdams/gcodepreview > > I <use ...> one Python file, wrap it in an OpenSCAD file which is also > brough in via <use ....>, then reference that OpenSCAD file using <include > ...> and that then allows me to use OpenSCAD quite naturally, while taking > advantage of (for example) persistent Python variables (so that the > position of a virtual CNC machine can be tracked), and the ability of > Python to write out files (so that DXF files which do not describe closed > regions may be output, or G-code can be written out directly, forgoing the > need for a traditional CAM program). > > William > > > _______________________________________________ > 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 >