discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

open source makercoin

SP
Sanjeev Prabhakar
Sat, Feb 15, 2025 2:56 PM

and here is mine:

[image: Screenshot 2025-02-15 at 8.24.12 PM.png]

[image: Screenshot 2025-02-15 at 8.23.02 PM.png]

On Sat, 15 Feb 2025 at 13:23, Richard A. Milewski via Discuss <
discuss@lists.openscad.org> wrote:

I was a little annoyed that Angus ignored OpenSCAD in his YouTube review
of free CAD solutions for 3d printing.

Here's my attempt at a coin using the new metaballs() function in the
BOSL2 library for OpenSCAD.    The version pictured is an F6 render that
took about a minute and a half.
If you increase voxel_size to 1 in line 10, it takes about 15 seconds for
an F6 render.

include <BOSL2/std.scad>
include <BOSL2/isosurface.scad>
h1 = 10;
r1 = 25;
r2 = 5;
d1 = r1 * 2;
isovalue = 1;
voxel_size = 0.5;
infl = 0.2;
cut = 10;
function tmat(ang) = move(cylindrical_to_xyz(r1,ang,0));
difference() {
metaballs([
IDENT, mb_disk(h1,r1),
up(r1-2), mb_sphere(r1*4, influence = 1, negative = true, cutoff = r1+2),
for (ang = [0:45:315])
each [tmat(ang), mb_sphere(r2, influence = infl, negative = true, cutoff =
cut)]
],
voxel_size, [[-d1,-d1,-h1], [d1,d1,h1]], isovalue);
text3d(h = h1/2, "BOSL2", size = 4, center = true);
}


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

and here is mine: [image: Screenshot 2025-02-15 at 8.24.12 PM.png] [image: Screenshot 2025-02-15 at 8.23.02 PM.png] On Sat, 15 Feb 2025 at 13:23, Richard A. Milewski via Discuss < discuss@lists.openscad.org> wrote: > I was a little annoyed that Angus ignored OpenSCAD in his YouTube review > of free CAD solutions for 3d printing. > > Here's my attempt at a coin using the new metaballs() function in the > BOSL2 library for OpenSCAD. The version pictured is an F6 render that > took about a minute and a half. > If you increase voxel_size to 1 in line 10, it takes about 15 seconds for > an F6 render. > > > > include <BOSL2/std.scad> > include <BOSL2/isosurface.scad> > h1 = 10; > r1 = 25; > r2 = 5; > d1 = r1 * 2; > isovalue = 1; > voxel_size = 0.5; > infl = 0.2; > cut = 10; > function tmat(ang) = move(cylindrical_to_xyz(r1,ang,0)); > difference() { > metaballs([ > IDENT, mb_disk(h1,r1), > up(r1-2), mb_sphere(r1*4, influence = 1, negative = true, cutoff = r1+2), > for (ang = [0:45:315]) > each [tmat(ang), mb_sphere(r2, influence = infl, negative = true, cutoff = > cut)] > ], > voxel_size, [[-d1,-d1,-h1], [d1,d1,h1]], isovalue); > text3d(h = h1/2, "BOSL2", size = 4, center = true); > } > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
SP
Sanjeev Prabhakar
Sat, Feb 15, 2025 3:14 PM

below is the python code and it takes around 19 sec to calculate:

from openscad2 import *
i_t=time.time()
s1=pts([[0,-1],[5,0],[4,2],[5,0]])
s2=l_(concatenate([translate([i,0,0],s1) for i in
arange(0,180,18)]))+[[180,-1,0]]
path=c23(arc(20,0,360,s=len(s2)-1))
s3=extrude_wave2path(s2,path)
s4=rot2d(-4,bspline_closed(s3,2,200))
l1=[[0,0],[25,0]]
l2=[rot2d(i,l1) for i in arange(0,360,36)]
c1=circle(5,[-5,5])
c2=circle(20,[-20,25.5],s=200)
p0=[-15,0]
p1=tcct(5,20,[-5,5],[-20,25.5])
sec=[[-15,0]]+lineFromPointTillEnd(c1,[-5,0],1)+lineFromStartTillPoint(c1,p1[0],1)+

lineFromPointToPointOnLine(flip(c2),p1[1],[-18,5],5)
sol=prism(s4,sec)
sec=[[-15,0]]+lineFromPointTillEnd(c1,[-5,0],1)+lineFromStartTillPoint(c1,p1[0],1)+

lineFromPointToPointOnLine(flip(c2),p1[1],[-20,5],5)
sol1=prism(circle(20,s=200),sec)
sol2=sol[:27]+sol1[27:]
s=pts([[0,4],[0,-4],[6,0],[0,6],[-6,0],[0,6],[6,0],[0,-4]])
s=bspline_open(s,2,50)
s=scl2d(surround(s,1,10),.5)
p=pts([[0,10],[0,2],[6.5,0],[0,-6],[-4,0]])
p=[[0,0]]+bspline_open(p,2,20)
p=translate_2d([6.2,0],scl2d(surround(p,1,10),.5))
s,p=[translate([-6,-2.5,15],p) for p in [s,p]]
sol2=[p+[p[0]] for p in sol2]
s,p=[plos(sol2,p,[0,0,-1]) for p in [s,p]]
with open('trial.scad','w+') as f:
f.write(f'''
include<dependencies2.scad>
color("blue")p_line3dc({s},.2);
color("magenta")p_line3dc({p},.2);
{swp(sol2)}
''')
f_t=time.time()
f_t-i_t

On Sat, 15 Feb 2025 at 20:26, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

and here is mine:

[image: Screenshot 2025-02-15 at 8.24.12 PM.png]

[image: Screenshot 2025-02-15 at 8.23.02 PM.png]

On Sat, 15 Feb 2025 at 13:23, Richard A. Milewski via Discuss <
discuss@lists.openscad.org> wrote:

I was a little annoyed that Angus ignored OpenSCAD in his YouTube review
of free CAD solutions for 3d printing.

Here's my attempt at a coin using the new metaballs() function in the
BOSL2 library for OpenSCAD.    The version pictured is an F6 render that
took about a minute and a half.
If you increase voxel_size to 1 in line 10, it takes about 15 seconds for
an F6 render.

include <BOSL2/std.scad>
include <BOSL2/isosurface.scad>
h1 = 10;
r1 = 25;
r2 = 5;
d1 = r1 * 2;
isovalue = 1;
voxel_size = 0.5;
infl = 0.2;
cut = 10;
function tmat(ang) = move(cylindrical_to_xyz(r1,ang,0));
difference() {
metaballs([
IDENT, mb_disk(h1,r1),
up(r1-2), mb_sphere(r1*4, influence = 1, negative = true, cutoff = r1+2),
for (ang = [0:45:315])
each [tmat(ang), mb_sphere(r2, influence = infl, negative = true, cutoff
= cut)]
],
voxel_size, [[-d1,-d1,-h1], [d1,d1,h1]], isovalue);
text3d(h = h1/2, "BOSL2", size = 4, center = true);
}


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

below is the python code and it takes around 19 sec to calculate: from openscad2 import * i_t=time.time() s1=pts([[0,-1],[5,0],[4,2],[5,0]]) s2=l_(concatenate([translate([i,0,0],s1) for i in arange(0,180,18)]))+[[180,-1,0]] path=c23(arc(20,0,360,s=len(s2)-1)) s3=extrude_wave2path(s2,path) s4=rot2d(-4,bspline_closed(s3,2,200)) l1=[[0,0],[25,0]] l2=[rot2d(i,l1) for i in arange(0,360,36)] c1=circle(5,[-5,5]) c2=circle(20,[-20,25.5],s=200) p0=[-15,0] p1=tcct(5,20,[-5,5],[-20,25.5]) sec=[[-15,0]]+lineFromPointTillEnd(c1,[-5,0],1)+lineFromStartTillPoint(c1,p1[0],1)+ \ lineFromPointToPointOnLine(flip(c2),p1[1],[-18,5],5) sol=prism(s4,sec) sec=[[-15,0]]+lineFromPointTillEnd(c1,[-5,0],1)+lineFromStartTillPoint(c1,p1[0],1)+ \ lineFromPointToPointOnLine(flip(c2),p1[1],[-20,5],5) sol1=prism(circle(20,s=200),sec) sol2=sol[:27]+sol1[27:] s=pts([[0,4],[0,-4],[6,0],[0,6],[-6,0],[0,6],[6,0],[0,-4]]) s=bspline_open(s,2,50) s=scl2d(surround(s,1,10),.5) p=pts([[0,10],[0,2],[6.5,0],[0,-6],[-4,0]]) p=[[0,0]]+bspline_open(p,2,20) p=translate_2d([6.2,0],scl2d(surround(p,1,10),.5)) s,p=[translate([-6,-2.5,15],p) for p in [s,p]] sol2=[p+[p[0]] for p in sol2] s,p=[plos(sol2,p,[0,0,-1]) for p in [s,p]] with open('trial.scad','w+') as f: f.write(f''' include<dependencies2.scad> color("blue")p_line3dc({s},.2); color("magenta")p_line3dc({p},.2); {swp(sol2)} ''') f_t=time.time() f_t-i_t On Sat, 15 Feb 2025 at 20:26, Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > and here is mine: > > [image: Screenshot 2025-02-15 at 8.24.12 PM.png] > > [image: Screenshot 2025-02-15 at 8.23.02 PM.png] > > > > On Sat, 15 Feb 2025 at 13:23, Richard A. Milewski via Discuss < > discuss@lists.openscad.org> wrote: > >> I was a little annoyed that Angus ignored OpenSCAD in his YouTube review >> of free CAD solutions for 3d printing. >> >> Here's my attempt at a coin using the new metaballs() function in the >> BOSL2 library for OpenSCAD. The version pictured is an F6 render that >> took about a minute and a half. >> If you increase voxel_size to 1 in line 10, it takes about 15 seconds for >> an F6 render. >> >> >> >> include <BOSL2/std.scad> >> include <BOSL2/isosurface.scad> >> h1 = 10; >> r1 = 25; >> r2 = 5; >> d1 = r1 * 2; >> isovalue = 1; >> voxel_size = 0.5; >> infl = 0.2; >> cut = 10; >> function tmat(ang) = move(cylindrical_to_xyz(r1,ang,0)); >> difference() { >> metaballs([ >> IDENT, mb_disk(h1,r1), >> up(r1-2), mb_sphere(r1*4, influence = 1, negative = true, cutoff = r1+2), >> for (ang = [0:45:315]) >> each [tmat(ang), mb_sphere(r2, influence = infl, negative = true, cutoff >> = cut)] >> ], >> voxel_size, [[-d1,-d1,-h1], [d1,d1,h1]], isovalue); >> text3d(h = h1/2, "BOSL2", size = 4, center = true); >> } >> >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >> >
RW
Raymond West
Sat, Feb 15, 2025 11:47 PM

I've attached my cadquery code from last September

On 15/02/2025 15:14, Sanjeev Prabhakar via Discuss wrote:

below is the python code and it takes around 19 sec to calculate:

from openscad2 import *
i_t=time.time()

etc.

I've attached my cadquery code from last September On 15/02/2025 15:14, Sanjeev Prabhakar via Discuss wrote: > below is the python code and it takes around 19 sec to calculate: > > from openscad2 import * > i_t=time.time() etc.
SP
Sanjeev Prabhakar
Sun, Feb 16, 2025 1:11 AM

Can you share the output image.
I am thinking of giving a try to cadquery.
Long back i tried,  but it was not very user friendly. Maybe something
would have changed since then

On Sun, 16 Feb, 2025, 5:17 am Raymond West via Discuss, <
discuss@lists.openscad.org> wrote:

I've attached my cadquery code from last September

On 15/02/2025 15:14, Sanjeev Prabhakar via Discuss wrote:

below is the python code and it takes around 19 sec to calculate:

from openscad2 import *
i_t=time.time()

etc.


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

Can you share the output image. I am thinking of giving a try to cadquery. Long back i tried, but it was not very user friendly. Maybe something would have changed since then On Sun, 16 Feb, 2025, 5:17 am Raymond West via Discuss, < discuss@lists.openscad.org> wrote: > I've attached my cadquery code from last September > > On 15/02/2025 15:14, Sanjeev Prabhakar via Discuss wrote: > > below is the python code and it takes around 19 sec to calculate: > > > > from openscad2 import * > > i_t=time.time() > etc. > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
RW
Raymond West
Sun, Feb 16, 2025 11:44 AM

I thought you may be interested, Sanjeev.

I installed the cq editor, but used it mainly for viewing the code that
I generated with visual studio code, since It does the automatic reload
and preview. I think I also generated the coin in openscad too, but not
found it yet.

On 16/02/2025 01:11, Sanjeev Prabhakar wrote:

Can you share the output image.
I am thinking of giving a try to cadquery.
Long back i tried,  but it was not very user friendly. Maybe something
would have changed since then

On Sun, 16 Feb, 2025, 5:17 am Raymond West via Discuss,
discuss@lists.openscad.org wrote:

 I've attached my cadquery code from last September

 On 15/02/2025 15:14, Sanjeev Prabhakar via Discuss wrote:

below is the python code and it takes around 19 sec to calculate:

from openscad2 import *
i_t=time.time()

 etc.

 _______________________________________________
 OpenSCAD mailing list
 To unsubscribe send an email to discuss-leave@lists.openscad.org
I thought you may be interested, Sanjeev. I installed the cq editor, but used it mainly for viewing the code that I generated with visual studio code, since It does the automatic reload and preview. I think I also generated the coin in openscad too, but not found it yet. On 16/02/2025 01:11, Sanjeev Prabhakar wrote: > Can you share the output image. > I am thinking of giving a try to cadquery. > Long back i tried,  but it was not very user friendly. Maybe something > would have changed since then > > > On Sun, 16 Feb, 2025, 5:17 am Raymond West via Discuss, > <discuss@lists.openscad.org> wrote: > > I've attached my cadquery code from last September > > On 15/02/2025 15:14, Sanjeev Prabhakar via Discuss wrote: > > below is the python code and it takes around 19 sec to calculate: > > > > from openscad2 import * > > i_t=time.time() > etc. > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
RW
Raymond West
Sun, Feb 16, 2025 6:16 PM

My openscad solution was posted on 4th March. I set the $fn value to a
higher value - it took 1.5 hours to render, and I posted the result on
5th March, 2024.

It's good to forget some things.

On 16/02/2025 11:44, Raymond West via Discuss wrote:

I thought you may be interested, Sanjeev.

I installed the cq editor, but used it mainly for viewing the code
that I generated with visual studio code, since It does the automatic
reload and preview. I think I also generated the coin in openscad too,
but not found it yet.

On 16/02/2025 01:11, Sanjeev Prabhakar wrote:

Can you share the output image.
I am thinking of giving a try to cadquery.
Long back i tried,  but it was not very user friendly. Maybe
something would have changed since then

On Sun, 16 Feb, 2025, 5:17 am Raymond West via Discuss,
discuss@lists.openscad.org wrote:

 I've attached my cadquery code from last September

 On 15/02/2025 15:14, Sanjeev Prabhakar via Discuss wrote:

below is the python code and it takes around 19 sec to calculate:

from openscad2 import *
i_t=time.time()

 etc.

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

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

My openscad solution was posted on 4th March. I set the $fn value to a higher value - it took 1.5 hours to render, and I posted the result on 5th March, 2024. It's good to forget some things. On 16/02/2025 11:44, Raymond West via Discuss wrote: > > I thought you may be interested, Sanjeev. > > I installed the cq editor, but used it mainly for viewing the code > that I generated with visual studio code, since It does the automatic > reload and preview. I think I also generated the coin in openscad too, > but not found it yet. > > On 16/02/2025 01:11, Sanjeev Prabhakar wrote: >> Can you share the output image. >> I am thinking of giving a try to cadquery. >> Long back i tried,  but it was not very user friendly. Maybe >> something would have changed since then >> >> >> On Sun, 16 Feb, 2025, 5:17 am Raymond West via Discuss, >> <discuss@lists.openscad.org> wrote: >> >> I've attached my cadquery code from last September >> >> On 15/02/2025 15:14, Sanjeev Prabhakar via Discuss wrote: >> > below is the python code and it takes around 19 sec to calculate: >> > >> > from openscad2 import * >> > i_t=time.time() >> etc. >> >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >> > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email todiscuss-leave@lists.openscad.org
BB
Bruno Boettcher
Sun, Feb 16, 2025 8:01 PM

I had already added your version to the github but forgot to push... It's
there now...
Bruno Böttcher

35 rue de la république, FR-6720 Schwindratzheim
email: bboett@adlp.org, mobile:bboett@gmail.com
Fon:+33 3 88 89 91, Mob:+33 6 76 55 82 68

Dev: dart/flutter/PHP OS:GNU/LINUX, Android
Aïkido: http://aikido.zorn.free.fr, http://www.aikido-club-saverne.fr

Raymond West via Discuss discuss@lists.openscad.org schrieb am So., 16.
Feb. 2025, 19:17:

My openscad solution was posted on 4th March. I set the $fn value to a
higher value - it took 1.5 hours to render, and I posted the result on 5th
March, 2024.

It's good to forget some things.

On 16/02/2025 11:44, Raymond West via Discuss wrote:

I thought you may be interested, Sanjeev.

I installed the cq editor, but used it mainly for viewing the code that I
generated with visual studio code, since It does the automatic reload and
preview. I think I also generated the coin in openscad too, but not found
it yet.
On 16/02/2025 01:11, Sanjeev Prabhakar wrote:

Can you share the output image.
I am thinking of giving a try to cadquery.
Long back i tried,  but it was not very user friendly. Maybe something
would have changed since then

On Sun, 16 Feb, 2025, 5:17 am Raymond West via Discuss, <
discuss@lists.openscad.org> wrote:

I've attached my cadquery code from last September

On 15/02/2025 15:14, Sanjeev Prabhakar via Discuss wrote:

below is the python code and it takes around 19 sec to calculate:

from openscad2 import *
i_t=time.time()

etc.


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

I had already added your version to the github but forgot to push... It's there now... Bruno Böttcher -- 35 rue de la république, FR-6720 Schwindratzheim email: bboett@adlp.org, mobile:bboett@gmail.com Fon:+33 3 88 89 91, Mob:+33 6 76 55 82 68 ------------------------------------------------- Dev: dart/flutter/PHP OS:GNU/LINUX, Android Aïkido: http://aikido.zorn.free.fr, http://www.aikido-club-saverne.fr Raymond West via Discuss <discuss@lists.openscad.org> schrieb am So., 16. Feb. 2025, 19:17: > My openscad solution was posted on 4th March. I set the $fn value to a > higher value - it took 1.5 hours to render, and I posted the result on 5th > March, 2024. > > It's good to forget some things. > > > On 16/02/2025 11:44, Raymond West via Discuss wrote: > > I thought you may be interested, Sanjeev. > > I installed the cq editor, but used it mainly for viewing the code that I > generated with visual studio code, since It does the automatic reload and > preview. I think I also generated the coin in openscad too, but not found > it yet. > On 16/02/2025 01:11, Sanjeev Prabhakar wrote: > > Can you share the output image. > I am thinking of giving a try to cadquery. > Long back i tried, but it was not very user friendly. Maybe something > would have changed since then > > > On Sun, 16 Feb, 2025, 5:17 am Raymond West via Discuss, < > discuss@lists.openscad.org> wrote: > >> I've attached my cadquery code from last September >> >> On 15/02/2025 15:14, Sanjeev Prabhakar via Discuss wrote: >> > below is the python code and it takes around 19 sec to calculate: >> > >> > from openscad2 import * >> > i_t=time.time() >> etc. >> >> _______________________________________________ >> 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
Mon, Feb 17, 2025 1:14 AM

Hi Ray,

Looks very neat. Also your ooenscad version.

Your idea of cutting cylinders and minkowsky for rounding the sharp edges
is quite effective.

I have got a good idea how to do that without minkowsky and will give it a
try today.

Regards

On Sun, 16 Feb, 2025, 5:15 pm Raymond West via Discuss, <
discuss@lists.openscad.org> wrote:

I thought you may be interested, Sanjeev.

I installed the cq editor, but used it mainly for viewing the code that I
generated with visual studio code, since It does the automatic reload and
preview. I think I also generated the coin in openscad too, but not found
it yet.
On 16/02/2025 01:11, Sanjeev Prabhakar wrote:

Can you share the output image.
I am thinking of giving a try to cadquery.
Long back i tried,  but it was not very user friendly. Maybe something
would have changed since then

On Sun, 16 Feb, 2025, 5:17 am Raymond West via Discuss, <
discuss@lists.openscad.org> wrote:

I've attached my cadquery code from last September

On 15/02/2025 15:14, Sanjeev Prabhakar via Discuss wrote:

below is the python code and it takes around 19 sec to calculate:

from openscad2 import *
i_t=time.time()

etc.


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 Ray, Looks very neat. Also your ooenscad version. Your idea of cutting cylinders and minkowsky for rounding the sharp edges is quite effective. I have got a good idea how to do that without minkowsky and will give it a try today. Regards On Sun, 16 Feb, 2025, 5:15 pm Raymond West via Discuss, < discuss@lists.openscad.org> wrote: > I thought you may be interested, Sanjeev. > > I installed the cq editor, but used it mainly for viewing the code that I > generated with visual studio code, since It does the automatic reload and > preview. I think I also generated the coin in openscad too, but not found > it yet. > On 16/02/2025 01:11, Sanjeev Prabhakar wrote: > > Can you share the output image. > I am thinking of giving a try to cadquery. > Long back i tried, but it was not very user friendly. Maybe something > would have changed since then > > > On Sun, 16 Feb, 2025, 5:17 am Raymond West via Discuss, < > discuss@lists.openscad.org> wrote: > >> I've attached my cadquery code from last September >> >> On 15/02/2025 15:14, Sanjeev Prabhakar via Discuss wrote: >> > below is the python code and it takes around 19 sec to calculate: >> > >> > from openscad2 import * >> > i_t=time.time() >> etc. >> >> _______________________________________________ >> 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 17, 2025 1:55 AM

here is another one inspired by RW. It takes 4 sec to calculate and render.

[image: Screenshot 2025-02-17 at 7.21.56 AM.png]

python code:

from openscad2 import *
i_t=time.time()

c1=circle(4,[-4,4])
c2=circle(50,[-20,55.9],s=200)
p0=[-15,0]
p1=tcct(4,50,[-4,4],[-20,55.9])
path=[[-15,0]]+lineFromPointTillEnd(c1,[-4,0],1)+lineFromStartTillPoint(c1,p1[0],1)+

lineFromPointToPointOnLine(flip(c2),p1[1],[-20,6],5)

sol=prism(circle(20,s=200),path)
sol1=translate([20,0,-1],linear_extrude(circle(4,s=200),12))
l1=ip_sol2sol(sol,sol1)
l2=ip_sol2sol(sol,sol1,-1)
l1=flip(l1)+l2
l2=o_3d(l1,sol,-1.5)
l3=o_3d(l1,sol1,-1.5)
f1=cpo(convert_3lines2fillet(l2,l3,l1))[:-1]
f2=surface_offset(f1,-1)
sol2=swp_prism_h(f2,f1)
with open('trial.scad','w+') as f:
f.write(f'''
include<dependencies2.scad>
//color("blue")for(p={[l1,l2,l3]})p_line3d(p,.2);
difference(){{
{swp(sol)}
for(i=[0:360/8:359])
rotate([0,0,i]){{
{swp(sol1)}
{swp_c(sol2)}
}}
}}

''')

f_t=time.time()
f_t-i_t

here is another one inspired by RW. It takes 4 sec to calculate and render. [image: Screenshot 2025-02-17 at 7.21.56 AM.png] python code: from openscad2 import * i_t=time.time() c1=circle(4,[-4,4]) c2=circle(50,[-20,55.9],s=200) p0=[-15,0] p1=tcct(4,50,[-4,4],[-20,55.9]) path=[[-15,0]]+lineFromPointTillEnd(c1,[-4,0],1)+lineFromStartTillPoint(c1,p1[0],1)+ \ lineFromPointToPointOnLine(flip(c2),p1[1],[-20,6],5) sol=prism(circle(20,s=200),path) sol1=translate([20,0,-1],linear_extrude(circle(4,s=200),12)) l1=ip_sol2sol(sol,sol1) l2=ip_sol2sol(sol,sol1,-1) l1=flip(l1)+l2 l2=o_3d(l1,sol,-1.5) l3=o_3d(l1,sol1,-1.5) f1=cpo(convert_3lines2fillet(l2,l3,l1))[:-1] f2=surface_offset(f1,-1) sol2=swp_prism_h(f2,f1) with open('trial.scad','w+') as f: f.write(f''' include<dependencies2.scad> //color("blue")for(p={[l1,l2,l3]})p_line3d(p,.2); difference(){{ {swp(sol)} for(i=[0:360/8:359]) rotate([0,0,i]){{ {swp(sol1)} {swp_c(sol2)} }} }} ''') f_t=time.time() f_t-i_t
R
richard@milewski.org
Fri, Feb 28, 2025 11:22 PM

Revised code to comply with changes in BOSL2 metaballs().

include <BOSL2/std.scad>
include <BOSL2/isosurface.scad>
h1 = 10;
r1 = 25;
r2 = 5;
v_size = 0.75;
N=7;
difference() {
metaballs([
IDENT, mb_disk(h1,r1),
up(r1-2), mb_sphere(r1*4, negative = true, cutoff = r1+2),
for(M=zrot_copies(n=N))
each [M*right(r1), mb_sphere(r2, influence = 0.2, negative = true, cutoff = 10)]
],
[[-r1,-r1,-h1/2], [r1,r1,h1/2]], v_size, show_stats = true);
text3d(h = h1/2, "BOSL2", size = 4, center = true);
}


Renders in 5 Seconds on an M3pro Mac Mini.

Revised code to comply with changes in BOSL2 metaballs().\ \ `include <BOSL2/std.scad>`\ `include <BOSL2/isosurface.scad>`\ `h1 = 10;`\ `r1 = 25;`\ `r2 = 5;`\ `v_size = 0.75;`\ `N=7;`\ `difference() {`\ ` metaballs([`\ ` IDENT, mb_disk(h1,r1), `\ ` up(r1-2), mb_sphere(r1*4, negative = true, cutoff = r1+2),`\ ` for(M=zrot_copies(n=N)) `\ ` each [M*right(r1), mb_sphere(r2, influence = 0.2, negative = true, cutoff = 10)]`\ ` ],`\ ` [[-r1,-r1,-h1/2], [r1,r1,h1/2]], v_size, show_stats = true);`\ ` text3d(h = h1/2, "BOSL2", size = 4, center = true); `\ `}`\ \ \ Renders in 5 Seconds on an M3pro Mac Mini.