Hi,

Guest

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 = 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);

}

}

}

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 = 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!

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.)

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

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>:

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...

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

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 :'(

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?

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!

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

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

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,

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

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

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:

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.

Replying to:

Empathy v1.0
2024 ©Harmonylists.com