BB
Bruno Boettcher
Fri, Mar 1, 2024 11:59 AM
Hello!
just stumbled across the next video about muses 3d CAD comparison....
so wanted to see if i could quickly hack that coin together with
openscad....
weeeell.....
as usual the chamfers are the problem.... I managed them in one dimension
(z) but my imagination lacks concerning the x/y plane..... if ever someone
wants to show me how it's done, with pleasure!
But the main problem is a performance problem:
i came so far:
innendd= 6;
akr=5;
kr=20;
exr = 14;
maker_coin(r=kr, or=akr, innerh=innendd)
{
linear_extrude(height=2*akr) text("OS", size= 10, halign = "center", valign
= "center");
}
// r= radius of the coin- outercircle diam, inner height
module maker_coin(r=kr, or=akr, innerh=innendd, exd=14)
{
difference()
{
maker_coin_body(r=kr, or=akr, innerh=innendd, exd=14);
translate([0,0,2]) children();
}
}
module maker_coin_body(r=kr, or=akr, innerh=innendd, exd=14)
{
resth = 2*or-innerh;
bigd = (r^2+resth^2)/resth; //euklidischer Höhensatz·
difference()
{
union()
{
cylinder(r=r, h=2*or);
translate([0,0,or]) rotate_extrude($fn=180)
translate([r,0,0])circle(r=or);
}
union()
{
translate([0,0,bigd/2+innerh]) sphere(d= bigd, $fa=1);
for(w=[0:360/8:360]) rotate([0,0,w])·
translate([r+2*or,0,-.1]) cutout(r=r, or=or, exd=exd);
}
}
}
module cutout(r=kr, or=akr, exd=14)
{
{
difference()
{
cylinder(d=1.5*exd,h=2*or+2,center= false, $fn=100);
cutr = or+0.2;
translate([0,0,cutr-.2])
rotate_extrude($fn=80)
translate([exd/2+cutr,0,0])
circle(r=cutr,$fn=60);
}
}
}
In fact everything went quite smooth until i rotated the cutout....
as soon as the for loop with the rotate went in (line 34) openscad gets
unbearably slow, with standard openscad unbearably so (the system thinks it
crashed...)
That didn't look so awful to me? So what happened?
and if we ( :D ) could offer a complete and easy to read example to send to
makers muse, that would make me happy :D the example on thingieverse is
well, on thingiverse, and does not comply completely to the requirements
given....
--
ciao
Bruno
---==========
http://nohkumado.eu/, http://bboett.free.frhttp://aikido.nohkumado.eu/,
http://bboett.free.fr
http://aikido.zorn.free.fr
Hello!
just stumbled across the next video about muses 3d CAD comparison....
so wanted to see if i could quickly hack that coin together with
openscad....
weeeell.....
as usual the chamfers are the problem.... I managed them in one dimension
(z) but my imagination lacks concerning the x/y plane..... if ever someone
wants to show me how it's done, with pleasure!
But the main problem is a performance problem:
i came so far:
```
innendd= 6;
akr=5;
kr=20;
exr = 14;
maker_coin(r=kr, or=akr, innerh=innendd)
{
linear_extrude(height=2*akr) text("OS", size= 10, halign = "center", valign
= "center");
}
// r= radius of the coin- outercircle diam, inner height
module maker_coin(r=kr, or=akr, innerh=innendd, exd=14)
{
difference()
{
maker_coin_body(r=kr, or=akr, innerh=innendd, exd=14);
translate([0,0,2]) children();
}
}
module maker_coin_body(r=kr, or=akr, innerh=innendd, exd=14)
{
resth = 2*or-innerh;
bigd = (r^2+resth^2)/resth; //euklidischer Höhensatz·
difference()
{
union()
{
cylinder(r=r, h=2*or);
translate([0,0,or]) rotate_extrude($fn=180)
translate([r,0,0])circle(r=or);
}
union()
{
translate([0,0,bigd/2+innerh]) sphere(d= bigd, $fa=1);
for(w=[0:360/8:360]) rotate([0,0,w])·
translate([r+2*or,0,-.1]) cutout(r=r, or=or, exd=exd);
}
}
}
module cutout(r=kr, or=akr, exd=14)
{
{
difference()
{
cylinder(d=1.5*exd,h=2*or+2,center= false, $fn=100);
cutr = or+0.2;
translate([0,0,cutr-.2])
rotate_extrude($fn=80)
translate([exd/2+cutr,0,0])
circle(r=cutr,$fn=60);
}
}
}
```
In fact everything went quite smooth until i rotated the cutout....
as soon as the for loop with the rotate went in (line 34) openscad gets
unbearably slow, with standard openscad unbearably so (the system thinks it
crashed...)
That didn't look so awful to me? So what happened?
and if we ( :D ) could offer a complete and easy to read example to send to
makers muse, that would make me happy :D the example on thingieverse is
well, on thingiverse, and does not comply completely to the requirements
given....
--
ciao
Bruno
===========================================
http://nohkumado.eu/, <http://bboett.free.fr>http://aikido.nohkumado.eu/,
<http://bboett.free.fr>
http://aikido.zorn.free.fr
JB
Jordan Brown
Fri, Mar 1, 2024 8:00 PM
Indeed, that performance is really awful. Turning on the experimental
vertex-object-renderer features helps a lot. For me, that alone took
preview performance on your model from unusable to sort-of-usable. But
still...
The first thing is easy. Repeat this mantra: use $fn only to create
regular polygons. To control circle quality, use $fa and $fs. $fa=2 /
$fs=1 seems like a reasonable setting here.
Also: screens are high resolution and really show faces. 3D printing
much less so. If you turn up your circle quality enough that your
displayed model looks really smooth, you probably have way more faces
than you really need for 3D printing. Experiment. Note also that you
can set the circle quality to some medium level while you're working,
and to high quality for your final render.
But that still leaves the preview performance pretty poor.
That leads us to a second and more difficult mantra: never do in 3D
what you can do in 2D.
You have the basic shape of the coin being a torus unioned with a
cylinder, with a sphere subtracted. But that's the same as a circle
unioned with a rectangle, with a circle subtracted, all
rotate-extruded. The shape that would be rotate-extruded is this:
That gets you the body of the coin, without anywhere near as many nasty
3D operations. (In particular, it avoids that big sphere with its
thousands and thousands of faces - in your design, it has ~26,000 faces.)
Similarly, you have cutout() being a cylinder with a torus subtracted.
But that's the same thing as a rectangle with a circle subtracted,
rotate-extruded. The shape that you are rotate-extruding is:
Also, you have a convexity problem on the linear-extruded text. A
convexity of four is probably enough, but five is definitely enough.
All that done, the performance gets pretty good.
Here's a preview of your model:
Here's a preview of mine:
Mine is a little lower circle resolution on the outside. My bet is that
the difference isn't visible in 3D printing, but experiment with $fs.
Setting $fs=0.5 looks like it's better resolution than yours, but it
gets significantly slower (not so much with the vertex-object stuff
turned on). Experiment with an actual printer. (Yours has 28K facets.
Mine with $fs=1 has 10K; with $fs=0.5 has 23K.) Here's mine with $fs=0.5:
On my system (i7-13700), yours F6-renders in 1m6s; mine with $fs=1
renders in 15s; with $fs=0.5 in 54s. But with the experimental Manifold
renderer, they're all sub-second. (Manifold is magic.)
If one wanted to optimize further, note that cutout() is a fully
cylindrical object, and only a small fraction of it is actually used for
the subtraction. You could use rotate_extrude's angle parameter to only
generate maybe a quarter of it. Those invisible negative faces have a
preview cost (and probably a rendering cost too). But that seems like
overkill.
Anyhow, there's some ideas. Here's my version.
$fa = 2;
$fs = 1;
innendd= 6;
akr=5;
kr=20;
exr = 14;
maker_coin(r=kr, or=akr, innerh=innendd, exd=exr) {
linear_extrude(height=2*akr, convexity=5)
text("OS", size= 10, halign = "center", valign = "center");
}
// r= radius of the coin- outercircle diam, inner height
module maker_coin(r, or, innerh, exd) {
difference() {
maker_coin_body(r=kr, or=akr, innerh=innendd, exd=exd);
translate([0,0,2]) children();
}
}
module maker_coin_body(r, or, innerh, exd) {
resth = 2or-innerh;
bigd = (r^2+resth^2)/resth; //euklidischer Höhensatz·
difference() {
union() {
rotate_extrude() {
difference() {
union() {
square([r, 2or]);
translate([r,or])circle(r=or);
}
translate([0,bigd/2 + innerh]) {
circle(d = bigd);
}
}
}
}
union() {
for(w=[0:360/8:360]) rotate([0,0,w])
translate([r+2*or,0,-.1]) cutout(r=r, or=or, exd=exd);
}
}
}
module cutout(r, or, exd) {
rotate_extrude() {
difference() {
square([0.75exd, 2or + 2]);
cutr = or+0.2;
translate([exd/2+cutr,cutr-0.2])
circle(r=cutr);
}
}
}
Indeed, that performance is really awful. Turning on the experimental
vertex-object-renderer features helps a lot. For me, that alone took
preview performance on your model from unusable to sort-of-usable. But
still...
The first thing is easy. Repeat this mantra: use $fn only to create
regular polygons. To control circle quality, use $fa and $fs. $fa=2 /
$fs=1 seems like a reasonable setting here.
Also: screens are high resolution and really show faces. 3D printing
much less so. If you turn up your circle quality enough that your
displayed model looks really smooth, you probably have way more faces
than you really need for 3D printing. Experiment. Note also that you
can set the circle quality to some medium level while you're working,
and to high quality for your final render.
But that still leaves the preview performance pretty poor.
That leads us to a second and more difficult mantra: never do in 3D
what you can do in 2D.
You have the basic shape of the coin being a torus unioned with a
cylinder, with a sphere subtracted. But that's the same as a circle
unioned with a rectangle, with a circle subtracted, all
rotate-extruded. The shape that would be rotate-extruded is this:
That gets you the body of the coin, without anywhere near as many nasty
3D operations. (In particular, it avoids that big sphere with its
thousands and thousands of faces - in your design, it has ~26,000 faces.)
Similarly, you have cutout() being a cylinder with a torus subtracted.
But that's the same thing as a rectangle with a circle subtracted,
rotate-extruded. The shape that you are rotate-extruding is:
Also, you have a convexity problem on the linear-extruded text. A
convexity of four is probably enough, but five is definitely enough.
All that done, the performance gets pretty good.
Here's a preview of your model:
Here's a preview of mine:
Mine is a little lower circle resolution on the outside. My bet is that
the difference isn't visible in 3D printing, but experiment with $fs.
Setting $fs=0.5 looks like it's better resolution than yours, but it
gets significantly slower (not so much with the vertex-object stuff
turned on). Experiment with an actual printer. (Yours has 28K facets.
Mine with $fs=1 has 10K; with $fs=0.5 has 23K.) Here's mine with $fs=0.5:
On my system (i7-13700), yours F6-renders in 1m6s; mine with $fs=1
renders in 15s; with $fs=0.5 in 54s. But with the experimental Manifold
renderer, they're all sub-second. (Manifold is magic.)
If one wanted to optimize further, note that cutout() is a fully
cylindrical object, and only a small fraction of it is actually used for
the subtraction. You could use rotate_extrude's angle parameter to only
generate maybe a quarter of it. Those invisible negative faces have a
preview cost (and probably a rendering cost too). But that seems like
overkill.
Anyhow, there's some ideas. Here's my version.
$fa = 2;
$fs = 1;
innendd= 6;
akr=5;
kr=20;
exr = 14;
maker_coin(r=kr, or=akr, innerh=innendd, exd=exr) {
linear_extrude(height=2*akr, convexity=5)
text("OS", size= 10, halign = "center", valign = "center");
}
// r= radius of the coin- outercircle diam, inner height
module maker_coin(r, or, innerh, exd) {
difference() {
maker_coin_body(r=kr, or=akr, innerh=innendd, exd=exd);
translate([0,0,2]) children();
}
}
module maker_coin_body(r, or, innerh, exd) {
resth = 2*or-innerh;
bigd = (r^2+resth^2)/resth; //euklidischer Höhensatz·
difference() {
union() {
rotate_extrude() {
difference() {
union() {
square([r, 2*or]);
translate([r,or])circle(r=or);
}
translate([0,bigd/2 + innerh]) {
circle(d = bigd);
}
}
}
}
union() {
for(w=[0:360/8:360]) rotate([0,0,w])
translate([r+2*or,0,-.1]) cutout(r=r, or=or, exd=exd);
}
}
}
module cutout(r, or, exd) {
rotate_extrude() {
difference() {
square([0.75*exd, 2*or + 2]);
cutr = or+0.2;
translate([exd/2+cutr,cutr-0.2])
circle(r=cutr);
}
}
}
K
Ken
Sat, Mar 2, 2024 2:46 AM
Thank you for this email Jordan- some excellent hints & tips in there
for neophytes like me. I have saved it in it's entirety for future
reference- especially for delving into the mysteries of children within
openscad.
On 2024-03-02 07:00, Jordan Brown via Discuss wrote:
Indeed, that performance is really awful. Turning on the experimental
vertex-object-renderer features helps a lot. For me, that alone took
preview performance on your model from unusable to sort-of-usable.
But still...
The first thing is easy. Repeat this mantra: use $fn only to create
regular polygons. To control circle quality, use $fa and $fs. $fa=2
/ $fs=1 seems like a reasonable setting here.
Also: screens are high resolution and really show faces. 3D printing
much less so. If you turn up your circle quality enough that your
displayed model looks really smooth, you probably have way more faces
than you really need for 3D printing. Experiment. Note also that you
can set the circle quality to some medium level while you're working,
and to high quality for your final render.
But that still leaves the preview performance pretty poor.
That leads us to a second and more difficult mantra: never do in 3D
what you can do in 2D.
You have the basic shape of the coin being a torus unioned with a
cylinder, with a sphere subtracted. But that's the same as a circle
unioned with a rectangle, with a circle subtracted, all
rotate-extruded. The shape that would be rotate-extruded is this:
That gets you the body of the coin, without anywhere near as many
nasty 3D operations. (In particular, it avoids that big sphere with
its thousands and thousands of faces - in your design, it has ~26,000
faces.)
Similarly, you have cutout() being a cylinder with a torus
subtracted. But that's the same thing as a rectangle with a circle
subtracted, rotate-extruded. The shape that you are rotate-extruding is:
Also, you have a convexity problem on the linear-extruded text. A
convexity of four is probably enough, but five is definitely enough.
All that done, the performance gets pretty good.
Here's a preview of your model:
Here's a preview of mine:
Mine is a little lower circle resolution on the outside. My bet is
that the difference isn't visible in 3D printing, but experiment with
$fs. Setting $fs=0.5 looks like it's better resolution than yours,
but it gets significantly slower (not so much with the vertex-object
stuff turned on). Experiment with an actual printer. (Yours has 28K
facets. Mine with $fs=1 has 10K; with $fs=0.5 has 23K.) Here's mine
with $fs=0.5:
On my system (i7-13700), yours F6-renders in 1m6s; mine with $fs=1
renders in 15s; with $fs=0.5 in 54s. But with the experimental
Manifold renderer, they're all sub-second. (Manifold is magic.)
If one wanted to optimize further, note that cutout() is a fully
cylindrical object, and only a small fraction of it is actually used
for the subtraction. You could use rotate_extrude's angle parameter
to only generate maybe a quarter of it. Those invisible negative
faces have a preview cost (and probably a rendering cost too). But
that seems like overkill.
Anyhow, there's some ideas. Here's my version.
$fa = 2;
$fs = 1;
innendd= 6;
akr=5;
kr=20;
exr = 14;
maker_coin(r=kr, or=akr, innerh=innendd, exd=exr) {
linear_extrude(height=2*akr, convexity=5)
text("OS", size= 10, halign = "center", valign = "center");
}
// r= radius of the coin- outercircle diam, inner height
module maker_coin(r, or, innerh, exd) {
difference() {
maker_coin_body(r=kr, or=akr, innerh=innendd, exd=exd);
translate([0,0,2]) children();
}
}
module maker_coin_body(r, or, innerh, exd) {
resth = 2or-innerh;
bigd = (r^2+resth^2)/resth; //euklidischer Höhensatz·
difference() {
union() {
rotate_extrude() {
difference() {
union() {
square([r, 2or]);
translate([r,or])circle(r=or);
}
translate([0,bigd/2 + innerh]) {
circle(d = bigd);
}
}
}
}
union() {
for(w=[0:360/8:360]) rotate([0,0,w])
translate([r+2*or,0,-.1]) cutout(r=r, or=or, exd=exd);
}
}
}
module cutout(r, or, exd) {
rotate_extrude() {
difference() {
square([0.75exd, 2or + 2]);
cutr = or+0.2;
translate([exd/2+cutr,cutr-0.2])
circle(r=cutr);
}
}
}
OpenSCAD mailing list
To unsubscribe send an email todiscuss-leave@lists.openscad.org
A baby can be defined as an ego with a noise at one end and a smell at the other.
Your job as parents is to teach them to control all three.
My job as a grandad is to tell you how you are doing it all wrong!
Thank you for this email Jordan- some excellent hints & tips in there
for neophytes like me. I have saved it in it's entirety for future
reference- especially for delving into the mysteries of children within
openscad.
On 2024-03-02 07:00, Jordan Brown via Discuss wrote:
> Indeed, that performance is really awful. Turning on the experimental
> vertex-object-renderer features helps a lot. For me, that alone took
> preview performance on your model from unusable to sort-of-usable.
> But still...
>
> The first thing is easy. Repeat this mantra: use $fn only to create
> regular polygons. To control circle quality, use $fa and $fs. $fa=2
> / $fs=1 seems like a reasonable setting here.
>
> Also: screens are high resolution and really show faces. 3D printing
> much less so. If you turn up your circle quality enough that your
> displayed model looks really smooth, you probably have way more faces
> than you really need for 3D printing. Experiment. Note also that you
> can set the circle quality to some medium level while you're working,
> and to high quality for your final render.
>
> But that still leaves the preview performance pretty poor.
>
> That leads us to a second and more difficult mantra: never do in 3D
> what you can do in 2D.
>
> You have the basic shape of the coin being a torus unioned with a
> cylinder, with a sphere subtracted. But that's the same as a circle
> unioned with a rectangle, with a circle subtracted, all
> rotate-extruded. The shape that would be rotate-extruded is this:
>
>
> That gets you the body of the coin, without anywhere near as many
> nasty 3D operations. (In particular, it avoids that big sphere with
> its thousands and thousands of faces - in your design, it has ~26,000
> faces.)
>
> Similarly, you have cutout() being a cylinder with a torus
> subtracted. But that's the same thing as a rectangle with a circle
> subtracted, rotate-extruded. The shape that you are rotate-extruding is:
>
>
> Also, you have a convexity problem on the linear-extruded text. A
> convexity of four is probably enough, but five is definitely enough.
>
> All that done, the performance gets pretty good.
>
> Here's a preview of your model:
>
>
> Here's a preview of mine:
>
>
> Mine is a little lower circle resolution on the outside. My bet is
> that the difference isn't visible in 3D printing, but experiment with
> $fs. Setting $fs=0.5 looks like it's better resolution than yours,
> but it gets significantly slower (not so much with the vertex-object
> stuff turned on). Experiment with an actual printer. (Yours has 28K
> facets. Mine with $fs=1 has 10K; with $fs=0.5 has 23K.) Here's mine
> with $fs=0.5:
>
>
> On my system (i7-13700), yours F6-renders in 1m6s; mine with $fs=1
> renders in 15s; with $fs=0.5 in 54s. But with the experimental
> Manifold renderer, they're all sub-second. (Manifold is magic.)
>
> If one wanted to optimize further, note that cutout() is a fully
> cylindrical object, and only a small fraction of it is actually used
> for the subtraction. You could use rotate_extrude's angle parameter
> to only generate maybe a quarter of it. Those invisible negative
> faces have a preview cost (and probably a rendering cost too). But
> that seems like overkill.
>
> Anyhow, there's some ideas. Here's my version.
>
> $fa = 2;
> $fs = 1;
> innendd= 6;
> akr=5;
> kr=20;
> exr = 14;
>
> maker_coin(r=kr, or=akr, innerh=innendd, exd=exr) {
> linear_extrude(height=2*akr, convexity=5)
> text("OS", size= 10, halign = "center", valign = "center");
> }
>
> // r= radius of the coin- outercircle diam, inner height
> module maker_coin(r, or, innerh, exd) {
> difference() {
> maker_coin_body(r=kr, or=akr, innerh=innendd, exd=exd);
> translate([0,0,2]) children();
> }
> }
>
> module maker_coin_body(r, or, innerh, exd) {
> resth = 2*or-innerh;
> bigd = (r^2+resth^2)/resth; //euklidischer Höhensatz·
> difference() {
> union() {
> rotate_extrude() {
> difference() {
> union() {
> square([r, 2*or]);
> translate([r,or])circle(r=or);
> }
> translate([0,bigd/2 + innerh]) {
> circle(d = bigd);
> }
> }
> }
> }
> union() {
> for(w=[0:360/8:360]) rotate([0,0,w])
> translate([r+2*or,0,-.1]) cutout(r=r, or=or, exd=exd);
> }
> }
> }
>
> module cutout(r, or, exd) {
> rotate_extrude() {
> difference() {
> square([0.75*exd, 2*or + 2]);
> cutr = or+0.2;
> translate([exd/2+cutr,cutr-0.2])
> circle(r=cutr);
> }
> }
> }
>
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email todiscuss-leave@lists.openscad.org
--
Cheers, Ken
bats059@gmail.com
https://vk7krj.com
https://vk7krj.com/running.html
----------------------------------------
A baby can be defined as an ego with a noise at one end and a smell at the other.
Your job as parents is to teach them to control all three.
My job as a grandad is to tell you how you are doing it all wrong!
BB
Bruno Boettcher
Sat, Mar 2, 2024 7:59 AM
Hello Jordan!
wow... thanks a lots for the very detailed analysis!
Am Fr., 1. März 2024 um 21:00 Uhr schrieb Jordan Brown <
openscad@jordan.maileater.net>:
Indeed, that performance is really awful. Turning on the experimental
vertex-object-renderer features helps a lot. For me, that alone took
preview performance on your model from unusable to sort-of-usable. But
still...
The first thing is easy. Repeat this mantra: use $fn only to create
regular polygons. To control circle quality, use $fa and $fs. $fa=2 /
$fs=1 seems like a reasonable setting here.
ok, indeed :D looks bad on the screen but you are right, the printer hasn't
that good of a resolution....
That leads us to a second and more difficult mantra: never do in 3D what
you can do in 2D.
will try to keep that in mind :D
You have the basic shape of the coin being a torus unioned with a
cylinder, with a sphere subtracted. But that's the same as a circle
unioned with a rectangle, with a circle subtracted, all rotate-extruded.
The shape that would be rotate-extruded is this:
that's also exactly what Angus did :'(
That gets you the body of the coin, without anywhere near as many nasty 3D
operations. (In particular, it avoids that big sphere with its thousands
and thousands of faces - in your design, it has ~26,000 faces.)
Similarly, you have cutout() being a cylinder with a torus subtracted.
But that's the same thing as a rectangle with a circle subtracted,
rotate-extruded.
hmmm since we are at it... a hint how to integrate directly also the
horizontal bevels to that shape?
Also, you have a convexity problem on the linear-extruded text. A
convexity of four is probably enough, but five is definitely enough.
oh.... never looked into convexity, but noticed the ugly artifacts...
On my system (i7-13700), yours F6-renders in 1m6s; mine with $fs=1 renders
in 15s; with $fs=0.5 in 54s. But with the experimental Manifold renderer,
they're all sub-second. (Manifold is magic.)
my system is definitely slower :D but nevermind, your version clearly is
the one to go with! thanks!
If one wanted to optimize further, note that cutout() is a fully
cylindrical object, and only a small fraction of it is actually used for
the subtraction. You could use rotate_extrude's angle parameter to only
generate maybe a quarter of it. Those invisible negative faces have a
preview cost (and probably a rendering cost too). But that seems like
overkill.
Hello Jordan!
wow... thanks a lots for the very detailed analysis!
Am Fr., 1. März 2024 um 21:00 Uhr schrieb Jordan Brown <
openscad@jordan.maileater.net>:
> Indeed, that performance is really awful. Turning on the experimental
> vertex-object-renderer features helps a lot. For me, that alone took
> preview performance on your model from unusable to sort-of-usable. But
> still...
>
> The first thing is easy. Repeat this mantra: use $fn only to create
> regular polygons. To control circle quality, use $fa and $fs. $fa=2 /
> $fs=1 seems like a reasonable setting here.
>
ok, indeed :D looks bad on the screen but you are right, the printer hasn't
that good of a resolution....
>
> That leads us to a second and more difficult mantra: never do in 3D what
> you can do in 2D.
>
will try to keep that in mind :D
>
> You have the basic shape of the coin being a torus unioned with a
> cylinder, with a sphere subtracted. But that's the same as a circle
> unioned with a rectangle, with a circle subtracted, all rotate-extruded.
> The shape that would be rotate-extruded is this:
>
> that's also exactly what Angus did :'(
>
> That gets you the body of the coin, without anywhere near as many nasty 3D
> operations. (In particular, it avoids that big sphere with its thousands
> and thousands of faces - in your design, it has ~26,000 faces.)
>
ok, think i get it.....
>
> Similarly, you have cutout() being a cylinder with a torus subtracted.
> But that's the same thing as a rectangle with a circle subtracted,
> rotate-extruded.
>
hmmm since we are at it... a hint how to integrate directly also the
horizontal bevels to that shape?
>
> Also, you have a convexity problem on the linear-extruded text. A
> convexity of four is probably enough, but five is definitely enough.
>
oh.... never looked into convexity, but noticed the ugly artifacts...
On my system (i7-13700), yours F6-renders in 1m6s; mine with $fs=1 renders
> in 15s; with $fs=0.5 in 54s. But with the experimental Manifold renderer,
> they're all sub-second. (Manifold is magic.)
>
my system is definitely slower :D but nevermind, your version clearly is
the one to go with! thanks!
>
> If one wanted to optimize further, note that cutout() is a fully
> cylindrical object, and only a small fraction of it is actually used for
> the subtraction. You could use rotate_extrude's angle parameter to only
> generate maybe a quarter of it. Those invisible negative faces have a
> preview cost (and probably a rendering cost too). But that seems like
> overkill.
>
nope, will look into that! seems logical..
but as said i still need to add also in x/y plane the bevel, and not really
knowing how to achieve that....
anyway thanks a lot, i will put this up later on github, for further
enhancements and review!
thanks a lot!
--
ciao
Bruno
===========================================
http://nohkumado.eu/, <http://bboett.free.fr>http://aikido.nohkumado.eu/,
<http://bboett.free.fr>
http://aikido.zorn.free.fr
BB
Bruno Boettcher
Sat, Mar 2, 2024 10:18 AM
Hello all,
will still work on that for
- limiting the cutouts to the necessary angles as Jordan suggested
- and have to somehow add the x/y bevel to the cutouts,
in the meantime, i put it up here:
https://github.com/nohkumado/opensource_makercoin for review, validation
suggestions (i used the images you kindly provided, Jordan, hope that's
ok?), and in a few day i will try to push it onto Angus :D
thanks!
Am Sa., 2. März 2024 um 08:59 Uhr schrieb Bruno Boettcher <bboett@gmail.com
Hello Jordan!
wow... thanks a lots for the very detailed analysis!
Am Fr., 1. März 2024 um 21:00 Uhr schrieb Jordan Brown <
openscad@jordan.maileater.net>:
Indeed, that performance is really awful. Turning on the experimental
vertex-object-renderer features helps a lot. For me, that alone took
preview performance on your model from unusable to sort-of-usable. But
still...
The first thing is easy. Repeat this mantra: use $fn only to create
regular polygons. To control circle quality, use $fa and $fs. $fa=2 /
$fs=1 seems like a reasonable setting here.
ok, indeed :D looks bad on the screen but you are right, the printer
hasn't that good of a resolution....
That leads us to a second and more difficult mantra: never do in 3D what
you can do in 2D.
will try to keep that in mind :D
You have the basic shape of the coin being a torus unioned with a
cylinder, with a sphere subtracted. But that's the same as a circle
unioned with a rectangle, with a circle subtracted, all rotate-extruded.
The shape that would be rotate-extruded is this:
that's also exactly what Angus did :'(
That gets you the body of the coin, without anywhere near as many nasty
3D operations. (In particular, it avoids that big sphere with its
thousands and thousands of faces - in your design, it has ~26,000 faces.)
Similarly, you have cutout() being a cylinder with a torus subtracted.
But that's the same thing as a rectangle with a circle subtracted,
rotate-extruded.
hmmm since we are at it... a hint how to integrate directly also the
horizontal bevels to that shape?
Also, you have a convexity problem on the linear-extruded text. A
convexity of four is probably enough, but five is definitely enough.
oh.... never looked into convexity, but noticed the ugly artifacts...
On my system (i7-13700), yours F6-renders in 1m6s; mine with $fs=1 renders
in 15s; with $fs=0.5 in 54s. But with the experimental Manifold renderer,
they're all sub-second. (Manifold is magic.)
my system is definitely slower :D but nevermind, your version clearly is
the one to go with! thanks!
If one wanted to optimize further, note that cutout() is a fully
cylindrical object, and only a small fraction of it is actually used for
the subtraction. You could use rotate_extrude's angle parameter to only
generate maybe a quarter of it. Those invisible negative faces have a
preview cost (and probably a rendering cost too). But that seems like
overkill.
Hello all,
will still work on that for
- limiting the cutouts to the necessary angles as Jordan suggested
- and have to somehow add the x/y bevel to the cutouts,
in the meantime, i put it up here:
https://github.com/nohkumado/opensource_makercoin for review, validation
suggestions (i used the images you kindly provided, Jordan, hope that's
ok?), and in a few day i will try to push it onto Angus :D
thanks!
Am Sa., 2. März 2024 um 08:59 Uhr schrieb Bruno Boettcher <bboett@gmail.com
>:
> Hello Jordan!
>
> wow... thanks a lots for the very detailed analysis!
>
>
> Am Fr., 1. März 2024 um 21:00 Uhr schrieb Jordan Brown <
> openscad@jordan.maileater.net>:
>
>> Indeed, that performance is really awful. Turning on the experimental
>> vertex-object-renderer features helps a lot. For me, that alone took
>> preview performance on your model from unusable to sort-of-usable. But
>> still...
>>
>> The first thing is easy. Repeat this mantra: use $fn only to create
>> regular polygons. To control circle quality, use $fa and $fs. $fa=2 /
>> $fs=1 seems like a reasonable setting here.
>>
> ok, indeed :D looks bad on the screen but you are right, the printer
> hasn't that good of a resolution....
>
>>
>> That leads us to a second and more difficult mantra: never do in 3D what
>> you can do in 2D.
>>
> will try to keep that in mind :D
>
>>
>> You have the basic shape of the coin being a torus unioned with a
>> cylinder, with a sphere subtracted. But that's the same as a circle
>> unioned with a rectangle, with a circle subtracted, all rotate-extruded.
>> The shape that would be rotate-extruded is this:
>>
>> that's also exactly what Angus did :'(
>
>
>>
>> That gets you the body of the coin, without anywhere near as many nasty
>> 3D operations. (In particular, it avoids that big sphere with its
>> thousands and thousands of faces - in your design, it has ~26,000 faces.)
>>
> ok, think i get it.....
>
>
>>
>> Similarly, you have cutout() being a cylinder with a torus subtracted.
>> But that's the same thing as a rectangle with a circle subtracted,
>> rotate-extruded.
>>
> hmmm since we are at it... a hint how to integrate directly also the
> horizontal bevels to that shape?
>
>
>>
>> Also, you have a convexity problem on the linear-extruded text. A
>> convexity of four is probably enough, but five is definitely enough.
>>
> oh.... never looked into convexity, but noticed the ugly artifacts...
>
> On my system (i7-13700), yours F6-renders in 1m6s; mine with $fs=1 renders
>> in 15s; with $fs=0.5 in 54s. But with the experimental Manifold renderer,
>> they're all sub-second. (Manifold is magic.)
>>
> my system is definitely slower :D but nevermind, your version clearly is
> the one to go with! thanks!
>
>
>
>>
>> If one wanted to optimize further, note that cutout() is a fully
>> cylindrical object, and only a small fraction of it is actually used for
>> the subtraction. You could use rotate_extrude's angle parameter to only
>> generate maybe a quarter of it. Those invisible negative faces have a
>> preview cost (and probably a rendering cost too). But that seems like
>> overkill.
>>
> nope, will look into that! seems logical..
> but as said i still need to add also in x/y plane the bevel, and not
> really knowing how to achieve that....
>
> anyway thanks a lot, i will put this up later on github, for further
> enhancements and review!
> thanks a lot!
>
> --
> ciao
> Bruno
>
> ===========================================
> http://nohkumado.eu/, <http://bboett.free.fr>http://aikido.nohkumado.eu/,
> <http://bboett.free.fr>
> http://aikido.zorn.free.fr
>
--
ciao
Bruno
===========================================
http://nohkumado.eu/, <http://bboett.free.fr>http://aikido.nohkumado.eu/,
<http://bboett.free.fr>
http://aikido.zorn.free.fr
RW
Raymond West
Sat, Mar 2, 2024 12:09 PM
As well as the fillets, there is the problem of smoothing out the curve
in the top surface, to make it a 'tangent to the rim'. The gui interface
of most cad programs allow a tangent to be applied, or interactive
manual adjustment, since you can draw with lines, interactively pull
them about. In openscad you have to specify the locations. I think it is
achievable by trial and error, or by some mathematical calculations,
beyond my pay grade.. Wrt the fillet, I think it may be simpler? to
create it included with the 14d cylinder which is to be subtracted, as
a sort of curved lip. This could be done, by creating a thin outline,
apply Minkowski with a 2mm radius, and subtract from a shape which
included the 14d cylinder. A lot of effort, but doable, even if slow as
treacle. But, the advantage is, it is all Parametric. Also, many of the
Makersmuse attempts were unable to do filleting. It's been some time,
but I have previously imported scad files into freecad, just to get the
filleting done. Freecad is very good at that, being able to select the
edges, radius for each edge, etc.
I suppose I need to test my 'theories'.
Best wishes,
Ray
On 02/03/2024 10:18, Bruno Boettcher via Discuss wrote:
Hello all,
will still work on that for
- limiting the cutouts to the necessary angles as Jordan suggested
- and have to somehow add the x/y bevel to the cutouts,
in the meantime, i put it up here:
https://github.com/nohkumado/opensource_makercoin for review,
validation suggestions (i used the images you kindly provided, Jordan,
hope that's ok?), and in a few day i will try to push it onto Angus :D
thanks!
Am Sa., 2. März 2024 um 08:59 Uhr schrieb Bruno Boettcher
bboett@gmail.com:
Hello Jordan!
wow... thanks a lots for the very detailed analysis!
Am Fr., 1. März 2024 um 21:00 Uhr schrieb Jordan Brown
<openscad@jordan.maileater.net>:
Indeed, that performance is really awful. Turning on the
experimental vertex-object-renderer features helps a lot. For
me, that alone took preview performance on your model from
unusable to sort-of-usable. But still...
The first thing is easy. Repeat this mantra: use $fn only to
create regular polygons. To control circle quality, use $fa
and $fs. $fa=2 / $fs=1 seems like a reasonable setting here.
ok, indeed :D looks bad on the screen but you are right, the
printer hasn't that good of a resolution....
That leads us to a second and more difficult mantra: never do
in 3D what you can do in 2D.
will try to keep that in mind :D
You have the basic shape of the coin being a torus unioned
with a cylinder, with a sphere subtracted. But that's the same
as a circle unioned with a rectangle, with a circle
subtracted, all rotate-extruded. The shape that would be
rotate-extruded is this:
that's also exactly what Angus did :'(
That gets you the body of the coin, without anywhere near as
many nasty 3D operations. (In particular, it avoids that big
sphere with its thousands and thousands of faces - in your
design, it has ~26,000 faces.)
ok, think i get it.....
Similarly, you have cutout() being a cylinder with a torus
subtracted. But that's the same thing as a rectangle with a
circle subtracted, rotate-extruded.
hmmm since we are at it... a hint how to integrate directly also
the horizontal bevels to that shape?
Also, you have a convexity problem on the linear-extruded
text. A convexity of four is probably enough, but five is
definitely enough.
oh.... never looked into convexity, but noticed the ugly artifacts...
On my system (i7-13700), yours F6-renders in 1m6s; mine with
$fs=1 renders in 15s; with $fs=0.5 in 54s. But with the
experimental Manifold renderer, they're all sub-second.
(Manifold is magic.)
my system is definitely slower :D but nevermind, your version
clearly is the one to go with! thanks!
If one wanted to optimize further, note that cutout() is a
fully cylindrical object, and only a small fraction of it is
actually used for the subtraction. You could use
rotate_extrude's angle parameter to only generate maybe a
quarter of it. Those invisible negative faces have a preview
cost (and probably a rendering cost too). But that seems like
overkill.
nope, will look into that! seems logical..
but as said i still need to add also in x/y plane the bevel, and
not really knowing how to achieve that....
anyway thanks a lot, i will put this up later on github, for
further enhancements and review!
thanks a lot!
--
ciao
Bruno
---==========
http://nohkumado.eu/,
http://bboett.free.frhttp://aikido.nohkumado.eu/,
http://bboett.free.fr
http://aikido.zorn.free.fr
--
ciao
Bruno
---==========
http://nohkumado.eu/,
http://bboett.free.frhttp://aikido.nohkumado.eu/,
http://bboett.free.fr
http://aikido.zorn.free.fr
OpenSCAD mailing list
To unsubscribe send an email todiscuss-leave@lists.openscad.org
As well as the fillets, there is the problem of smoothing out the curve
in the top surface, to make it a 'tangent to the rim'. The gui interface
of most cad programs allow a tangent to be applied, or interactive
manual adjustment, since you can draw with lines, interactively pull
them about. In openscad you have to specify the locations. I think it is
achievable by trial and error, or by some mathematical calculations,
beyond my pay grade.. Wrt the fillet, I think it may be simpler? to
create it included with the 14d cylinder which is to be subtracted, as
a sort of curved lip. This could be done, by creating a thin outline,
apply Minkowski with a 2mm radius, and subtract from a shape which
included the 14d cylinder. A lot of effort, but doable, even if slow as
treacle. But, the advantage is, it is all Parametric. Also, many of the
Makersmuse attempts were unable to do filleting. It's been some time,
but I have previously imported scad files into freecad, just to get the
filleting done. Freecad is very good at that, being able to select the
edges, radius for each edge, etc.
I suppose I need to test my 'theories'.
Best wishes,
Ray
On 02/03/2024 10:18, Bruno Boettcher via Discuss wrote:
> Hello all,
> will still work on that for
> - limiting the cutouts to the necessary angles as Jordan suggested
> - and have to somehow add the x/y bevel to the cutouts,
>
> in the meantime, i put it up here:
> https://github.com/nohkumado/opensource_makercoin for review,
> validation suggestions (i used the images you kindly provided, Jordan,
> hope that's ok?), and in a few day i will try to push it onto Angus :D
>
> thanks!
>
>
>
> Am Sa., 2. März 2024 um 08:59 Uhr schrieb Bruno Boettcher
> <bboett@gmail.com>:
>
> Hello Jordan!
>
> wow... thanks a lots for the very detailed analysis!
>
>
> Am Fr., 1. März 2024 um 21:00 Uhr schrieb Jordan Brown
> <openscad@jordan.maileater.net>:
>
> Indeed, that performance is really awful. Turning on the
> experimental vertex-object-renderer features helps a lot. For
> me, that alone took preview performance on your model from
> unusable to sort-of-usable. But still...
>
> The first thing is easy. Repeat this mantra: use $fn only to
> create regular polygons. To control circle quality, use $fa
> and $fs. $fa=2 / $fs=1 seems like a reasonable setting here.
>
> ok, indeed :D looks bad on the screen but you are right, the
> printer hasn't that good of a resolution....
>
>
> That leads us to a second and more difficult mantra: never do
> in 3D what you can do in 2D.
>
> will try to keep that in mind :D
>
>
> You have the basic shape of the coin being a torus unioned
> with a cylinder, with a sphere subtracted. But that's the same
> as a circle unioned with a rectangle, with a circle
> subtracted, all rotate-extruded. The shape that would be
> rotate-extruded is this:
>
> that's also exactly what Angus did :'(
>
>
> That gets you the body of the coin, without anywhere near as
> many nasty 3D operations. (In particular, it avoids that big
> sphere with its thousands and thousands of faces - in your
> design, it has ~26,000 faces.)
>
> ok, think i get it.....
>
>
> Similarly, you have cutout() being a cylinder with a torus
> subtracted. But that's the same thing as a rectangle with a
> circle subtracted, rotate-extruded.
>
> hmmm since we are at it... a hint how to integrate directly also
> the horizontal bevels to that shape?
>
>
>
> Also, you have a convexity problem on the linear-extruded
> text. A convexity of four is probably enough, but five is
> definitely enough.
>
> oh.... never looked into convexity, but noticed the ugly artifacts...
>
> On my system (i7-13700), yours F6-renders in 1m6s; mine with
> $fs=1 renders in 15s; with $fs=0.5 in 54s. But with the
> experimental Manifold renderer, they're all sub-second.
> (Manifold is magic.)
>
> my system is definitely slower :D but nevermind, your version
> clearly is the one to go with! thanks!
>
>
>
> If one wanted to optimize further, note that cutout() is a
> fully cylindrical object, and only a small fraction of it is
> actually used for the subtraction. You could use
> rotate_extrude's angle parameter to only generate maybe a
> quarter of it. Those invisible negative faces have a preview
> cost (and probably a rendering cost too). But that seems like
> overkill.
>
> nope, will look into that! seems logical..
> but as said i still need to add also in x/y plane the bevel, and
> not really knowing how to achieve that....
>
> anyway thanks a lot, i will put this up later on github, for
> further enhancements and review!
> thanks a lot!
>
> --
> ciao
> Bruno
>
> ===========================================
> http://nohkumado.eu/,
> <http://bboett.free.fr>http://aikido.nohkumado.eu/,
> <http://bboett.free.fr>
> http://aikido.zorn.free.fr
>
>
>
> --
> ciao
> Bruno
>
> ===========================================
> http://nohkumado.eu/,
> <http://bboett.free.fr>http://aikido.nohkumado.eu/,
> <http://bboett.free.fr>
> http://aikido.zorn.free.fr
>
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email todiscuss-leave@lists.openscad.org
RW
Raymond West
Sat, Mar 2, 2024 1:19 PM
/*
the first, module profile, just the 20,6 square and the 5r circle
next find the large circle by trial and error. the centre will be
on the y axis (x=0) , and diameter will be the y value - 6
then that will need to be subtracted from the 20,6 square and the
5r circle, and something else, to give the smooth transition.
The something else, by trial and error is a 17.8 square.
useful to use # to give some f5 transparency
If i knew the maths, then trial and error could be
replaced by calculations, allowing a parametric result.
*/
$fn=100;
module profile(){
square([20,6]);
square (17.8);
translate([20,5]) circle(r=5);
}
module profile2(){
difference(){
profile();
# translate ([0,53.14]) circle(r=47.15);
}
}
On 02/03/2024 12:09, Raymond West via Discuss wrote:
As well as the fillets, there is the problem of smoothing out the
curve in the top surface, to make it a 'tangent to the rim'. The gui
interface of most cad programs allow a tangent to be applied, or
interactive manual adjustment, since you can draw with lines,
interactively pull them about. In openscad you have to specify the
locations. I think it is achievable by trial and error, or by some
mathematical calculations, beyond my pay grade.. Wrt the fillet, I
think it may be simpler? to create it included with the 14d cylinder
which is to be subtracted, as a sort of curved lip. This could be
done, by creating a thin outline, apply Minkowski with a 2mm radius,
and subtract from a shape which included the 14d cylinder. A lot of
effort, but doable, even if slow as treacle. But, the advantage is, it
is all Parametric. Also, many of the Makersmuse attempts were unable
to do filleting. It's been some time, but I have previously imported
scad files into freecad, just to get the filleting done. Freecad is
very good at that, being able to select the edges, radius for each
edge, etc.
I suppose I need to test my 'theories'.
Best wishes,
Ray
On 02/03/2024 10:18, Bruno Boettcher via Discuss wrote:
Hello all,
will still work on that for
- limiting the cutouts to the necessary angles as Jordan suggested
- and have to somehow add the x/y bevel to the cutouts,
in the meantime, i put it up here:
https://github.com/nohkumado/opensource_makercoin for review,
validation suggestions (i used the images you kindly provided,
Jordan, hope that's ok?), and in a few day i will try to push it onto
Angus :D
thanks!
Am Sa., 2. März 2024 um 08:59 Uhr schrieb Bruno Boettcher
bboett@gmail.com:
Hello Jordan!
wow... thanks a lots for the very detailed analysis!
Am Fr., 1. März 2024 um 21:00 Uhr schrieb Jordan Brown
<openscad@jordan.maileater.net>:
Indeed, that performance is really awful. Turning on the
experimental vertex-object-renderer features helps a lot.
For me, that alone took preview performance on your model
from unusable to sort-of-usable. But still...
The first thing is easy. Repeat this mantra: use $fn only
to create regular polygons. To control circle quality, use
$fa and $fs. $fa=2 / $fs=1 seems like a reasonable setting here.
ok, indeed :D looks bad on the screen but you are right, the
printer hasn't that good of a resolution....
That leads us to a second and more difficult mantra: never
do in 3D what you can do in 2D.
will try to keep that in mind :D
You have the basic shape of the coin being a torus unioned
with a cylinder, with a sphere subtracted. But that's the
same as a circle unioned with a rectangle, with a circle
subtracted, all rotate-extruded. The shape that would be
rotate-extruded is this:
that's also exactly what Angus did :'(
That gets you the body of the coin, without anywhere near as
many nasty 3D operations. (In particular, it avoids that big
sphere with its thousands and thousands of faces - in your
design, it has ~26,000 faces.)
ok, think i get it.....
Similarly, you have cutout() being a cylinder with a torus
subtracted. But that's the same thing as a rectangle with a
circle subtracted, rotate-extruded.
hmmm since we are at it... a hint how to integrate directly also
the horizontal bevels to that shape?
Also, you have a convexity problem on the linear-extruded
text. A convexity of four is probably enough, but five is
definitely enough.
oh.... never looked into convexity, but noticed the ugly artifacts...
On my system (i7-13700), yours F6-renders in 1m6s; mine with
$fs=1 renders in 15s; with $fs=0.5 in 54s. But with the
experimental Manifold renderer, they're all sub-second.
(Manifold is magic.)
my system is definitely slower :D but nevermind, your version
clearly is the one to go with! thanks!
If one wanted to optimize further, note that cutout() is a
fully cylindrical object, and only a small fraction of it is
actually used for the subtraction. You could use
rotate_extrude's angle parameter to only generate maybe a
quarter of it. Those invisible negative faces have a preview
cost (and probably a rendering cost too). But that seems
like overkill.
nope, will look into that! seems logical..
but as said i still need to add also in x/y plane the bevel, and
not really knowing how to achieve that....
anyway thanks a lot, i will put this up later on github, for
further enhancements and review!
thanks a lot!
--
ciao
Bruno
---==========
http://nohkumado.eu/,
http://bboett.free.frhttp://aikido.nohkumado.eu/,
http://bboett.free.fr
http://aikido.zorn.free.fr
--
ciao
Bruno
---==========
http://nohkumado.eu/,
http://bboett.free.frhttp://aikido.nohkumado.eu/,
http://bboett.free.fr
http://aikido.zorn.free.fr
OpenSCAD mailing list
To unsubscribe send an email todiscuss-leave@lists.openscad.org
/*
the first, module profile, just the 20,6 square and the 5r circle
next find the large circle by trial and error. the centre will be
on the y axis (x=0) , and diameter will be the y value - 6
then that will need to be subtracted from the 20,6 square and the
5r circle, and something else, to give the smooth transition.
The something else, by trial and error is a 17.8 square.
useful to use # to give some f5 transparency
If i knew the maths, then trial and error could be
replaced by calculations, allowing a parametric result.
*/
$fn=100;
module profile(){
square([20,6]);
square (17.8);
translate([20,5]) circle(r=5);
}
module profile2(){
difference(){
profile();
# translate ([0,53.14]) circle(r=47.15);
}
}
On 02/03/2024 12:09, Raymond West via Discuss wrote:
>
> As well as the fillets, there is the problem of smoothing out the
> curve in the top surface, to make it a 'tangent to the rim'. The gui
> interface of most cad programs allow a tangent to be applied, or
> interactive manual adjustment, since you can draw with lines,
> interactively pull them about. In openscad you have to specify the
> locations. I think it is achievable by trial and error, or by some
> mathematical calculations, beyond my pay grade.. Wrt the fillet, I
> think it may be simpler? to create it included with the 14d cylinder
> which is to be subtracted, as a sort of curved lip. This could be
> done, by creating a thin outline, apply Minkowski with a 2mm radius,
> and subtract from a shape which included the 14d cylinder. A lot of
> effort, but doable, even if slow as treacle. But, the advantage is, it
> is all Parametric. Also, many of the Makersmuse attempts were unable
> to do filleting. It's been some time, but I have previously imported
> scad files into freecad, just to get the filleting done. Freecad is
> very good at that, being able to select the edges, radius for each
> edge, etc.
>
> I suppose I need to test my 'theories'.
>
> Best wishes,
>
> Ray
>
> On 02/03/2024 10:18, Bruno Boettcher via Discuss wrote:
>> Hello all,
>> will still work on that for
>> - limiting the cutouts to the necessary angles as Jordan suggested
>> - and have to somehow add the x/y bevel to the cutouts,
>>
>> in the meantime, i put it up here:
>> https://github.com/nohkumado/opensource_makercoin for review,
>> validation suggestions (i used the images you kindly provided,
>> Jordan, hope that's ok?), and in a few day i will try to push it onto
>> Angus :D
>>
>> thanks!
>>
>>
>>
>> Am Sa., 2. März 2024 um 08:59 Uhr schrieb Bruno Boettcher
>> <bboett@gmail.com>:
>>
>> Hello Jordan!
>>
>> wow... thanks a lots for the very detailed analysis!
>>
>>
>> Am Fr., 1. März 2024 um 21:00 Uhr schrieb Jordan Brown
>> <openscad@jordan.maileater.net>:
>>
>> Indeed, that performance is really awful. Turning on the
>> experimental vertex-object-renderer features helps a lot.
>> For me, that alone took preview performance on your model
>> from unusable to sort-of-usable. But still...
>>
>> The first thing is easy. Repeat this mantra: use $fn only
>> to create regular polygons. To control circle quality, use
>> $fa and $fs. $fa=2 / $fs=1 seems like a reasonable setting here.
>>
>> ok, indeed :D looks bad on the screen but you are right, the
>> printer hasn't that good of a resolution....
>>
>>
>> That leads us to a second and more difficult mantra: never
>> do in 3D what you can do in 2D.
>>
>> will try to keep that in mind :D
>>
>>
>> You have the basic shape of the coin being a torus unioned
>> with a cylinder, with a sphere subtracted. But that's the
>> same as a circle unioned with a rectangle, with a circle
>> subtracted, all rotate-extruded. The shape that would be
>> rotate-extruded is this:
>>
>> that's also exactly what Angus did :'(
>>
>>
>> That gets you the body of the coin, without anywhere near as
>> many nasty 3D operations. (In particular, it avoids that big
>> sphere with its thousands and thousands of faces - in your
>> design, it has ~26,000 faces.)
>>
>> ok, think i get it.....
>>
>>
>> Similarly, you have cutout() being a cylinder with a torus
>> subtracted. But that's the same thing as a rectangle with a
>> circle subtracted, rotate-extruded.
>>
>> hmmm since we are at it... a hint how to integrate directly also
>> the horizontal bevels to that shape?
>>
>>
>>
>> Also, you have a convexity problem on the linear-extruded
>> text. A convexity of four is probably enough, but five is
>> definitely enough.
>>
>> oh.... never looked into convexity, but noticed the ugly artifacts...
>>
>> On my system (i7-13700), yours F6-renders in 1m6s; mine with
>> $fs=1 renders in 15s; with $fs=0.5 in 54s. But with the
>> experimental Manifold renderer, they're all sub-second.
>> (Manifold is magic.)
>>
>> my system is definitely slower :D but nevermind, your version
>> clearly is the one to go with! thanks!
>>
>>
>>
>> If one wanted to optimize further, note that cutout() is a
>> fully cylindrical object, and only a small fraction of it is
>> actually used for the subtraction. You could use
>> rotate_extrude's angle parameter to only generate maybe a
>> quarter of it. Those invisible negative faces have a preview
>> cost (and probably a rendering cost too). But that seems
>> like overkill.
>>
>> nope, will look into that! seems logical..
>> but as said i still need to add also in x/y plane the bevel, and
>> not really knowing how to achieve that....
>>
>> anyway thanks a lot, i will put this up later on github, for
>> further enhancements and review!
>> thanks a lot!
>>
>> --
>> ciao
>> Bruno
>>
>> ===========================================
>> http://nohkumado.eu/,
>> <http://bboett.free.fr>http://aikido.nohkumado.eu/,
>> <http://bboett.free.fr>
>> http://aikido.zorn.free.fr
>>
>>
>>
>> --
>> ciao
>> Bruno
>>
>> ===========================================
>> http://nohkumado.eu/,
>> <http://bboett.free.fr>http://aikido.nohkumado.eu/,
>> <http://bboett.free.fr>
>> http://aikido.zorn.free.fr
>>
>> _______________________________________________
>> OpenSCAD mailing list
>> To unsubscribe send an email todiscuss-leave@lists.openscad.org
>
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email todiscuss-leave@lists.openscad.org
J
jon
Sat, Mar 2, 2024 2:02 PM
The BOSL2 library has a number of modules that create geometry that is
tangent to other geometry. Maybe that would help make this parametric.
On 3/2/2024 8:19 AM, Raymond West via Discuss wrote:
/*
the first, module profile, just the 20,6 square and the 5r circle
next find the large circle by trial and error. the centre will be
on the y axis (x=0) , and diameter will be the y value - 6
then that will need to be subtracted from the 20,6 square and the
5r circle, and something else, to give the smooth transition.
The something else, by trial and error is a 17.8 square.
useful to use # to give some f5 transparency
If i knew the maths, then trial and error could be
replaced by calculations, allowing a parametric result.
*/
$fn=100;
module profile(){
square([20,6]);
square (17.8);
translate([20,5]) circle(r=5);
}
module profile2(){
difference(){
profile();
# translate ([0,53.14]) circle(r=47.15);
}
}
On 02/03/2024 12:09, Raymond West via Discuss wrote:
As well as the fillets, there is the problem of smoothing out the
curve in the top surface, to make it a 'tangent to the rim'. The gui
interface of most cad programs allow a tangent to be applied, or
interactive manual adjustment, since you can draw with lines,
interactively pull them about. In openscad you have to specify the
locations. I think it is achievable by trial and error, or by some
mathematical calculations, beyond my pay grade.. Wrt the fillet, I
think it may be simpler? to create it included with the 14d cylinder
which is to be subtracted, as a sort of curved lip. This could be
done, by creating a thin outline, apply Minkowski with a 2mm radius,
and subtract from a shape which included the 14d cylinder. A lot of
effort, but doable, even if slow as treacle. But, the advantage is,
it is all Parametric. Also, many of the Makersmuse attempts were
unable to do filleting. It's been some time, but I have previously
imported scad files into freecad, just to get the filleting done.
Freecad is very good at that, being able to select the edges, radius
for each edge, etc.
I suppose I need to test my 'theories'.
Best wishes,
Ray
On 02/03/2024 10:18, Bruno Boettcher via Discuss wrote:
Hello all,
will still work on that for
- limiting the cutouts to the necessary angles as Jordan suggested
- and have to somehow add the x/y bevel to the cutouts,
in the meantime, i put it up here:
https://github.com/nohkumado/opensource_makercoin for review,
validation suggestions (i used the images you kindly provided,
Jordan, hope that's ok?), and in a few day i will try to push it
onto Angus :D
thanks!
Am Sa., 2. März 2024 um 08:59 Uhr schrieb Bruno Boettcher
bboett@gmail.com:
Hello Jordan!
wow... thanks a lots for the very detailed analysis!
Am Fr., 1. März 2024 um 21:00 Uhr schrieb Jordan Brown
<openscad@jordan.maileater.net>:
Indeed, that performance is really awful. Turning on the
experimental vertex-object-renderer features helps a lot.
For me, that alone took preview performance on your model
from unusable to sort-of-usable. But still...
The first thing is easy. Repeat this mantra: use $fn only
to create regular polygons. To control circle quality, use
$fa and $fs. $fa=2 / $fs=1 seems like a reasonable setting
here.
ok, indeed :D looks bad on the screen but you are right, the
printer hasn't that good of a resolution....
That leads us to a second and more difficult mantra: never
do in 3D what you can do in 2D.
will try to keep that in mind :D
You have the basic shape of the coin being a torus unioned
with a cylinder, with a sphere subtracted. But that's the
same as a circle unioned with a rectangle, with a circle
subtracted, all rotate-extruded. The shape that would be
rotate-extruded is this:
that's also exactly what Angus did :'(
That gets you the body of the coin, without anywhere near as
many nasty 3D operations. (In particular, it avoids that
big sphere with its thousands and thousands of faces - in
your design, it has ~26,000 faces.)
ok, think i get it.....
Similarly, you have cutout() being a cylinder with a torus
subtracted. But that's the same thing as a rectangle with a
circle subtracted, rotate-extruded.
hmmm since we are at it... a hint how to integrate directly also
the horizontal bevels to that shape?
Also, you have a convexity problem on the linear-extruded
text. A convexity of four is probably enough, but five is
definitely enough.
oh.... never looked into convexity, but noticed the ugly
artifacts...
On my system (i7-13700), yours F6-renders in 1m6s; mine with
$fs=1 renders in 15s; with $fs=0.5 in 54s. But with the
experimental Manifold renderer, they're all sub-second.
(Manifold is magic.)
my system is definitely slower :D but nevermind, your version
clearly is the one to go with! thanks!
If one wanted to optimize further, note that cutout() is a
fully cylindrical object, and only a small fraction of it is
actually used for the subtraction. You could use
rotate_extrude's angle parameter to only generate maybe a
quarter of it. Those invisible negative faces have a preview
cost (and probably a rendering cost too). But that seems
like overkill.
nope, will look into that! seems logical..
but as said i still need to add also in x/y plane the bevel, and
not really knowing how to achieve that....
anyway thanks a lot, i will put this up later on github, for
further enhancements and review!
thanks a lot!
--
ciao
Bruno
---==========
http://nohkumado.eu/,
http://bboett.free.frhttp://aikido.nohkumado.eu/,
http://bboett.free.fr
http://aikido.zorn.free.fr
--
ciao
Bruno
---==========
http://nohkumado.eu/,
http://bboett.free.frhttp://aikido.nohkumado.eu/,
http://bboett.free.fr
http://aikido.zorn.free.fr
OpenSCAD mailing list
To unsubscribe send an email todiscuss-leave@lists.openscad.org
--
This email has been checked for viruses by AVG antivirus software.
www.avg.com
The BOSL2 library has a number of modules that create geometry that is
tangent to other geometry. Maybe that would help make this parametric.
On 3/2/2024 8:19 AM, Raymond West via Discuss wrote:
>
> /*
> the first, module profile, just the 20,6 square and the 5r circle
> next find the large circle by trial and error. the centre will be
> on the y axis (x=0) , and diameter will be the y value - 6
> then that will need to be subtracted from the 20,6 square and the
> 5r circle, and something else, to give the smooth transition.
>
> The something else, by trial and error is a 17.8 square.
> useful to use # to give some f5 transparency
>
> If i knew the maths, then trial and error could be
> replaced by calculations, allowing a parametric result.
> */
>
> $fn=100;
> module profile(){
> square([20,6]);
> square (17.8);
> translate([20,5]) circle(r=5);
> }
>
> module profile2(){
> difference(){
> profile();
> # translate ([0,53.14]) circle(r=47.15);
> }
> }
>
>
>
>
> On 02/03/2024 12:09, Raymond West via Discuss wrote:
>>
>> As well as the fillets, there is the problem of smoothing out the
>> curve in the top surface, to make it a 'tangent to the rim'. The gui
>> interface of most cad programs allow a tangent to be applied, or
>> interactive manual adjustment, since you can draw with lines,
>> interactively pull them about. In openscad you have to specify the
>> locations. I think it is achievable by trial and error, or by some
>> mathematical calculations, beyond my pay grade.. Wrt the fillet, I
>> think it may be simpler? to create it included with the 14d cylinder
>> which is to be subtracted, as a sort of curved lip. This could be
>> done, by creating a thin outline, apply Minkowski with a 2mm radius,
>> and subtract from a shape which included the 14d cylinder. A lot of
>> effort, but doable, even if slow as treacle. But, the advantage is,
>> it is all Parametric. Also, many of the Makersmuse attempts were
>> unable to do filleting. It's been some time, but I have previously
>> imported scad files into freecad, just to get the filleting done.
>> Freecad is very good at that, being able to select the edges, radius
>> for each edge, etc.
>>
>> I suppose I need to test my 'theories'.
>>
>> Best wishes,
>>
>> Ray
>>
>> On 02/03/2024 10:18, Bruno Boettcher via Discuss wrote:
>>> Hello all,
>>> will still work on that for
>>> - limiting the cutouts to the necessary angles as Jordan suggested
>>> - and have to somehow add the x/y bevel to the cutouts,
>>>
>>> in the meantime, i put it up here:
>>> https://github.com/nohkumado/opensource_makercoin for review,
>>> validation suggestions (i used the images you kindly provided,
>>> Jordan, hope that's ok?), and in a few day i will try to push it
>>> onto Angus :D
>>>
>>> thanks!
>>>
>>>
>>>
>>> Am Sa., 2. März 2024 um 08:59 Uhr schrieb Bruno Boettcher
>>> <bboett@gmail.com>:
>>>
>>> Hello Jordan!
>>>
>>> wow... thanks a lots for the very detailed analysis!
>>>
>>>
>>> Am Fr., 1. März 2024 um 21:00 Uhr schrieb Jordan Brown
>>> <openscad@jordan.maileater.net>:
>>>
>>> Indeed, that performance is really awful. Turning on the
>>> experimental vertex-object-renderer features helps a lot.
>>> For me, that alone took preview performance on your model
>>> from unusable to sort-of-usable. But still...
>>>
>>> The first thing is easy. Repeat this mantra: use $fn only
>>> to create regular polygons. To control circle quality, use
>>> $fa and $fs. $fa=2 / $fs=1 seems like a reasonable setting
>>> here.
>>>
>>> ok, indeed :D looks bad on the screen but you are right, the
>>> printer hasn't that good of a resolution....
>>>
>>>
>>> That leads us to a second and more difficult mantra: never
>>> do in 3D what you can do in 2D.
>>>
>>> will try to keep that in mind :D
>>>
>>>
>>> You have the basic shape of the coin being a torus unioned
>>> with a cylinder, with a sphere subtracted. But that's the
>>> same as a circle unioned with a rectangle, with a circle
>>> subtracted, all rotate-extruded. The shape that would be
>>> rotate-extruded is this:
>>>
>>> that's also exactly what Angus did :'(
>>>
>>>
>>> That gets you the body of the coin, without anywhere near as
>>> many nasty 3D operations. (In particular, it avoids that
>>> big sphere with its thousands and thousands of faces - in
>>> your design, it has ~26,000 faces.)
>>>
>>> ok, think i get it.....
>>>
>>>
>>> Similarly, you have cutout() being a cylinder with a torus
>>> subtracted. But that's the same thing as a rectangle with a
>>> circle subtracted, rotate-extruded.
>>>
>>> hmmm since we are at it... a hint how to integrate directly also
>>> the horizontal bevels to that shape?
>>>
>>>
>>>
>>> Also, you have a convexity problem on the linear-extruded
>>> text. A convexity of four is probably enough, but five is
>>> definitely enough.
>>>
>>> oh.... never looked into convexity, but noticed the ugly
>>> artifacts...
>>>
>>> On my system (i7-13700), yours F6-renders in 1m6s; mine with
>>> $fs=1 renders in 15s; with $fs=0.5 in 54s. But with the
>>> experimental Manifold renderer, they're all sub-second.
>>> (Manifold is magic.)
>>>
>>> my system is definitely slower :D but nevermind, your version
>>> clearly is the one to go with! thanks!
>>>
>>>
>>>
>>> If one wanted to optimize further, note that cutout() is a
>>> fully cylindrical object, and only a small fraction of it is
>>> actually used for the subtraction. You could use
>>> rotate_extrude's angle parameter to only generate maybe a
>>> quarter of it. Those invisible negative faces have a preview
>>> cost (and probably a rendering cost too). But that seems
>>> like overkill.
>>>
>>> nope, will look into that! seems logical..
>>> but as said i still need to add also in x/y plane the bevel, and
>>> not really knowing how to achieve that....
>>>
>>> anyway thanks a lot, i will put this up later on github, for
>>> further enhancements and review!
>>> thanks a lot!
>>>
>>> --
>>> ciao
>>> Bruno
>>>
>>> ===========================================
>>> http://nohkumado.eu/,
>>> <http://bboett.free.fr>http://aikido.nohkumado.eu/,
>>> <http://bboett.free.fr>
>>> http://aikido.zorn.free.fr
>>>
>>>
>>>
>>> --
>>> ciao
>>> Bruno
>>>
>>> ===========================================
>>> http://nohkumado.eu/,
>>> <http://bboett.free.fr>http://aikido.nohkumado.eu/,
>>> <http://bboett.free.fr>
>>> http://aikido.zorn.free.fr
>>>
>>> _______________________________________________
>>> OpenSCAD mailing list
>>> To unsubscribe send an email todiscuss-leave@lists.openscad.org
>>
>> _______________________________________________
>> OpenSCAD mailing list
>> To unsubscribe send an email todiscuss-leave@lists.openscad.org
>
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email todiscuss-leave@lists.openscad.org
--
This email has been checked for viruses by AVG antivirus software.
www.avg.com
RW
Raymond West
Sat, Mar 2, 2024 8:28 PM
Probably good enough to 3d print, rendering obviously slow, but it
works. More time, higher resolution. (The values are what I noted from
the Youtube by Angus)
code attached. Basically made the shape smaller by the size of the
fillet, then applied Minkowski to the whole thing, then at the end,
embossed the letters. I attempted to subtract the individual notches,
then add in fillets individually, but it got even more messy (bit=0.1 is
left over from that, maybe more). I may. or may not do the couple of
calculations i mention in the comments, but only as an exercise. The
rest of it is pretty well parametric, but I guess that's just the
number of notches and size of fillet.
It would be trivial to turn this into something functional, labelled
hydraulic hand-wheels, whatever.
Probably good enough to 3d print, rendering obviously slow, but it
works. More time, higher resolution. (The values are what I noted from
the Youtube by Angus)
code attached. Basically made the shape smaller by the size of the
fillet, then applied Minkowski to the whole thing, then at the end,
embossed the letters. I attempted to subtract the individual notches,
then add in fillets individually, but it got even more messy (bit=0.1 is
left over from that, maybe more). I may. or may not do the couple of
calculations i mention in the comments, but only as an exercise. The
rest of it is pretty well parametric, but I guess that's just the
number of notches and size of fillet.
It would be trivial to turn this into something functional, labelled
hydraulic hand-wheels, whatever.
RW
Rogier Wolff
Sat, Mar 2, 2024 8:45 PM
On Sat, Mar 02, 2024 at 08:59:46AM +0100, Bruno Boettcher via Discuss wrote:
If one wanted to optimize further, note that cutout() is a fully
cylindrical object, and only a small fraction of it is actually used for
the subtraction. You could use rotate_extrude's angle parameter to only
generate maybe a quarter of it. Those invisible negative faces have a
preview cost (and probably a rendering cost too). But that seems like
overkill.
nope, will look into that! seems logical..
It is an optimiztation, that if it is unnecessary, you really
shouldn't do. You're complicating a "cylinder" into rotate-extruding
over a specific angle that comes out of nowhere.
If you're reading that code a couple of years from now the simple
cylinder is much easier to understand than "why the BEEP do you need
to rotate extrude that over that specific angle".
The other things are structural, the way you build it up kind of
things. The way you THINK about it changes, but it doesn't really get
more complicated.
This is "complicating code" that only benefits the performance of
rendering.... "probably overkill".
(Openscad code can already become unreadable quite easily. So try to
keep things as simple as possible! )
Roger.
--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 **
** Delftechpark 11 2628 XJ Delft, The Netherlands. KVK: 27239233 **
f equals m times a. When your f is steady, and your m is going down
your a is going up. -- Chris Hadfield about flying up the space shuttle.
On Sat, Mar 02, 2024 at 08:59:46AM +0100, Bruno Boettcher via Discuss wrote:
> > If one wanted to optimize further, note that cutout() is a fully
> > cylindrical object, and only a small fraction of it is actually used for
> > the subtraction. You could use rotate_extrude's angle parameter to only
> > generate maybe a quarter of it. Those invisible negative faces have a
> > preview cost (and probably a rendering cost too). But that seems like
> > overkill.
> nope, will look into that! seems logical..
It is an optimiztation, that if it is unnecessary, you really
shouldn't do. You're complicating a "cylinder" into rotate-extruding
over a specific angle that comes out of nowhere.
If you're reading that code a couple of years from now the simple
cylinder is much easier to understand than "why the BEEP do you need
to rotate extrude that over that specific angle".
The other things are structural, the way you build it up kind of
things. The way you THINK about it changes, but it doesn't really get
more complicated.
This is "complicating code" that only benefits the performance of
rendering.... "probably overkill".
(Openscad code can already become unreadable quite easily. So try to
keep things as simple as possible! )
Roger.
--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 **
** Delftechpark 11 2628 XJ Delft, The Netherlands. KVK: 27239233 **
f equals m times a. When your f is steady, and your m is going down
your a is going up. -- Chris Hadfield about flying up the space shuttle.
JB
Jordan Brown
Sun, Mar 3, 2024 2:22 AM
On 3/2/2024 12:45 PM, Rogier Wolff wrote:
It is an optimiztation, that if it is unnecessary, you really
shouldn't do. You're complicating a "cylinder" into rotate-extruding
over a specific angle that comes out of nowhere.
If you're reading that code a couple of years from now the simple
cylinder is much easier to understand than "why the BEEP do you need
to rotate extrude that over that specific angle".
The other things are structural, the way you build it up kind of
things. The way you THINK about it changes, but it doesn't really get
more complicated.
Yep. Sometimes the "think in 2D as long as you can" plan is just s
perspective shift, and sometimes it's harder than that.
And indeed, the "only build this angle would add complexity.
And indeed, adding complexity to optimize performance is probably not a win.
On 3/2/2024 12:45 PM, Rogier Wolff wrote:
> It is an optimiztation, that if it is unnecessary, you really
> shouldn't do. You're complicating a "cylinder" into rotate-extruding
> over a specific angle that comes out of nowhere.
>
> If you're reading that code a couple of years from now the simple
> cylinder is much easier to understand than "why the BEEP do you need
> to rotate extrude that over that specific angle".
>
> The other things are structural, the way you build it up kind of
> things. The way you THINK about it changes, but it doesn't really get
> more complicated.
Yep. Sometimes the "think in 2D as long as you can" plan is just s
perspective shift, and sometimes it's harder than that.
And indeed, the "only build this angle would add complexity.
And indeed, adding complexity to optimize performance is probably not a win.
JB
Jordan Brown
Sun, Mar 3, 2024 2:22 AM
On 3/1/2024 11:59 PM, Bruno Boettcher wrote:
Similarly, you have cutout() being a cylinder with a torus
subtracted. But that's the same thing as a rectangle with a
circle subtracted, rotate-extruded.
hmmm since we are at it... a hint how to integrate directly also the
horizontal bevels to that shape?
I don't know which edges you are wanting to bevel.
Also, you have a convexity problem on the linear-extruded text. A
convexity of four is probably enough, but five is definitely enough.
oh.... never looked into convexity, but noticed the ugly artifacts...
On 3/1/2024 11:59 PM, Bruno Boettcher wrote:
>
> Similarly, you have cutout() being a cylinder with a torus
> subtracted. But that's the same thing as a rectangle with a
> circle subtracted, rotate-extruded.
>
> hmmm since we are at it... a hint how to integrate directly also the
> horizontal bevels to that shape?
I don't know which edges you are wanting to bevel.
> Also, you have a convexity problem on the linear-extruded text. A
> convexity of four is probably enough, but five is definitely enough.
>
> oh.... never looked into convexity, but noticed the ugly artifacts...
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/FAQ#Why_are_some_parts_(e.g._holes)_of_the_model_not_rendered_correctly?
BB
Bruno Boettcher
Sun, Mar 3, 2024 8:53 AM
Hello!
the expected result is what Raymond West got with the minkowsky transform!
In the picture he posted you see that his cylindrical cutouts are smoothed
in all planes.
Personally i have not very good experience with minowsky, since my designs
seem heavily optimizable by base :D, and even taking into account that i
will get some day better, adding minkowsky plunges my comps into the "take
ages to complete" and "freeze the app with never ending complains of the
system" hell....
So Raymonds solutions does the job of smoothing out the cutouts, but if i
could find one that is less taxing?
ciao
Bruno
Am So., 3. März 2024 um 03:22 Uhr schrieb Jordan Brown <
openscad@jordan.maileater.net>:
On 3/1/2024 11:59 PM, Bruno Boettcher wrote:
Similarly, you have cutout() being a cylinder with a torus subtracted.
But that's the same thing as a rectangle with a circle subtracted,
rotate-extruded.
hmmm since we are at it... a hint how to integrate directly also the
horizontal bevels to that shape?
I don't know which edges you are wanting to bevel.
Also, you have a convexity problem on the linear-extruded text. A
convexity of four is probably enough, but five is definitely enough.
Hello!
the expected result is what Raymond West got with the minkowsky transform!
In the picture he posted you see that his cylindrical cutouts are smoothed
in all planes.
Personally i have not very good experience with minowsky, since my designs
seem heavily optimizable by base :D, and even taking into account that i
will get some day better, adding minkowsky plunges my comps into the "take
ages to complete" and "freeze the app with never ending complains of the
system" hell....
So Raymonds solutions does the job of smoothing out the cutouts, but if i
could find one that is less taxing?
ciao
Bruno
Am So., 3. März 2024 um 03:22 Uhr schrieb Jordan Brown <
openscad@jordan.maileater.net>:
> On 3/1/2024 11:59 PM, Bruno Boettcher wrote:
>
>
> Similarly, you have cutout() being a cylinder with a torus subtracted.
>> But that's the same thing as a rectangle with a circle subtracted,
>> rotate-extruded.
>>
> hmmm since we are at it... a hint how to integrate directly also the
> horizontal bevels to that shape?
>
>
> I don't know which edges you are wanting to bevel.
>
> Also, you have a convexity problem on the linear-extruded text. A
>> convexity of four is probably enough, but five is definitely enough.
>>
> oh.... never looked into convexity, but noticed the ugly artifacts...
>
>
>
> https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/FAQ#Why_are_some_parts_(e.g._holes)_of_the_model_not_rendered_correctly
> ?
>
>
--
ciao
Bruno
===========================================
http://nohkumado.eu/, <http://bboett.free.fr>http://aikido.nohkumado.eu/,
<http://bboett.free.fr>
http://aikido.zorn.free.fr
JB
Jordan Brown
Sun, Mar 3, 2024 10:06 AM
On 3/3/2024 12:53 AM, Bruno Boettcher via Discuss wrote:
the expected result is what Raymond West got with the minkowsky
transform! In the picture he posted you see that his cylindrical
cutouts are smoothed in all planes.
Yeah, that sort of smoothing can be simply described as "hard" :-)
Like the shape that Sanjeev asked about, shapes with compound curves are
hard. You can do some stuff with Bézier patches, but they are a pain to
describe.
Some shapes that are relatively easy to describe in the physical world
(sand off that corner, lay a fillet down along that corner) are hard to
describe geometrically.
On 3/3/2024 12:53 AM, Bruno Boettcher via Discuss wrote:
> the expected result is what Raymond West got with the minkowsky
> transform! In the picture he posted you see that his cylindrical
> cutouts are smoothed in all planes.
Yeah, that sort of smoothing can be simply described as "hard" :-)
Like the shape that Sanjeev asked about, shapes with compound curves are
hard. You can do some stuff with Bézier patches, but they are a pain to
describe.
Some shapes that are relatively easy to describe in the physical world
(sand off that corner, lay a fillet down along that corner) are hard to
describe geometrically.
T
trygve@totallytrygve.com
Mon, Mar 4, 2024 7:41 AM
Hi!
The shape of the coin profile is wrong.
The circular cutout intersects the rim at the top, but it should intersect further in, where the two circles have matching angles on the rims. The transition should not be detectable.
Try 'lifting it' slightly, or reducing the diameter with a fraction.
The fillets...
Can the fillets be modelled as sections of cylinders, or circular extruded from circles?
If so, make a negative 'form' for the rim of the coin, and use those cylinders and extrusions, together with a cylinder for the cutout itself, and use that with a DIFFERENCE operation to cleanly make the cutouts.
It's sometimes easier to make a negative and remove that from a piece than to build it up using additives.
Trygve
Den 2. mars 2024 kl. 13.09.44 +01.00 skrev Raymond West via Discuss discuss@lists.openscad.org:
As well as the fillets, there is the problem of smoothing out the curve in the top surface, to make it a 'tangent to the rim'. The gui interface of most cad programs allow a tangent to be applied, or interactive manual adjustment, since you can draw with lines, interactively pull them about. In openscad you have to specify the locations. I think it is achievable by trial and error, or by some mathematical calculations, beyond my pay grade.. Wrt the fillet, I think it may be simpler? to create it included with the 14d cylinder which is to be subtracted, as a sort of curved lip. This could be done, by creating a thin outline, apply Minkowski with a 2mm radius, and subtract from a shape which included the 14d cylinder. A lot of effort, but doable, even if slow as treacle. But, the advantage is, it is all Parametric. Also, many of the Makersmuse attempts were unable to do filleting. It's been some time, but I have previously imported scad files into freecad, just to get the filleting done. Freecad is very good at that, being able to select the edges, radius for each edge, etc.
I suppose I need to test my 'theories'.
Best wishes,
Ray
On 02/03/2024 10:18, Bruno Boettcher via Discuss wrote:
Hello all,
will still work on that for
- limiting the cutouts to the necessary angles as Jordan suggested
- and have to somehow add the x/y bevel to the cutouts,
in the meantime, i put it up here: https://github.com/nohkumado/opensource_makercoin for review, validation suggestions (i used the images you kindly provided, Jordan, hope that's ok?), and in a few day i will try to push it onto Angus :D
thanks!
Am Sa., 2. März 2024 um 08:59 Uhr schrieb Bruno Boettcher <bboett@gmail.com>:
Hello Jordan!
wow... thanks a lots for the very detailed analysis!
Am Fr., 1. März 2024 um 21:00 Uhr schrieb Jordan Brown <openscad@jordan.maileater.net>:
Indeed, that performance is really awful. Turning on the experimental vertex-object-renderer features helps a lot. For me, that alone took preview performance on your model from unusable to sort-of-usable. But still...
The first thing is easy. Repeat this mantra: use $fn only to create regular polygons. To control circle quality, use $fa and $fs. $fa=2 / $fs=1 seems like a reasonable setting here.
ok, indeed :D looks bad on the screen but you are right, the printer hasn't that good of a resolution....
That leads us to a second and more difficult mantra: never do in 3D what you can do in 2D.
will try to keep that in mind :D
You have the basic shape of the coin being a torus unioned with a cylinder, with a sphere subtracted. But that's the same as a circle unioned with a rectangle, with a circle subtracted, all rotate-extruded. The shape that would be rotate-extruded is this:
that's also exactly what Angus did :'(
That gets you the body of the coin, without anywhere near as many nasty 3D operations. (In particular, it avoids that big sphere with its thousands and thousands of faces - in your design, it has ~26,000 faces.)
ok, think i get it.....
Similarly, you have cutout() being a cylinder with a torus subtracted. But that's the same thing as a rectangle with a circle subtracted, rotate-extruded.
hmmm since we are at it... a hint how to integrate directly also the horizontal bevels to that shape?
Also, you have a convexity problem on the linear-extruded text. A convexity of four is probably enough, but five is definitely enough.
oh.... never looked into convexity, but noticed the ugly artifacts...
On my system (i7-13700), yours F6-renders in 1m6s; mine with $fs=1 renders in 15s; with $fs=0.5 in 54s. But with the experimental Manifold renderer, they're all sub-second. (Manifold is magic.)
my system is definitely slower :D but nevermind, your version clearly is the one to go with! thanks!
If one wanted to optimize further, note that cutout() is a fully cylindrical object, and only a small fraction of it is actually used for the subtraction. You could use rotate_extrude's angle parameter to only generate maybe a quarter of it. Those invisible negative faces have a preview cost (and probably a rendering cost too). But that seems like overkill.
nope, will look into that! seems logical..
Hi!
The shape of the coin profile is wrong.
The circular cutout intersects the rim at the top, but it should intersect further in, where the two circles have matching angles on the rims. The transition should not be detectable.
Try 'lifting it' slightly, or reducing the diameter with a fraction.
The fillets...
Can the fillets be modelled as sections of cylinders, or circular extruded from circles?
If so, make a negative 'form' for the rim of the coin, and use those cylinders and extrusions, together with a cylinder for the cutout itself, and use that with a DIFFERENCE operation to cleanly make the cutouts.
It's sometimes easier to make a negative and remove that from a piece than to build it up using additives.
Trygve
Den 2. mars 2024 kl. 13.09.44 +01.00 skrev Raymond West via Discuss <discuss@lists.openscad.org>:
> As well as the fillets, there is the problem of smoothing out the curve in the top surface, to make it a 'tangent to the rim'. The gui interface of most cad programs allow a tangent to be applied, or interactive manual adjustment, since you can draw with lines, interactively pull them about. In openscad you have to specify the locations. I think it is achievable by trial and error, or by some mathematical calculations, beyond my pay grade.. Wrt the fillet, I think it may be simpler? to create it included with the 14d cylinder which is to be subtracted, as a sort of curved lip. This could be done, by creating a thin outline, apply Minkowski with a 2mm radius, and subtract from a shape which included the 14d cylinder. A lot of effort, but doable, even if slow as treacle. But, the advantage is, it is all Parametric. Also, many of the Makersmuse attempts were unable to do filleting. It's been some time, but I have previously imported scad files into freecad, just to get the filleting done. Freecad is very good at that, being able to select the edges, radius for each edge, etc.
> I suppose I need to test my 'theories'.
> Best wishes,
> Ray
>
> On 02/03/2024 10:18, Bruno Boettcher via Discuss wrote:
>
> > Hello all,
> > will still work on that for
> > - limiting the cutouts to the necessary angles as Jordan suggested
> > - and have to somehow add the x/y bevel to the cutouts,
> >
> > in the meantime, i put it up here: <https://github.com/nohkumado/opensource_makercoin> for review, validation suggestions (i used the images you kindly provided, Jordan, hope that's ok?), and in a few day i will try to push it onto Angus :D
> >
> > thanks!
> >
> >
> >
> >
> > Am Sa., 2. März 2024 um 08:59 Uhr schrieb Bruno Boettcher <<bboett@gmail.com>>:
> >
> > > Hello Jordan!
> > >
> > > wow... thanks a lots for the very detailed analysis!
> > >
> > >
> > >
> > > Am Fr., 1. März 2024 um 21:00 Uhr schrieb Jordan Brown <<openscad@jordan.maileater.net>>:
> > >
> > > > Indeed, that performance is really awful. Turning on the experimental vertex-object-renderer features helps a lot. For me, that alone took preview performance on your model from unusable to sort-of-usable. But still...
> > > >
> > > >
> > > > The first thing is easy. Repeat this mantra: use $fn only to create regular polygons. To control circle quality, use $fa and $fs. $fa=2 / $fs=1 seems like a reasonable setting here.
> > > > ok, indeed :D looks bad on the screen but you are right, the printer hasn't that good of a resolution....
> > >
> > > >
> > > > That leads us to a second and more difficult mantra: never do in 3D what you can do in 2D.
> > > > will try to keep that in mind :D
> > >
> > > >
> > > > You have the basic shape of the coin being a torus unioned with a cylinder, with a sphere subtracted. But that's the same as a circle unioned with a rectangle, with a circle subtracted, all rotate-extruded. The shape that would be rotate-extruded is this:
> > > >
> > > > that's also exactly what Angus did :'(
> > >
> > >
> > >
> > > >
> > > > That gets you the body of the coin, without anywhere near as many nasty 3D operations. (In particular, it avoids that big sphere with its thousands and thousands of faces - in your design, it has ~26,000 faces.)
> > > > ok, think i get it.....
> > >
> > >
> > >
> > > >
> > > > Similarly, you have cutout() being a cylinder with a torus subtracted. But that's the same thing as a rectangle with a circle subtracted, rotate-extruded.
> > > > hmmm since we are at it... a hint how to integrate directly also the horizontal bevels to that shape?
> > >
> > >
> > > >
> > > >
> > > > Also, you have a convexity problem on the linear-extruded text. A convexity of four is probably enough, but five is definitely enough.
> > > > oh.... never looked into convexity, but noticed the ugly artifacts...
> > >
> > >
> > > > On my system (i7-13700), yours F6-renders in 1m6s; mine with $fs=1 renders in 15s; with $fs=0.5 in 54s. But with the experimental Manifold renderer, they're all sub-second. (Manifold is magic.)
> > > > my system is definitely slower :D but nevermind, your version clearly is the one to go with! thanks!
> > >
> > >
> > >
> > >
> > > >
> > > > If one wanted to optimize further, note that cutout() is a fully cylindrical object, and only a small fraction of it is actually used for the subtraction. You could use rotate_extrude's angle parameter to only generate maybe a quarter of it. Those invisible negative faces have a preview cost (and probably a rendering cost too). But that seems like overkill.
> > > > nope, will look into that! seems logical..
> > > but as said i still need to add also in x/y plane the bevel, and not really knowing how to achieve that....
> > >
> > > anyway thanks a lot, i will put this up later on github, for further enhancements and review!
> > > thanks a lot!
> > >
> > > --
> > >
> > >
> > >
> > > ciao
> > > Bruno
> > >
> > >
> > > ===========================================
> > > http://nohkumado.eu/, <http://bboett.free.fr>http://aikido.nohkumado.eu/, <http://bboett.free.fr>
> > >
> > > <http://aikido.zorn.free.fr>
> > >
> >
> > --
> >
> >
> >
> > ciao
> > Bruno
> >
> >
> > ===========================================
> > http://nohkumado.eu/, <http://bboett.free.fr>http://aikido.nohkumado.eu/, <http://bboett.free.fr>
> >
> > <http://aikido.zorn.free.fr>
> >
> > _______________________________________________
> > 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>
>
RW
Raymond West
Mon, Mar 4, 2024 12:52 PM
Hi Trygve,
Thanks for looking.
On 04/03/2024 07:41, Gadgetman! via Discuss wrote:
The shape of the coin profile is wrong.
The circular cutout intersects the rim at the top, but it should
intersect further in, where the two circles have matching angles on
the rims. The transition should not be detectable.
it's a function of the $fn. In my code I commented it out in the
profiles, so that it would render this side of Easter. If the same low
resolution image is good enough for printing, then a slight adjustment
to the line ' translate ([0,53.14]) circle(r=47.15); // need to
calculate' in profile 2 module will eliminate the ridge. If you comment
out the last line ( done() ) and uncomment the '// profile();', you
will see the jagged profile. If you then uncomment the '//$fn =90;' in
the profile module you get a smoother profile. Because there are both
large and small radii, the resolution achieved by the '$fn' values is
'not a one size fits all', and this was posted as a work towards a
solution. As is, may be good enough for a fdm print. Without the
attempt at filleting,It can be made smoother than a smooth thing using
openscad with a $fn =1000, (just 'cos we can!).
An alternative could be to forget the the large recess/curve/scallop in
the profile, and then difference a large smooth sphere just before the
text addition. Many ways of getting a result.
Can the fillets be modelled as sections of cylinders, or circular
extruded from circles?
If so, make a negative 'form' for the rim of the coin, and use those
cylinders and extrusions, together with a cylinder for the cutout
itself, and use that with a DIFFERENCE operation to cleanly make the
cutouts.
That was my initial thought, I made a slim section of the interface of
the notch and the rim, (the ' bit=0.1' was left over from that ) - the
notch being larger by twice the fillet, the rim being the small rim,
and then simply Minkowski that shape. However, adding that into a
suitably notched full size rim gave problems with non manifold
rendering, etc. I may return to that.
Best wishes,
Ray
Hi Trygve,
Thanks for looking.
On 04/03/2024 07:41, Gadgetman! via Discuss wrote:
> The shape of the coin profile is wrong.
> The circular cutout intersects the rim at the top, but it should
> intersect further in, where the two circles have matching angles on
> the rims. The transition should not be detectable.
it's a function of the $fn. In my code I commented it out in the
profiles, so that it would render this side of Easter. If the same low
resolution image is good enough for printing, then a slight adjustment
to the line ' translate ([0,53.14]) circle(r=47.15); // need to
calculate' in profile 2 module will eliminate the ridge. If you comment
out the last line ( done() ) and uncomment the '// profile();', you
will see the jagged profile. If you then uncomment the '//$fn =90;' in
the profile module you get a smoother profile. Because there are both
large and small radii, the resolution achieved by the '$fn' values is
'not a one size fits all', and this was posted as a work towards a
solution. As is, may be good enough for a fdm print. Without the
attempt at filleting,It can be made smoother than a smooth thing using
openscad with a $fn =1000, (just 'cos we can!).
An alternative could be to forget the the large recess/curve/scallop in
the profile, and then difference a large smooth sphere just before the
text addition. Many ways of getting a result.
> Can the fillets be modelled as sections of cylinders, or circular
> extruded from circles?
>
> If so, make a negative 'form' for the rim of the coin, and use those
> cylinders and extrusions, together with a cylinder for the cutout
> itself, and use that with a DIFFERENCE operation to cleanly make the
> cutouts.
>
That was my initial thought, I made a slim section of the interface of
the notch and the rim, (the ' bit=0.1' was left over from that ) - the
notch being larger by twice the fillet, the rim being the small rim,
and then simply Minkowski that shape. However, adding that into a
suitably notched full size rim gave problems with non manifold
rendering, etc. I may return to that.
Best wishes,
Ray
RW
Raymond West
Tue, Mar 5, 2024 2:24 PM
In fact It only takes about 3.5 minutes to render with the $fn=90.
On 04/03/2024 12:52, Raymond West via Discuss wrote:
Hi Trygve,
Thanks for looking.
On 04/03/2024 07:41, Gadgetman! via Discuss wrote:
The shape of the coin profile is wrong.
The circular cutout intersects the rim at the top, but it should
intersect further in, where the two circles have matching angles on
the rims. The transition should not be detectable.
it's a function of the $fn. In my code I commented it out in the
profiles, so that it would render this side of Easter. If the same low
resolution image is good enough for printing, then a slight adjustment
to the line ' translate ([0,53.14]) circle(r=47.15); // need to
calculate' in profile 2 module will eliminate the ridge. If you
comment out the last line ( done() ) and uncomment the '//
profile();', you will see the jagged profile. If you then uncomment
the '//$fn =90;' in the profile module you get a smoother profile.
Because there are both large and small radii, the resolution achieved
by the '$fn' values is 'not a one size fits all', and this was posted
as a work towards a solution. As is, may be good enough for a fdm
print. Without the attempt at filleting,It can be made smoother than a
smooth thing using openscad with a $fn =1000, (just 'cos we can!).
An alternative could be to forget the the large recess/curve/scallop
in the profile, and then difference a large smooth sphere just before
the text addition. Many ways of getting a result.
Can the fillets be modelled as sections of cylinders, or circular
extruded from circles?
If so, make a negative 'form' for the rim of the coin, and use those
cylinders and extrusions, together with a cylinder for the cutout
itself, and use that with a DIFFERENCE operation to cleanly make the
cutouts.
That was my initial thought, I made a slim section of the interface of
the notch and the rim, (the ' bit=0.1' was left over from that ) - the
notch being larger by twice the fillet, the rim being the small rim,
and then simply Minkowski that shape. However, adding that into a
suitably notched full size rim gave problems with non manifold
rendering, etc. I may return to that.
Best wishes,
Ray
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
In fact It only takes about 3.5 minutes to render with the $fn=90.
On 04/03/2024 12:52, Raymond West via Discuss wrote:
> Hi Trygve,
>
> Thanks for looking.
>
> On 04/03/2024 07:41, Gadgetman! via Discuss wrote:
>> The shape of the coin profile is wrong.
>> The circular cutout intersects the rim at the top, but it should
>> intersect further in, where the two circles have matching angles on
>> the rims. The transition should not be detectable.
>
> it's a function of the $fn. In my code I commented it out in the
> profiles, so that it would render this side of Easter. If the same low
> resolution image is good enough for printing, then a slight adjustment
> to the line ' translate ([0,53.14]) circle(r=47.15); // need to
> calculate' in profile 2 module will eliminate the ridge. If you
> comment out the last line ( done() ) and uncomment the '//
> profile();', you will see the jagged profile. If you then uncomment
> the '//$fn =90;' in the profile module you get a smoother profile.
> Because there are both large and small radii, the resolution achieved
> by the '$fn' values is 'not a one size fits all', and this was posted
> as a work towards a solution. As is, may be good enough for a fdm
> print. Without the attempt at filleting,It can be made smoother than a
> smooth thing using openscad with a $fn =1000, (just 'cos we can!).
>
> An alternative could be to forget the the large recess/curve/scallop
> in the profile, and then difference a large smooth sphere just before
> the text addition. Many ways of getting a result.
>
>
>> Can the fillets be modelled as sections of cylinders, or circular
>> extruded from circles?
>>
>> If so, make a negative 'form' for the rim of the coin, and use those
>> cylinders and extrusions, together with a cylinder for the cutout
>> itself, and use that with a DIFFERENCE operation to cleanly make the
>> cutouts.
>>
>
> That was my initial thought, I made a slim section of the interface of
> the notch and the rim, (the ' bit=0.1' was left over from that ) - the
> notch being larger by twice the fillet, the rim being the small rim,
> and then simply Minkowski that shape. However, adding that into a
> suitably notched full size rim gave problems with non manifold
> rendering, etc. I may return to that.
>
>
> Best wishes,
>
>
> Ray
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
RW
Raymond West
Tue, Mar 5, 2024 5:00 PM
or an hour and a half for everything at $fn =90
On 05/03/2024 14:24, Raymond West via Discuss wrote:
In fact It only takes about 3.5 minutes to render with the $fn=90.
On 04/03/2024 12:52, Raymond West via Discuss wrote:
Hi Trygve,
Thanks for looking.
On 04/03/2024 07:41, Gadgetman! via Discuss wrote:
The shape of the coin profile is wrong.
The circular cutout intersects the rim at the top, but it should
intersect further in, where the two circles have matching angles on
the rims. The transition should not be detectable.
it's a function of the $fn. In my code I commented it out in the
profiles, so that it would render this side of Easter. If the same
low resolution image is good enough for printing, then a slight
adjustment to the line ' translate ([0,53.14]) circle(r=47.15); //
need to calculate' in profile 2 module will eliminate the ridge. If
you comment out the last line ( done() ) and uncomment the '//
profile();', you will see the jagged profile. If you then uncomment
the '//$fn =90;' in the profile module you get a smoother profile.
Because there are both large and small radii, the resolution achieved
by the '$fn' values is 'not a one size fits all', and this was posted
as a work towards a solution. As is, may be good enough for a fdm
print. Without the attempt at filleting,It can be made smoother than
a smooth thing using openscad with a $fn =1000, (just 'cos we can!).
An alternative could be to forget the the large recess/curve/scallop
in the profile, and then difference a large smooth sphere just before
the text addition. Many ways of getting a result.
Can the fillets be modelled as sections of cylinders, or circular
extruded from circles?
If so, make a negative 'form' for the rim of the coin, and use those
cylinders and extrusions, together with a cylinder for the cutout
itself, and use that with a DIFFERENCE operation to cleanly make the
cutouts.
That was my initial thought, I made a slim section of the interface
of the notch and the rim, (the ' bit=0.1' was left over from that ) -
the notch being larger by twice the fillet, the rim being the small
rim, and then simply Minkowski that shape. However, adding that into
a suitably notched full size rim gave problems with non manifold
rendering, etc. I may return to that.
Best wishes,
Ray
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
or an hour and a half for everything at $fn =90
On 05/03/2024 14:24, Raymond West via Discuss wrote:
> In fact It only takes about 3.5 minutes to render with the $fn=90.
>
> On 04/03/2024 12:52, Raymond West via Discuss wrote:
>> Hi Trygve,
>>
>> Thanks for looking.
>>
>> On 04/03/2024 07:41, Gadgetman! via Discuss wrote:
>>> The shape of the coin profile is wrong.
>>> The circular cutout intersects the rim at the top, but it should
>>> intersect further in, where the two circles have matching angles on
>>> the rims. The transition should not be detectable.
>>
>> it's a function of the $fn. In my code I commented it out in the
>> profiles, so that it would render this side of Easter. If the same
>> low resolution image is good enough for printing, then a slight
>> adjustment to the line ' translate ([0,53.14]) circle(r=47.15); //
>> need to calculate' in profile 2 module will eliminate the ridge. If
>> you comment out the last line ( done() ) and uncomment the '//
>> profile();', you will see the jagged profile. If you then uncomment
>> the '//$fn =90;' in the profile module you get a smoother profile.
>> Because there are both large and small radii, the resolution achieved
>> by the '$fn' values is 'not a one size fits all', and this was posted
>> as a work towards a solution. As is, may be good enough for a fdm
>> print. Without the attempt at filleting,It can be made smoother than
>> a smooth thing using openscad with a $fn =1000, (just 'cos we can!).
>>
>> An alternative could be to forget the the large recess/curve/scallop
>> in the profile, and then difference a large smooth sphere just before
>> the text addition. Many ways of getting a result.
>>
>>
>>> Can the fillets be modelled as sections of cylinders, or circular
>>> extruded from circles?
>>>
>>> If so, make a negative 'form' for the rim of the coin, and use those
>>> cylinders and extrusions, together with a cylinder for the cutout
>>> itself, and use that with a DIFFERENCE operation to cleanly make the
>>> cutouts.
>>>
>>
>> That was my initial thought, I made a slim section of the interface
>> of the notch and the rim, (the ' bit=0.1' was left over from that ) -
>> the notch being larger by twice the fillet, the rim being the small
>> rim, and then simply Minkowski that shape. However, adding that into
>> a suitably notched full size rim gave problems with non manifold
>> rendering, etc. I may return to that.
>>
>>
>> Best wishes,
>>
>>
>> Ray
>> _______________________________________________
>> 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
RA
Richard A. Milewski
Sat, Feb 15, 2025 7:52 AM
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;
functiontmat(ang) =move(cylindrical_to_xyz(r1,ang,0));
difference() {
metaballs([
IDENT, mb_disk(h1,r1),
up(r1-2), mb_sphere(r14, 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);
}
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;
functiontmat(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);
}
BB
Bruno Boettcher
Sat, Feb 15, 2025 8:39 AM
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
Hello!
You mind adding your version to
https://github.com/nohkumado/opensource_makercoin yourself? Thanks in
advance!
Ciao
Bruno
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
Richard A. Milewski via Discuss <discuss@lists.openscad.org> schrieb am
Sa., 15. Feb. 2025, 08:53:
> 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 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()
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()
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
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
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()
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()
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.