Hi,

Guest

RV

Roel Vanhout

Fri, Aug 23, 2024 10:48 AM

Hello all,

I have a complex shape to round for which I'd like to ask if anyone has

suggestions on how to approach this. I've always found rounding and

chamfering to be very tedious using plain OpenSCAD until I found how to do

it with BOSL2, which has been a godsend for the cases I've encountered so

far. But today I have the shape in the picture below, for which the code is

at the bottom. I'm looking to round out all surfaces of the 'fins' that

radiate out from the center 'stem' come in contact with other surfaces.

(this is a presser tool for stuffing food into a mold, the 'fins' are to

distribute the pressure that is manually exerted on the ring to the bottom

platelet).

I've marked the various lines that need to be rounded out in different

colors. Out of these, the turquoise one I could do with a BOSL2

rounding_edge_mask(), and the green one too if I use an appropriate 'ang'

parameter (which I can calculate fairly easily). However I have no idea how

to do the red one or the orange one, nor how to let e.g. the orange one

blend smoothly into the green one for example; and the same for all the

other places where roundovers meet.

Any ideas on how I can do this? Thank you.

regards

Roel

[image: presser_foot_rounding.png]

include <BOSL2-master/std.scad>

include <BOSL2-master/screws.scad>

include <BOSL2-master/threading.scad>

ZFE = 0.01; // Z fighting epsilon, a constant to prevent planes from

overlapping.

// It has a separate name so that you know where it's used

what it's for.

ZFE_2 = ZFE * 2;

ZFE_3 = ZFE * 3;

$fn = $preview ? 64 : 128;

// Global

g_corner_rounding = 2;

// Ring

g_wall_thickness = 3;

g_inside_size = 90;

g_height = 70;

// Lid

g_lid_play = 1;

g_presser_height = 30;

g_presser_width = 20;

g_lid_rounding = 5;

g_presser_size = 10;

module ring() {

outside_size = g_inside_size + (2 * g_wall_thickness);

//cuboid([g_wall_thickness, depth, clip_height], chamfer=1, edges="X",

anchor=LEFT+BOTTOM+FRONT);

difference() {

cuboid([outside_size, outside_size, g_height],

rounding=g_corner_rounding, edges="Z");

cuboid([g_inside_size, g_inside_size, g_height + ZFE_2],

rounding=g_corner_rounding, edges="Z");

}

}

module presser() {

cuboid([g_inside_size - g_lid_play, g_inside_size - g_lid_play,

g_wall_thickness * 2], rounding=g_corner_rounding, edges="Z");

```
difference() {
union() {
// The outer cylinder that will make the presser handle ring
up(g_wall_thickness + g_presser_height * 1.5)
ycyl(l = g_presser_width, d=g_presser_size * 4, rounding =
```

g_corner_rounding);

// The 'stem' of the presser handle

up(g_wall_thickness + g_presser_height / 2)

zcyl(l = g_presser_height, r=g_presser_size,

rounding1=-g_lid_rounding);

}

// Cut away the inside of the presser handle ring. It will also cut

into the top of the stem a bit, hence why

// it's here.

up(g_wall_thickness + g_presser_height * 1.5)

ycyl(l = g_presser_width + ZFE_2, d=g_presser_size * 3,

rounding = -g_corner_rounding);

}

//up(g_wall_thickness)

for (r = [45 : 90 : 360]) {

zrot(r) up(g_wall_thickness)

wedge([g_presser_size, g_presser_size * 5, g_presser_size * 2],

anchor=CENTER+BOTTOM+FRONT);

}

}

ring();

right(150) presser();

Hello all,
I have a complex shape to round for which I'd like to ask if anyone has
suggestions on how to approach this. I've always found rounding and
chamfering to be very tedious using plain OpenSCAD until I found how to do
it with BOSL2, which has been a godsend for the cases I've encountered so
far. But today I have the shape in the picture below, for which the code is
at the bottom. I'm looking to round out all surfaces of the 'fins' that
radiate out from the center 'stem' come in contact with other surfaces.
(this is a presser tool for stuffing food into a mold, the 'fins' are to
distribute the pressure that is manually exerted on the ring to the bottom
platelet).
I've marked the various lines that need to be rounded out in different
colors. Out of these, the turquoise one I could do with a BOSL2
rounding_edge_mask(), and the green one too if I use an appropriate 'ang'
parameter (which I can calculate fairly easily). However I have no idea how
to do the red one or the orange one, nor how to let e.g. the orange one
blend smoothly into the green one for example; and the same for all the
other places where roundovers meet.
Any ideas on how I can do this? Thank you.
regards
Roel
[image: presser_foot_rounding.png]
include <BOSL2-master/std.scad>
include <BOSL2-master/screws.scad>
include <BOSL2-master/threading.scad>
ZFE = 0.01; // Z fighting epsilon, a constant to prevent planes from
overlapping.
// It has a separate name so that you know where it's used
what it's for.
ZFE_2 = ZFE * 2;
ZFE_3 = ZFE * 3;
$fn = $preview ? 64 : 128;
// Global
g_corner_rounding = 2;
// Ring
g_wall_thickness = 3;
g_inside_size = 90;
g_height = 70;
// Lid
g_lid_play = 1;
g_presser_height = 30;
g_presser_width = 20;
g_lid_rounding = 5;
g_presser_size = 10;
module ring() {
outside_size = g_inside_size + (2 * g_wall_thickness);
//cuboid([g_wall_thickness, depth, clip_height], chamfer=1, edges="X",
anchor=LEFT+BOTTOM+FRONT);
difference() {
cuboid([outside_size, outside_size, g_height],
rounding=g_corner_rounding, edges="Z");
cuboid([g_inside_size, g_inside_size, g_height + ZFE_2],
rounding=g_corner_rounding, edges="Z");
}
}
module presser() {
cuboid([g_inside_size - g_lid_play, g_inside_size - g_lid_play,
g_wall_thickness * 2], rounding=g_corner_rounding, edges="Z");
difference() {
union() {
// The outer cylinder that will make the presser handle ring
up(g_wall_thickness + g_presser_height * 1.5)
ycyl(l = g_presser_width, d=g_presser_size * 4, rounding =
g_corner_rounding);
// The 'stem' of the presser handle
up(g_wall_thickness + g_presser_height / 2)
zcyl(l = g_presser_height, r=g_presser_size,
rounding1=-g_lid_rounding);
}
// Cut away the inside of the presser handle ring. It will also cut
into the top of the stem a bit, hence why
// it's here.
up(g_wall_thickness + g_presser_height * 1.5)
ycyl(l = g_presser_width + ZFE_2, d=g_presser_size * 3,
rounding = -g_corner_rounding);
}
//up(g_wall_thickness)
for (r = [45 : 90 : 360]) {
zrot(r) up(g_wall_thickness)
wedge([g_presser_size, g_presser_size * 5, g_presser_size * 2],
anchor=CENTER+BOTTOM+FRONT);
}
}
ring();
right(150) presser();

JB

Jon Bondy

Fri, Aug 23, 2024 11:04 AM

Roel:

The "fins" appear to be parts of cubes, which BOSL2 rounds easily.

Create a rounded cube and then translate() and rotate() it into

position, with some of the cube extending below the bottom surface.

Then clean up the bottom with a difference().

On 8/23/2024 6:48 AM, Roel Vanhout via Discuss wrote:

Hello all,

I have a complex shape to round for which I'd like to ask if anyone

has suggestions on how to approach this. I've always found rounding

and chamfering to be very tedious using plain OpenSCAD until I found

how to do it with BOSL2, which has been a godsend for the cases I've

encountered so far. But today I have the shape in the picture below,

for which the code is at the bottom. I'm looking to round out all

surfaces of the 'fins' that radiate out from the center 'stem' come in

contact with other surfaces. (this is a presser tool for stuffing food

into a mold, the 'fins' are to distribute the pressure that is

manually exerted on the ring to the bottom platelet).

I've marked the various lines that need to be rounded out in different

colors. Out of these, the turquoise one I could do with a BOSL2

rounding_edge_mask(), and the green one too if I use an appropriate

'ang' parameter (which I can calculate fairly easily). However I have

no idea how to do the red one or the orange one, nor how to let e.g.

the orange one blend smoothly into the green one for example; and the

same for all the other places where roundovers meet.

Any ideas on how I can do this? Thank you.

regards

Roel

presser_foot_rounding.png

include <BOSL2-master/std.scad>

include <BOSL2-master/screws.scad>

include <BOSL2-master/threading.scad>

ZFE = 0.01; // Z fighting epsilon, a constant to prevent planes

from overlapping.

// It has a separate name so that you know where it's

used what it's for.

ZFE_2 = ZFE * 2;

ZFE_3 = ZFE * 3;

$fn = $preview ? 64 : 128;

// Global

g_corner_rounding = 2;

// Ring

g_wall_thickness = 3;

g_inside_size = 90;

g_height = 70;

// Lid

g_lid_play = 1;

g_presser_height = 30;

g_presser_width = 20;

g_lid_rounding = 5;

g_presser_size = 10;

module ring() {

outside_size = g_inside_size + (2 * g_wall_thickness);

//cuboid([g_wall_thickness, depth, clip_height], chamfer=1,

edges="X", anchor=LEFT+BOTTOM+FRONT);

difference() {

cuboid([outside_size, outside_size, g_height],

rounding=g_corner_rounding, edges="Z");

cuboid([g_inside_size, g_inside_size, g_height + ZFE_2],

rounding=g_corner_rounding, edges="Z");

}

}

module presser() {

cuboid([g_inside_size - g_lid_play, g_inside_size - g_lid_play,

g_wall_thickness * 2], rounding=g_corner_rounding, edges="Z");

difference() {

union() {

// The outer cylinder that will make the presser handle ring

up(g_wall_thickness + g_presser_height * 1.5)

ycyl(l = g_presser_width, d=g_presser_size * 4,

rounding = g_corner_rounding);

// The 'stem' of the presser handle

up(g_wall_thickness + g_presser_height / 2)

zcyl(l = g_presser_height, r=g_presser_size,

rounding1=-g_lid_rounding);

}

// Cut away the inside of the presser handle ring. It will

also cut into the top of the stem a bit, hence why

// it's here.

up(g_wall_thickness + g_presser_height * 1.5)

ycyl(l = g_presser_width + ZFE_2, d=g_presser_size * 3,

rounding = -g_corner_rounding);

}

//up(g_wall_thickness)

for (r = [45 : 90 : 360]) {

zrot(r) up(g_wall_thickness)

wedge([g_presser_size, g_presser_size * 5, g_presser_size

- 2], anchor=CENTER+BOTTOM+FRONT);

}

}

ring();

right(150) presser();

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

Roel:
The "fins" appear to be parts of cubes, which BOSL2 rounds easily.
Create a rounded cube and then translate() and rotate() it into
position, with some of the cube extending below the bottom surface.
Then clean up the bottom with a difference().
On 8/23/2024 6:48 AM, Roel Vanhout via Discuss wrote:
> Hello all,
>
> I have a complex shape to round for which I'd like to ask if anyone
> has suggestions on how to approach this. I've always found rounding
> and chamfering to be very tedious using plain OpenSCAD until I found
> how to do it with BOSL2, which has been a godsend for the cases I've
> encountered so far. But today I have the shape in the picture below,
> for which the code is at the bottom. I'm looking to round out all
> surfaces of the 'fins' that radiate out from the center 'stem' come in
> contact with other surfaces. (this is a presser tool for stuffing food
> into a mold, the 'fins' are to distribute the pressure that is
> manually exerted on the ring to the bottom platelet).
>
> I've marked the various lines that need to be rounded out in different
> colors. Out of these, the turquoise one I could do with a BOSL2
> rounding_edge_mask(), and the green one too if I use an appropriate
> 'ang' parameter (which I can calculate fairly easily). However I have
> no idea how to do the red one or the orange one, nor how to let e.g.
> the orange one blend smoothly into the green one for example; and the
> same for all the other places where roundovers meet.
>
> Any ideas on how I can do this? Thank you.
>
> regards
>
> Roel
>
>
> presser_foot_rounding.png
>
>
>
>
>
>
> include <BOSL2-master/std.scad>
> include <BOSL2-master/screws.scad>
> include <BOSL2-master/threading.scad>
>
> ZFE = 0.01; // Z fighting epsilon, a constant to prevent planes
> from overlapping.
> // It has a separate name so that you know where it's
> used what it's for.
> ZFE_2 = ZFE * 2;
> ZFE_3 = ZFE * 3;
> $fn = $preview ? 64 : 128;
>
> // Global
> g_corner_rounding = 2;
>
> // Ring
> g_wall_thickness = 3;
> g_inside_size = 90;
> g_height = 70;
>
> // Lid
> g_lid_play = 1;
> g_presser_height = 30;
> g_presser_width = 20;
> g_lid_rounding = 5;
> g_presser_size = 10;
>
> module ring() {
> outside_size = g_inside_size + (2 * g_wall_thickness);
> //cuboid([g_wall_thickness, depth, clip_height], chamfer=1,
> edges="X", anchor=LEFT+BOTTOM+FRONT);
> difference() {
> cuboid([outside_size, outside_size, g_height],
> rounding=g_corner_rounding, edges="Z");
> cuboid([g_inside_size, g_inside_size, g_height + ZFE_2],
> rounding=g_corner_rounding, edges="Z");
> }
> }
>
> module presser() {
> cuboid([g_inside_size - g_lid_play, g_inside_size - g_lid_play,
> g_wall_thickness * 2], rounding=g_corner_rounding, edges="Z");
>
> difference() {
> union() {
> // The outer cylinder that will make the presser handle ring
> up(g_wall_thickness + g_presser_height * 1.5)
> ycyl(l = g_presser_width, d=g_presser_size * 4,
> rounding = g_corner_rounding);
> // The 'stem' of the presser handle
> up(g_wall_thickness + g_presser_height / 2)
> zcyl(l = g_presser_height, r=g_presser_size,
> rounding1=-g_lid_rounding);
> }
> // Cut away the inside of the presser handle ring. It will
> also cut into the top of the stem a bit, hence why
> // it's here.
> up(g_wall_thickness + g_presser_height * 1.5)
> ycyl(l = g_presser_width + ZFE_2, d=g_presser_size * 3,
> rounding = -g_corner_rounding);
> }
> //up(g_wall_thickness)
> for (r = [45 : 90 : 360]) {
> zrot(r) up(g_wall_thickness)
> wedge([g_presser_size, g_presser_size * 5, g_presser_size
> * 2], anchor=CENTER+BOTTOM+FRONT);
> }
> }
>
> ring();
> right(150) presser();
>
> _______________________________________________
> 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

DP

Dan Perry

Fri, Aug 23, 2024 11:41 AM

I've done something similar using BOSL2 rounded_prism(), but I don't have

any idea how to handle the red fillet, or even the orange vertical fillet.

The solution becomes almost trivial if that center cylinder could be

6-sided or 8-sided.

Dan

On Fri, Aug 23, 2024 at 11:48 AM Roel Vanhout via Discuss <

discuss@lists.openscad.org> wrote:

Hello all,

I have a complex shape to round for which I'd like to ask if anyone has

suggestions on how to approach this. I've always found rounding and

chamfering to be very tedious using plain OpenSCAD until I found how to do

it with BOSL2, which has been a godsend for the cases I've encountered so

far. But today I have the shape in the picture below, for which the code is

at the bottom. I'm looking to round out all surfaces of the 'fins' that

radiate out from the center 'stem' come in contact with other surfaces.

(this is a presser tool for stuffing food into a mold, the 'fins' are to

distribute the pressure that is manually exerted on the ring to the bottom

platelet).

I've marked the various lines that need to be rounded out in different

colors. Out of these, the turquoise one I could do with a BOSL2

rounding_edge_mask(), and the green one too if I use an appropriate 'ang'

parameter (which I can calculate fairly easily). However I have no idea how

to do the red one or the orange one, nor how to let e.g. the orange one

blend smoothly into the green one for example; and the same for all the

other places where roundovers meet.

Any ideas on how I can do this? Thank you.

regards

Roel

[image: presser_foot_rounding.png]

include <BOSL2-master/std.scad>

include <BOSL2-master/screws.scad>

include <BOSL2-master/threading.scad>

ZFE = 0.01; // Z fighting epsilon, a constant to prevent planes from

overlapping.

// It has a separate name so that you know where it's used

what it's for.

ZFE_2 = ZFE * 2;

ZFE_3 = ZFE * 3;

$fn = $preview ? 64 : 128;

// Global

g_corner_rounding = 2;

// Ring

g_wall_thickness = 3;

g_inside_size = 90;

g_height = 70;

// Lid

g_lid_play = 1;

g_presser_height = 30;

g_presser_width = 20;

g_lid_rounding = 5;

g_presser_size = 10;

module ring() {

outside_size = g_inside_size + (2 * g_wall_thickness);

//cuboid([g_wall_thickness, depth, clip_height], chamfer=1, edges="X",

anchor=LEFT+BOTTOM+FRONT);

difference() {

cuboid([outside_size, outside_size, g_height],

rounding=g_corner_rounding, edges="Z");

cuboid([g_inside_size, g_inside_size, g_height + ZFE_2],

rounding=g_corner_rounding, edges="Z");

}

}

module presser() {

cuboid([g_inside_size - g_lid_play, g_inside_size - g_lid_play,

g_wall_thickness * 2], rounding=g_corner_rounding, edges="Z");

```
difference() {
union() {
// The outer cylinder that will make the presser handle ring
up(g_wall_thickness + g_presser_height * 1.5)
ycyl(l = g_presser_width, d=g_presser_size * 4, rounding =
```

g_corner_rounding);

// The 'stem' of the presser handle

up(g_wall_thickness + g_presser_height / 2)

zcyl(l = g_presser_height, r=g_presser_size,

rounding1=-g_lid_rounding);

}

// Cut away the inside of the presser handle ring. It will also

cut into the top of the stem a bit, hence why

// it's here.

up(g_wall_thickness + g_presser_height * 1.5)

ycyl(l = g_presser_width + ZFE_2, d=g_presser_size * 3,

rounding = -g_corner_rounding);

}

//up(g_wall_thickness)

for (r = [45 : 90 : 360]) {

zrot(r) up(g_wall_thickness)

wedge([g_presser_size, g_presser_size * 5, g_presser_size *

2], anchor=CENTER+BOTTOM+FRONT);

}

}

ring();

right(150) presser();

OpenSCAD mailing list

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

I've done something similar using BOSL2 rounded_prism(), but I don't have
any idea how to handle the red fillet, or even the orange vertical fillet.
The solution becomes almost trivial if that center cylinder could be
6-sided or 8-sided.
Dan
On Fri, Aug 23, 2024 at 11:48 AM Roel Vanhout via Discuss <
discuss@lists.openscad.org> wrote:
> Hello all,
>
> I have a complex shape to round for which I'd like to ask if anyone has
> suggestions on how to approach this. I've always found rounding and
> chamfering to be very tedious using plain OpenSCAD until I found how to do
> it with BOSL2, which has been a godsend for the cases I've encountered so
> far. But today I have the shape in the picture below, for which the code is
> at the bottom. I'm looking to round out all surfaces of the 'fins' that
> radiate out from the center 'stem' come in contact with other surfaces.
> (this is a presser tool for stuffing food into a mold, the 'fins' are to
> distribute the pressure that is manually exerted on the ring to the bottom
> platelet).
>
> I've marked the various lines that need to be rounded out in different
> colors. Out of these, the turquoise one I could do with a BOSL2
> rounding_edge_mask(), and the green one too if I use an appropriate 'ang'
> parameter (which I can calculate fairly easily). However I have no idea how
> to do the red one or the orange one, nor how to let e.g. the orange one
> blend smoothly into the green one for example; and the same for all the
> other places where roundovers meet.
>
> Any ideas on how I can do this? Thank you.
>
> regards
>
> Roel
>
>
> [image: presser_foot_rounding.png]
>
>
>
>
>
>
> include <BOSL2-master/std.scad>
> include <BOSL2-master/screws.scad>
> include <BOSL2-master/threading.scad>
>
> ZFE = 0.01; // Z fighting epsilon, a constant to prevent planes from
> overlapping.
> // It has a separate name so that you know where it's used
> what it's for.
> ZFE_2 = ZFE * 2;
> ZFE_3 = ZFE * 3;
> $fn = $preview ? 64 : 128;
>
> // Global
> g_corner_rounding = 2;
>
> // Ring
> g_wall_thickness = 3;
> g_inside_size = 90;
> g_height = 70;
>
> // Lid
> g_lid_play = 1;
> g_presser_height = 30;
> g_presser_width = 20;
> g_lid_rounding = 5;
> g_presser_size = 10;
>
> module ring() {
> outside_size = g_inside_size + (2 * g_wall_thickness);
> //cuboid([g_wall_thickness, depth, clip_height], chamfer=1, edges="X",
> anchor=LEFT+BOTTOM+FRONT);
> difference() {
> cuboid([outside_size, outside_size, g_height],
> rounding=g_corner_rounding, edges="Z");
> cuboid([g_inside_size, g_inside_size, g_height + ZFE_2],
> rounding=g_corner_rounding, edges="Z");
> }
> }
>
> module presser() {
> cuboid([g_inside_size - g_lid_play, g_inside_size - g_lid_play,
> g_wall_thickness * 2], rounding=g_corner_rounding, edges="Z");
>
> difference() {
> union() {
> // The outer cylinder that will make the presser handle ring
> up(g_wall_thickness + g_presser_height * 1.5)
> ycyl(l = g_presser_width, d=g_presser_size * 4, rounding =
> g_corner_rounding);
> // The 'stem' of the presser handle
> up(g_wall_thickness + g_presser_height / 2)
> zcyl(l = g_presser_height, r=g_presser_size,
> rounding1=-g_lid_rounding);
> }
> // Cut away the inside of the presser handle ring. It will also
> cut into the top of the stem a bit, hence why
> // it's here.
> up(g_wall_thickness + g_presser_height * 1.5)
> ycyl(l = g_presser_width + ZFE_2, d=g_presser_size * 3,
> rounding = -g_corner_rounding);
> }
> //up(g_wall_thickness)
> for (r = [45 : 90 : 360]) {
> zrot(r) up(g_wall_thickness)
> wedge([g_presser_size, g_presser_size * 5, g_presser_size *
> 2], anchor=CENTER+BOTTOM+FRONT);
> }
> }
>
> ring();
> right(150) presser();
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
>

PK

Peter Kriens

Fri, Aug 23, 2024 12:02 PM

You might want to look at `join_prism`

. It looks tricky to use but I think you should be able to make this work for you looking at the description. But quite complex.

On 23 Aug 2024, at 12:48, Roel Vanhout via Discuss discuss@lists.openscad.org wrote:

Hello all,

Any ideas on how I can do this? Thank you.

regards

Roel

<presser_foot_rounding.png>

include <BOSL2-master/screws.scad>

include <BOSL2-master/threading.scad>

// It has a separate name so that you know where it's used what it's for.

ZFE_2 = ZFE * 2;

ZFE_3 = ZFE * 3;

$fn = $preview ? 64 : 128;

// Global

g_corner_rounding = 2;

// Ring

g_wall_thickness = 3;

g_inside_size = 90;

g_height = 70;

g_lid_play = 1;

g_presser_height = 30;

g_presser_width = 20;

g_lid_rounding = 5;

g_presser_size = 10;

outside_size = g_inside_size + (2 * g_wall_thickness);

//cuboid([g_wall_thickness, depth, clip_height], chamfer=1, edges="X", anchor=LEFT+BOTTOM+FRONT);

difference() {

cuboid([outside_size, outside_size, g_height], rounding=g_corner_rounding, edges="Z");

cuboid([g_inside_size, g_inside_size, g_height + ZFE_2], rounding=g_corner_rounding, edges="Z");

}

}

cuboid([g_inside_size - g_lid_play, g_inside_size - g_lid_play, g_wall_thickness * 2], rounding=g_corner_rounding, edges="Z");

```
difference() {
union() {
// The outer cylinder that will make the presser handle ring
up(g_wall_thickness + g_presser_height * 1.5)
ycyl(l = g_presser_width, d=g_presser_size * 4, rounding = g_corner_rounding);
// The 'stem' of the presser handle
up(g_wall_thickness + g_presser_height / 2)
zcyl(l = g_presser_height, r=g_presser_size, rounding1=-g_lid_rounding);
}
// Cut away the inside of the presser handle ring. It will also cut into the top of the stem a bit, hence why
// it's here.
up(g_wall_thickness + g_presser_height * 1.5)
ycyl(l = g_presser_width + ZFE_2, d=g_presser_size * 3, rounding = -g_corner_rounding);
}
//up(g_wall_thickness)
for (r = [45 : 90 : 360]) {
zrot(r) up(g_wall_thickness)
wedge([g_presser_size, g_presser_size * 5, g_presser_size * 2], anchor=CENTER+BOTTOM+FRONT);
}
```

}

ring();

right(150) presser();

OpenSCAD mailing list

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

You might want to look at `join_prism`. It looks tricky to use but I think you should be able to make this work for you looking at the description. But quite complex.
> On 23 Aug 2024, at 12:48, Roel Vanhout via Discuss <discuss@lists.openscad.org> wrote:
>
> Hello all,
>
> I have a complex shape to round for which I'd like to ask if anyone has suggestions on how to approach this. I've always found rounding and chamfering to be very tedious using plain OpenSCAD until I found how to do it with BOSL2, which has been a godsend for the cases I've encountered so far. But today I have the shape in the picture below, for which the code is at the bottom. I'm looking to round out all surfaces of the 'fins' that radiate out from the center 'stem' come in contact with other surfaces. (this is a presser tool for stuffing food into a mold, the 'fins' are to distribute the pressure that is manually exerted on the ring to the bottom platelet).
>
> I've marked the various lines that need to be rounded out in different colors. Out of these, the turquoise one I could do with a BOSL2 rounding_edge_mask(), and the green one too if I use an appropriate 'ang' parameter (which I can calculate fairly easily). However I have no idea how to do the red one or the orange one, nor how to let e.g. the orange one blend smoothly into the green one for example; and the same for all the other places where roundovers meet.
>
> Any ideas on how I can do this? Thank you.
>
> regards
>
> Roel
>
>
> <presser_foot_rounding.png>
>
>
>
>
>
>
> include <BOSL2-master/std.scad>
> include <BOSL2-master/screws.scad>
> include <BOSL2-master/threading.scad>
>
> ZFE = 0.01; // Z fighting epsilon, a constant to prevent planes from overlapping.
> // It has a separate name so that you know where it's used what it's for.
> ZFE_2 = ZFE * 2;
> ZFE_3 = ZFE * 3;
> $fn = $preview ? 64 : 128;
>
> // Global
> g_corner_rounding = 2;
>
> // Ring
> g_wall_thickness = 3;
> g_inside_size = 90;
> g_height = 70;
>
> // Lid
> g_lid_play = 1;
> g_presser_height = 30;
> g_presser_width = 20;
> g_lid_rounding = 5;
> g_presser_size = 10;
>
> module ring() {
> outside_size = g_inside_size + (2 * g_wall_thickness);
> //cuboid([g_wall_thickness, depth, clip_height], chamfer=1, edges="X", anchor=LEFT+BOTTOM+FRONT);
> difference() {
> cuboid([outside_size, outside_size, g_height], rounding=g_corner_rounding, edges="Z");
> cuboid([g_inside_size, g_inside_size, g_height + ZFE_2], rounding=g_corner_rounding, edges="Z");
> }
> }
>
> module presser() {
> cuboid([g_inside_size - g_lid_play, g_inside_size - g_lid_play, g_wall_thickness * 2], rounding=g_corner_rounding, edges="Z");
>
> difference() {
> union() {
> // The outer cylinder that will make the presser handle ring
> up(g_wall_thickness + g_presser_height * 1.5)
> ycyl(l = g_presser_width, d=g_presser_size * 4, rounding = g_corner_rounding);
> // The 'stem' of the presser handle
> up(g_wall_thickness + g_presser_height / 2)
> zcyl(l = g_presser_height, r=g_presser_size, rounding1=-g_lid_rounding);
> }
> // Cut away the inside of the presser handle ring. It will also cut into the top of the stem a bit, hence why
> // it's here.
> up(g_wall_thickness + g_presser_height * 1.5)
> ycyl(l = g_presser_width + ZFE_2, d=g_presser_size * 3, rounding = -g_corner_rounding);
> }
> //up(g_wall_thickness)
> for (r = [45 : 90 : 360]) {
> zrot(r) up(g_wall_thickness)
> wedge([g_presser_size, g_presser_size * 5, g_presser_size * 2], anchor=CENTER+BOTTOM+FRONT);
> }
> }
>
> ring();
> right(150) presser();
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org

SP

Sanjeev Prabhakar

Sat, Aug 24, 2024 2:07 AM

This and other far more complex fillets can be created using python codes

integrated with openscad.

But then some elementary understanding of python is required.

In pure openscad this could be very challenging.

On Fri, 23 Aug, 2024, 4:19 pm Roel Vanhout via Discuss, <

discuss@lists.openscad.org> wrote:

Hello all,

suggestions on how to approach this. I've always found rounding and

chamfering to be very tedious using plain OpenSCAD until I found how to do

it with BOSL2, which has been a godsend for the cases I've encountered so

far. But today I have the shape in the picture below, for which the code is

at the bottom. I'm looking to round out all surfaces of the 'fins' that

radiate out from the center 'stem' come in contact with other surfaces.

(this is a presser tool for stuffing food into a mold, the 'fins' are to

distribute the pressure that is manually exerted on the ring to the bottom

platelet).

colors. Out of these, the turquoise one I could do with a BOSL2

rounding_edge_mask(), and the green one too if I use an appropriate 'ang'

parameter (which I can calculate fairly easily). However I have no idea how

to do the red one or the orange one, nor how to let e.g. the orange one

blend smoothly into the green one for example; and the same for all the

other places where roundovers meet.

Any ideas on how I can do this? Thank you.

regards

Roel

[image: presser_foot_rounding.png]

include <BOSL2-master/screws.scad>

include <BOSL2-master/threading.scad>

overlapping.

// It has a separate name so that you know where it's used

what it's for.

ZFE_2 = ZFE * 2;

ZFE_3 = ZFE * 3;

$fn = $preview ? 64 : 128;

// Global

g_corner_rounding = 2;

// Ring

g_wall_thickness = 3;

g_inside_size = 90;

g_height = 70;

g_lid_play = 1;

g_presser_height = 30;

g_presser_width = 20;

g_lid_rounding = 5;

g_presser_size = 10;

outside_size = g_inside_size + (2 * g_wall_thickness);

//cuboid([g_wall_thickness, depth, clip_height], chamfer=1, edges="X",

anchor=LEFT+BOTTOM+FRONT);

difference() {

cuboid([outside_size, outside_size, g_height],

rounding=g_corner_rounding, edges="Z");

cuboid([g_inside_size, g_inside_size, g_height + ZFE_2],

rounding=g_corner_rounding, edges="Z");

}

}

cuboid([g_inside_size - g_lid_play, g_inside_size - g_lid_play,

g_wall_thickness * 2], rounding=g_corner_rounding, edges="Z");

```
difference() {
union() {
// The outer cylinder that will make the presser handle ring
up(g_wall_thickness + g_presser_height * 1.5)
ycyl(l = g_presser_width, d=g_presser_size * 4, rounding =
```

g_corner_rounding);

// The 'stem' of the presser handle

up(g_wall_thickness + g_presser_height / 2)

zcyl(l = g_presser_height, r=g_presser_size,

rounding1=-g_lid_rounding);

}

// Cut away the inside of the presser handle ring. It will also

cut into the top of the stem a bit, hence why

// it's here.

up(g_wall_thickness + g_presser_height * 1.5)

ycyl(l = g_presser_width + ZFE_2, d=g_presser_size * 3,

rounding = -g_corner_rounding);

}

//up(g_wall_thickness)

for (r = [45 : 90 : 360]) {

zrot(r) up(g_wall_thickness)

wedge([g_presser_size, g_presser_size * 5, g_presser_size *

2], anchor=CENTER+BOTTOM+FRONT);

}

}

ring();

right(150) presser();

OpenSCAD mailing list

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

This and other far more complex fillets can be created using python codes
integrated with openscad.
But then some elementary understanding of python is required.
In pure openscad this could be very challenging.
On Fri, 23 Aug, 2024, 4:19 pm Roel Vanhout via Discuss, <
discuss@lists.openscad.org> wrote:
> Hello all,
>
> I have a complex shape to round for which I'd like to ask if anyone has
> suggestions on how to approach this. I've always found rounding and
> chamfering to be very tedious using plain OpenSCAD until I found how to do
> it with BOSL2, which has been a godsend for the cases I've encountered so
> far. But today I have the shape in the picture below, for which the code is
> at the bottom. I'm looking to round out all surfaces of the 'fins' that
> radiate out from the center 'stem' come in contact with other surfaces.
> (this is a presser tool for stuffing food into a mold, the 'fins' are to
> distribute the pressure that is manually exerted on the ring to the bottom
> platelet).
>
> I've marked the various lines that need to be rounded out in different
> colors. Out of these, the turquoise one I could do with a BOSL2
> rounding_edge_mask(), and the green one too if I use an appropriate 'ang'
> parameter (which I can calculate fairly easily). However I have no idea how
> to do the red one or the orange one, nor how to let e.g. the orange one
> blend smoothly into the green one for example; and the same for all the
> other places where roundovers meet.
>
> Any ideas on how I can do this? Thank you.
>
> regards
>
> Roel
>
>
> [image: presser_foot_rounding.png]
>
>
>
>
>
>
> include <BOSL2-master/std.scad>
> include <BOSL2-master/screws.scad>
> include <BOSL2-master/threading.scad>
>
> ZFE = 0.01; // Z fighting epsilon, a constant to prevent planes from
> overlapping.
> // It has a separate name so that you know where it's used
> what it's for.
> ZFE_2 = ZFE * 2;
> ZFE_3 = ZFE * 3;
> $fn = $preview ? 64 : 128;
>
> // Global
> g_corner_rounding = 2;
>
> // Ring
> g_wall_thickness = 3;
> g_inside_size = 90;
> g_height = 70;
>
> // Lid
> g_lid_play = 1;
> g_presser_height = 30;
> g_presser_width = 20;
> g_lid_rounding = 5;
> g_presser_size = 10;
>
> module ring() {
> outside_size = g_inside_size + (2 * g_wall_thickness);
> //cuboid([g_wall_thickness, depth, clip_height], chamfer=1, edges="X",
> anchor=LEFT+BOTTOM+FRONT);
> difference() {
> cuboid([outside_size, outside_size, g_height],
> rounding=g_corner_rounding, edges="Z");
> cuboid([g_inside_size, g_inside_size, g_height + ZFE_2],
> rounding=g_corner_rounding, edges="Z");
> }
> }
>
> module presser() {
> cuboid([g_inside_size - g_lid_play, g_inside_size - g_lid_play,
> g_wall_thickness * 2], rounding=g_corner_rounding, edges="Z");
>
> difference() {
> union() {
> // The outer cylinder that will make the presser handle ring
> up(g_wall_thickness + g_presser_height * 1.5)
> ycyl(l = g_presser_width, d=g_presser_size * 4, rounding =
> g_corner_rounding);
> // The 'stem' of the presser handle
> up(g_wall_thickness + g_presser_height / 2)
> zcyl(l = g_presser_height, r=g_presser_size,
> rounding1=-g_lid_rounding);
> }
> // Cut away the inside of the presser handle ring. It will also
> cut into the top of the stem a bit, hence why
> // it's here.
> up(g_wall_thickness + g_presser_height * 1.5)
> ycyl(l = g_presser_width + ZFE_2, d=g_presser_size * 3,
> rounding = -g_corner_rounding);
> }
> //up(g_wall_thickness)
> for (r = [45 : 90 : 360]) {
> zrot(r) up(g_wall_thickness)
> wedge([g_presser_size, g_presser_size * 5, g_presser_size *
> 2], anchor=CENTER+BOTTOM+FRONT);
> }
> }
>
> ring();
> right(150) presser();
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
>

SP

Sanjeev Prabhakar

Sat, Aug 24, 2024 3:49 AM

I gave it a try

[image: Screenshot 2024-08-24 at 9.16.07 AM.png]

On Fri, 23 Aug 2024 at 16:19, Roel Vanhout via Discuss <

discuss@lists.openscad.org> wrote:

Hello all,

suggestions on how to approach this. I've always found rounding and

chamfering to be very tedious using plain OpenSCAD until I found how to do

it with BOSL2, which has been a godsend for the cases I've encountered so

far. But today I have the shape in the picture below, for which the code is

at the bottom. I'm looking to round out all surfaces of the 'fins' that

radiate out from the center 'stem' come in contact with other surfaces.

(this is a presser tool for stuffing food into a mold, the 'fins' are to

distribute the pressure that is manually exerted on the ring to the bottom

platelet).

colors. Out of these, the turquoise one I could do with a BOSL2

rounding_edge_mask(), and the green one too if I use an appropriate 'ang'

parameter (which I can calculate fairly easily). However I have no idea how

to do the red one or the orange one, nor how to let e.g. the orange one

blend smoothly into the green one for example; and the same for all the

other places where roundovers meet.

Any ideas on how I can do this? Thank you.

regards

Roel

[image: presser_foot_rounding.png]

include <BOSL2-master/screws.scad>

include <BOSL2-master/threading.scad>

overlapping.

// It has a separate name so that you know where it's used

what it's for.

ZFE_2 = ZFE * 2;

ZFE_3 = ZFE * 3;

$fn = $preview ? 64 : 128;

// Global

g_corner_rounding = 2;

// Ring

g_wall_thickness = 3;

g_inside_size = 90;

g_height = 70;

g_lid_play = 1;

g_presser_height = 30;

g_presser_width = 20;

g_lid_rounding = 5;

g_presser_size = 10;

outside_size = g_inside_size + (2 * g_wall_thickness);

//cuboid([g_wall_thickness, depth, clip_height], chamfer=1, edges="X",

anchor=LEFT+BOTTOM+FRONT);

difference() {

cuboid([outside_size, outside_size, g_height],

rounding=g_corner_rounding, edges="Z");

cuboid([g_inside_size, g_inside_size, g_height + ZFE_2],

rounding=g_corner_rounding, edges="Z");

}

}

cuboid([g_inside_size - g_lid_play, g_inside_size - g_lid_play,

g_wall_thickness * 2], rounding=g_corner_rounding, edges="Z");

```
difference() {
union() {
// The outer cylinder that will make the presser handle ring
up(g_wall_thickness + g_presser_height * 1.5)
ycyl(l = g_presser_width, d=g_presser_size * 4, rounding =
```

// The 'stem' of the presser handle

up(g_wall_thickness + g_presser_height / 2)

zcyl(l = g_presser_height, r=g_presser_size,

rounding1=-g_lid_rounding);

}

// Cut away the inside of the presser handle ring. It will also

cut into the top of the stem a bit, hence why

// it's here.

up(g_wall_thickness + g_presser_height * 1.5)

ycyl(l = g_presser_width + ZFE_2, d=g_presser_size * 3,

rounding = -g_corner_rounding);

}

//up(g_wall_thickness)

for (r = [45 : 90 : 360]) {

zrot(r) up(g_wall_thickness)

wedge([g_presser_size, g_presser_size * 5, g_presser_size *

2], anchor=CENTER+BOTTOM+FRONT);

}

}

ring();

right(150) presser();

OpenSCAD mailing list

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

I gave it a try
[image: Screenshot 2024-08-24 at 9.16.07 AM.png]
On Fri, 23 Aug 2024 at 16:19, Roel Vanhout via Discuss <
discuss@lists.openscad.org> wrote:
> Hello all,
>
> I have a complex shape to round for which I'd like to ask if anyone has
> suggestions on how to approach this. I've always found rounding and
> chamfering to be very tedious using plain OpenSCAD until I found how to do
> it with BOSL2, which has been a godsend for the cases I've encountered so
> far. But today I have the shape in the picture below, for which the code is
> at the bottom. I'm looking to round out all surfaces of the 'fins' that
> radiate out from the center 'stem' come in contact with other surfaces.
> (this is a presser tool for stuffing food into a mold, the 'fins' are to
> distribute the pressure that is manually exerted on the ring to the bottom
> platelet).
>
> I've marked the various lines that need to be rounded out in different
> colors. Out of these, the turquoise one I could do with a BOSL2
> rounding_edge_mask(), and the green one too if I use an appropriate 'ang'
> parameter (which I can calculate fairly easily). However I have no idea how
> to do the red one or the orange one, nor how to let e.g. the orange one
> blend smoothly into the green one for example; and the same for all the
> other places where roundovers meet.
>
> Any ideas on how I can do this? Thank you.
>
> regards
>
> Roel
>
>
> [image: presser_foot_rounding.png]
>
>
>
>
>
>
> include <BOSL2-master/std.scad>
> include <BOSL2-master/screws.scad>
> include <BOSL2-master/threading.scad>
>
> ZFE = 0.01; // Z fighting epsilon, a constant to prevent planes from
> overlapping.
> // It has a separate name so that you know where it's used
> what it's for.
> ZFE_2 = ZFE * 2;
> ZFE_3 = ZFE * 3;
> $fn = $preview ? 64 : 128;
>
> // Global
> g_corner_rounding = 2;
>
> // Ring
> g_wall_thickness = 3;
> g_inside_size = 90;
> g_height = 70;
>
> // Lid
> g_lid_play = 1;
> g_presser_height = 30;
> g_presser_width = 20;
> g_lid_rounding = 5;
> g_presser_size = 10;
>
> module ring() {
> outside_size = g_inside_size + (2 * g_wall_thickness);
> //cuboid([g_wall_thickness, depth, clip_height], chamfer=1, edges="X",
> anchor=LEFT+BOTTOM+FRONT);
> difference() {
> cuboid([outside_size, outside_size, g_height],
> rounding=g_corner_rounding, edges="Z");
> cuboid([g_inside_size, g_inside_size, g_height + ZFE_2],
> rounding=g_corner_rounding, edges="Z");
> }
> }
>
> module presser() {
> cuboid([g_inside_size - g_lid_play, g_inside_size - g_lid_play,
> g_wall_thickness * 2], rounding=g_corner_rounding, edges="Z");
>
> difference() {
> union() {
> // The outer cylinder that will make the presser handle ring
> up(g_wall_thickness + g_presser_height * 1.5)
> ycyl(l = g_presser_width, d=g_presser_size * 4, rounding =
> g_corner_rounding);
> // The 'stem' of the presser handle
> up(g_wall_thickness + g_presser_height / 2)
> zcyl(l = g_presser_height, r=g_presser_size,
> rounding1=-g_lid_rounding);
> }
> // Cut away the inside of the presser handle ring. It will also
> cut into the top of the stem a bit, hence why
> // it's here.
> up(g_wall_thickness + g_presser_height * 1.5)
> ycyl(l = g_presser_width + ZFE_2, d=g_presser_size * 3,
> rounding = -g_corner_rounding);
> }
> //up(g_wall_thickness)
> for (r = [45 : 90 : 360]) {
> zrot(r) up(g_wall_thickness)
> wedge([g_presser_size, g_presser_size * 5, g_presser_size *
> 2], anchor=CENTER+BOTTOM+FRONT);
> }
> }
>
> ring();
> right(150) presser();
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
>

RV

Roel Vanhout

Sat, Aug 24, 2024 3:35 PM

Thank you for that, join_prism() is an amazing module, which has gotten me

to the first image below using the code below that image. Although I can

make it 'good enough' by increasing the rounding at the base of the

cylinder and setting 'debug = true' to allow self-intersection in the

join_prism(), I'm wondering if there's a clean solution for the gap at the

bottom? The problem stems from the rounding not being able to handle

'flowing' into each other. See the last image below, which is with debug

set to 'true' to allow self-intersection - this is with the cylinder and

base plate hidden so that you can clearly see the corner at the bottom. As

I said, I can sort of manage to get all roundings to just intersect each

other and then I'm left with a sort of hard, inward corner where they all

join, but I'm wondering if I'm missing something from the myriad of

join_prism() options.

[image: image.png]

module join_prism_test() {

cuboid([100, 100, 5], anchor=CENTER+BOTTOM+FRONT);

up(5) back(10)

zcyl(l = 50, d = 20, , $fn=128, rounding1 = -2,

anchor=CENTER+BOTTOM);

```
polygon_ = rect([4, 26.4], rounding = 2);
base_T = back(0);
aux_T = up(35) * fwd(30) * yrot(90);
up(5) back(40)
join_prism(polygon_,
"plane", // 'base'
base_T = base_T,
aux = "cylinder",
aux_d = 20,
aux_T = aux_T,
fillet = 2,
//debug = true
);
```

}

[image: image.png]

On Fri, Aug 23, 2024 at 2:02 PM Peter Kriens peter.kriens@aqute.biz wrote:

You might want to look at `join_prism`

. It looks tricky to use but I think

you should be able to make this work for you looking at the description.

But quite complex.

On 23 Aug 2024, at 12:48, Roel Vanhout via Discuss <

discuss@lists.openscad.org> wrote:

Hello all,

I have a complex shape to round for which I'd like to ask if anyone has

suggestions on how to approach this. I've always found rounding and

chamfering to be very tedious using plain OpenSCAD until I found how to do

it with BOSL2, which has been a godsend for the cases I've encountered so

far. But today I have the shape in the picture below, for which the code is

at the bottom. I'm looking to round out all surfaces of the 'fins' that

radiate out from the center 'stem' come in contact with other surfaces.

(this is a presser tool for stuffing food into a mold, the 'fins' are to

distribute the pressure that is manually exerted on the ring to the bottom

platelet).

I've marked the various lines that need to be rounded out in different

colors. Out of these, the turquoise one I could do with a BOSL2

rounding_edge_mask(), and the green one too if I use an appropriate 'ang'

parameter (which I can calculate fairly easily). However I have no idea how

to do the red one or the orange one, nor how to let e.g. the orange one

blend smoothly into the green one for example; and the same for all the

other places where roundovers meet.

Any ideas on how I can do this? Thank you.

regards

Roel

<presser_foot_rounding.png>

include <BOSL2-master/screws.scad>

include <BOSL2-master/threading.scad>

ZFE = 0.01; // Z fighting epsilon, a constant to prevent planes from

overlapping.

```
// It has a separate name so that you know where it's
```

used what it's for.

ZFE_2 = ZFE * 2;

ZFE_3 = ZFE * 3;

$fn = $preview ? 64 : 128;

// Global

g_corner_rounding = 2;

// Ring

g_wall_thickness = 3;

g_inside_size = 90;

g_height = 70;

g_lid_play = 1;

g_presser_height = 30;

g_presser_width = 20;

g_lid_rounding = 5;

g_presser_size = 10;

module ring() {

outside_size = g_inside_size + (2 * g_wall_thickness);

//cuboid([g_wall_thickness, depth, clip_height], chamfer=1,

edges="X", anchor=LEFT+BOTTOM+FRONT);

```
difference() {
cuboid([outside_size, outside_size, g_height],
```

rounding=g_corner_rounding, edges="Z");

```
cuboid([g_inside_size, g_inside_size, g_height + ZFE_2],
```

rounding=g_corner_rounding, edges="Z");

```
}
```

}

module presser() {

cuboid([g_inside_size - g_lid_play, g_inside_size - g_lid_play,

g_wall_thickness * 2], rounding=g_corner_rounding, edges="Z");

```
difference() {
union() {
// The outer cylinder that will make the presser handle ring
up(g_wall_thickness + g_presser_height * 1.5)
ycyl(l = g_presser_width, d=g_presser_size * 4, rounding
```

= g_corner_rounding);

```
// The 'stem' of the presser handle
up(g_wall_thickness + g_presser_height / 2)
zcyl(l = g_presser_height, r=g_presser_size,
```

rounding1=-g_lid_rounding);

```
}
// Cut away the inside of the presser handle ring. It will also
```

cut into the top of the stem a bit, hence why

```
// it's here.
up(g_wall_thickness + g_presser_height * 1.5)
ycyl(l = g_presser_width + ZFE_2, d=g_presser_size * 3,
```

rounding = -g_corner_rounding);

```
}
//up(g_wall_thickness)
for (r = [45 : 90 : 360]) {
zrot(r) up(g_wall_thickness)
wedge([g_presser_size, g_presser_size * 5, g_presser_size *
```

2], anchor=CENTER+BOTTOM+FRONT);

```
}
```

}

ring();

right(150) presser();

OpenSCAD mailing list

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

Thank you for that, join_prism() is an amazing module, which has gotten me
to the first image below using the code below that image. Although I can
make it 'good enough' by increasing the rounding at the base of the
cylinder and setting 'debug = true' to allow self-intersection in the
join_prism(), I'm wondering if there's a clean solution for the gap at the
bottom? The problem stems from the rounding not being able to handle
'flowing' into each other. See the last image below, which is with debug
set to 'true' to allow self-intersection - this is with the cylinder and
base plate hidden so that you can clearly see the corner at the bottom. As
I said, I can sort of manage to get all roundings to just intersect each
other and then I'm left with a sort of hard, inward corner where they all
join, but I'm wondering if I'm missing something from the myriad of
join_prism() options.
[image: image.png]
module join_prism_test() {
cuboid([100, 100, 5], anchor=CENTER+BOTTOM+FRONT);
up(5) back(10)
zcyl(l = 50, d = 20, , $fn=128, rounding1 = -2,
anchor=CENTER+BOTTOM);
polygon_ = rect([4, 26.4], rounding = 2);
base_T = back(0);
aux_T = up(35) * fwd(30) * yrot(90);
up(5) back(40)
join_prism(polygon_,
"plane", // 'base'
base_T = base_T,
aux = "cylinder",
aux_d = 20,
aux_T = aux_T,
fillet = 2,
//debug = true
);
}
[image: image.png]
On Fri, Aug 23, 2024 at 2:02 PM Peter Kriens <peter.kriens@aqute.biz> wrote:
> You might want to look at `join_prism`. It looks tricky to use but I think
> you should be able to make this work for you looking at the description.
> But quite complex.
>
>
>
>
>
>
> > On 23 Aug 2024, at 12:48, Roel Vanhout via Discuss <
> discuss@lists.openscad.org> wrote:
> >
> > Hello all,
> >
> > I have a complex shape to round for which I'd like to ask if anyone has
> suggestions on how to approach this. I've always found rounding and
> chamfering to be very tedious using plain OpenSCAD until I found how to do
> it with BOSL2, which has been a godsend for the cases I've encountered so
> far. But today I have the shape in the picture below, for which the code is
> at the bottom. I'm looking to round out all surfaces of the 'fins' that
> radiate out from the center 'stem' come in contact with other surfaces.
> (this is a presser tool for stuffing food into a mold, the 'fins' are to
> distribute the pressure that is manually exerted on the ring to the bottom
> platelet).
> >
> > I've marked the various lines that need to be rounded out in different
> colors. Out of these, the turquoise one I could do with a BOSL2
> rounding_edge_mask(), and the green one too if I use an appropriate 'ang'
> parameter (which I can calculate fairly easily). However I have no idea how
> to do the red one or the orange one, nor how to let e.g. the orange one
> blend smoothly into the green one for example; and the same for all the
> other places where roundovers meet.
> >
> > Any ideas on how I can do this? Thank you.
> >
> > regards
> >
> > Roel
> >
> >
> > <presser_foot_rounding.png>
> >
> >
> >
> >
> >
> >
> > include <BOSL2-master/std.scad>
> > include <BOSL2-master/screws.scad>
> > include <BOSL2-master/threading.scad>
> >
> > ZFE = 0.01; // Z fighting epsilon, a constant to prevent planes from
> overlapping.
> > // It has a separate name so that you know where it's
> used what it's for.
> > ZFE_2 = ZFE * 2;
> > ZFE_3 = ZFE * 3;
> > $fn = $preview ? 64 : 128;
> >
> > // Global
> > g_corner_rounding = 2;
> >
> > // Ring
> > g_wall_thickness = 3;
> > g_inside_size = 90;
> > g_height = 70;
> >
> > // Lid
> > g_lid_play = 1;
> > g_presser_height = 30;
> > g_presser_width = 20;
> > g_lid_rounding = 5;
> > g_presser_size = 10;
> >
> > module ring() {
> > outside_size = g_inside_size + (2 * g_wall_thickness);
> > //cuboid([g_wall_thickness, depth, clip_height], chamfer=1,
> edges="X", anchor=LEFT+BOTTOM+FRONT);
> > difference() {
> > cuboid([outside_size, outside_size, g_height],
> rounding=g_corner_rounding, edges="Z");
> > cuboid([g_inside_size, g_inside_size, g_height + ZFE_2],
> rounding=g_corner_rounding, edges="Z");
> > }
> > }
> >
> > module presser() {
> > cuboid([g_inside_size - g_lid_play, g_inside_size - g_lid_play,
> g_wall_thickness * 2], rounding=g_corner_rounding, edges="Z");
> >
> > difference() {
> > union() {
> > // The outer cylinder that will make the presser handle ring
> > up(g_wall_thickness + g_presser_height * 1.5)
> > ycyl(l = g_presser_width, d=g_presser_size * 4, rounding
> = g_corner_rounding);
> > // The 'stem' of the presser handle
> > up(g_wall_thickness + g_presser_height / 2)
> > zcyl(l = g_presser_height, r=g_presser_size,
> rounding1=-g_lid_rounding);
> > }
> > // Cut away the inside of the presser handle ring. It will also
> cut into the top of the stem a bit, hence why
> > // it's here.
> > up(g_wall_thickness + g_presser_height * 1.5)
> > ycyl(l = g_presser_width + ZFE_2, d=g_presser_size * 3,
> rounding = -g_corner_rounding);
> > }
> > //up(g_wall_thickness)
> > for (r = [45 : 90 : 360]) {
> > zrot(r) up(g_wall_thickness)
> > wedge([g_presser_size, g_presser_size * 5, g_presser_size *
> 2], anchor=CENTER+BOTTOM+FRONT);
> > }
> > }
> >
> > ring();
> > right(150) presser();
> > _______________________________________________
> > OpenSCAD mailing list
> > To unsubscribe send an email to discuss-leave@lists.openscad.org
>
>

RV

Roel Vanhout

Sat, Aug 24, 2024 3:38 PM

This is amazing, would you mind sharing the code that created this? I

write Python every day and I'm much more comfortable with it than with

straight OpenSCAD, but I always thought that using Python to generate

OpenSCAD code was mostly syntactic sugar like having 'real' for loops with

updating variables and such, I didn't know (and still don't quite see how

tbh) that it also allowed for such complex shapes.

cheers

On Sat, Aug 24, 2024 at 5:49 AM Sanjeev Prabhakar sprabhakar2006@gmail.com

wrote:

I gave it a try

[image: Screenshot 2024-08-24 at 9.16.07 AM.png]

On Fri, 23 Aug 2024 at 16:19, Roel Vanhout via Discuss <

discuss@lists.openscad.org> wrote:

Hello all,

suggestions on how to approach this. I've always found rounding and

chamfering to be very tedious using plain OpenSCAD until I found how to do

it with BOSL2, which has been a godsend for the cases I've encountered so

far. But today I have the shape in the picture below, for which the code is

at the bottom. I'm looking to round out all surfaces of the 'fins' that

radiate out from the center 'stem' come in contact with other surfaces.

(this is a presser tool for stuffing food into a mold, the 'fins' are to

distribute the pressure that is manually exerted on the ring to the bottom

platelet).

colors. Out of these, the turquoise one I could do with a BOSL2

rounding_edge_mask(), and the green one too if I use an appropriate 'ang'

parameter (which I can calculate fairly easily). However I have no idea how

to do the red one or the orange one, nor how to let e.g. the orange one

blend smoothly into the green one for example; and the same for all the

other places where roundovers meet.

Any ideas on how I can do this? Thank you.

regards

Roel

[image: presser_foot_rounding.png]

include <BOSL2-master/screws.scad>

include <BOSL2-master/threading.scad>

overlapping.

// It has a separate name so that you know where it's used

what it's for.

ZFE_2 = ZFE * 2;

ZFE_3 = ZFE * 3;

$fn = $preview ? 64 : 128;

// Global

g_corner_rounding = 2;

// Ring

g_wall_thickness = 3;

g_inside_size = 90;

g_height = 70;

g_lid_play = 1;

g_presser_height = 30;

g_presser_width = 20;

g_lid_rounding = 5;

g_presser_size = 10;

outside_size = g_inside_size + (2 * g_wall_thickness);

//cuboid([g_wall_thickness, depth, clip_height], chamfer=1,

edges="X", anchor=LEFT+BOTTOM+FRONT);

difference() {

cuboid([outside_size, outside_size, g_height],

rounding=g_corner_rounding, edges="Z");

cuboid([g_inside_size, g_inside_size, g_height + ZFE_2],

rounding=g_corner_rounding, edges="Z");

}

}

cuboid([g_inside_size - g_lid_play, g_inside_size - g_lid_play,

g_wall_thickness * 2], rounding=g_corner_rounding, edges="Z");

```
difference() {
union() {
// The outer cylinder that will make the presser handle ring
up(g_wall_thickness + g_presser_height * 1.5)
ycyl(l = g_presser_width, d=g_presser_size * 4, rounding
```

= g_corner_rounding);

// The 'stem' of the presser handle

up(g_wall_thickness + g_presser_height / 2)

zcyl(l = g_presser_height, r=g_presser_size,

rounding1=-g_lid_rounding);

}

// Cut away the inside of the presser handle ring. It will also

cut into the top of the stem a bit, hence why

// it's here.

up(g_wall_thickness + g_presser_height * 1.5)

ycyl(l = g_presser_width + ZFE_2, d=g_presser_size * 3,

rounding = -g_corner_rounding);

}

//up(g_wall_thickness)

for (r = [45 : 90 : 360]) {

zrot(r) up(g_wall_thickness)

wedge([g_presser_size, g_presser_size * 5, g_presser_size *

2], anchor=CENTER+BOTTOM+FRONT);

}

}

ring();

right(150) presser();

OpenSCAD mailing list

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

This is amazing, would you mind sharing the code that created this? I
write Python every day and I'm much more comfortable with it than with
straight OpenSCAD, but I always thought that using Python to generate
OpenSCAD code was mostly syntactic sugar like having 'real' for loops with
updating variables and such, I didn't know (and still don't quite see how
tbh) that it also allowed for such complex shapes.
cheers
On Sat, Aug 24, 2024 at 5:49 AM Sanjeev Prabhakar <sprabhakar2006@gmail.com>
wrote:
> I gave it a try
> [image: Screenshot 2024-08-24 at 9.16.07 AM.png]
>
> On Fri, 23 Aug 2024 at 16:19, Roel Vanhout via Discuss <
> discuss@lists.openscad.org> wrote:
>
>> Hello all,
>>
>> I have a complex shape to round for which I'd like to ask if anyone has
>> suggestions on how to approach this. I've always found rounding and
>> chamfering to be very tedious using plain OpenSCAD until I found how to do
>> it with BOSL2, which has been a godsend for the cases I've encountered so
>> far. But today I have the shape in the picture below, for which the code is
>> at the bottom. I'm looking to round out all surfaces of the 'fins' that
>> radiate out from the center 'stem' come in contact with other surfaces.
>> (this is a presser tool for stuffing food into a mold, the 'fins' are to
>> distribute the pressure that is manually exerted on the ring to the bottom
>> platelet).
>>
>> I've marked the various lines that need to be rounded out in different
>> colors. Out of these, the turquoise one I could do with a BOSL2
>> rounding_edge_mask(), and the green one too if I use an appropriate 'ang'
>> parameter (which I can calculate fairly easily). However I have no idea how
>> to do the red one or the orange one, nor how to let e.g. the orange one
>> blend smoothly into the green one for example; and the same for all the
>> other places where roundovers meet.
>>
>> Any ideas on how I can do this? Thank you.
>>
>> regards
>>
>> Roel
>>
>>
>> [image: presser_foot_rounding.png]
>>
>>
>>
>>
>>
>>
>> include <BOSL2-master/std.scad>
>> include <BOSL2-master/screws.scad>
>> include <BOSL2-master/threading.scad>
>>
>> ZFE = 0.01; // Z fighting epsilon, a constant to prevent planes from
>> overlapping.
>> // It has a separate name so that you know where it's used
>> what it's for.
>> ZFE_2 = ZFE * 2;
>> ZFE_3 = ZFE * 3;
>> $fn = $preview ? 64 : 128;
>>
>> // Global
>> g_corner_rounding = 2;
>>
>> // Ring
>> g_wall_thickness = 3;
>> g_inside_size = 90;
>> g_height = 70;
>>
>> // Lid
>> g_lid_play = 1;
>> g_presser_height = 30;
>> g_presser_width = 20;
>> g_lid_rounding = 5;
>> g_presser_size = 10;
>>
>> module ring() {
>> outside_size = g_inside_size + (2 * g_wall_thickness);
>> //cuboid([g_wall_thickness, depth, clip_height], chamfer=1,
>> edges="X", anchor=LEFT+BOTTOM+FRONT);
>> difference() {
>> cuboid([outside_size, outside_size, g_height],
>> rounding=g_corner_rounding, edges="Z");
>> cuboid([g_inside_size, g_inside_size, g_height + ZFE_2],
>> rounding=g_corner_rounding, edges="Z");
>> }
>> }
>>
>> module presser() {
>> cuboid([g_inside_size - g_lid_play, g_inside_size - g_lid_play,
>> g_wall_thickness * 2], rounding=g_corner_rounding, edges="Z");
>>
>> difference() {
>> union() {
>> // The outer cylinder that will make the presser handle ring
>> up(g_wall_thickness + g_presser_height * 1.5)
>> ycyl(l = g_presser_width, d=g_presser_size * 4, rounding
>> = g_corner_rounding);
>> // The 'stem' of the presser handle
>> up(g_wall_thickness + g_presser_height / 2)
>> zcyl(l = g_presser_height, r=g_presser_size,
>> rounding1=-g_lid_rounding);
>> }
>> // Cut away the inside of the presser handle ring. It will also
>> cut into the top of the stem a bit, hence why
>> // it's here.
>> up(g_wall_thickness + g_presser_height * 1.5)
>> ycyl(l = g_presser_width + ZFE_2, d=g_presser_size * 3,
>> rounding = -g_corner_rounding);
>> }
>> //up(g_wall_thickness)
>> for (r = [45 : 90 : 360]) {
>> zrot(r) up(g_wall_thickness)
>> wedge([g_presser_size, g_presser_size * 5, g_presser_size *
>> 2], anchor=CENTER+BOTTOM+FRONT);
>> }
>> }
>>
>> ring();
>> right(150) presser();
>> _______________________________________________
>> OpenSCAD mailing list
>> To unsubscribe send an email to discuss-leave@lists.openscad.org
>>
>

PK

Peter Kriens

Sat, Aug 24, 2024 4:26 PM

Its one of the many functions in BOSL2 that so far scared me too much to use ... :-)

But it looks promising ...

On 24 Aug 2024, at 17:35, Roel Vanhout roel.vanhout@gmail.com wrote:

Thank you for that, join_prism() is an amazing module, which has gotten me to the first image below using the code below that image. Although I can make it 'good enough' by increasing the rounding at the base of the cylinder and setting 'debug = true' to allow self-intersection in the join_prism(), I'm wondering if there's a clean solution for the gap at the bottom? The problem stems from the rounding not being able to handle 'flowing' into each other. See the last image below, which is with debug set to 'true' to allow self-intersection - this is with the cylinder and base plate hidden so that you can clearly see the corner at the bottom. As I said, I can sort of manage to get all roundings to just intersect each other and then I'm left with a sort of hard, inward corner where they all join, but I'm wondering if I'm missing something from the myriad of join_prism() options.

<image.png>

module join_prism_test() {

cuboid([100, 100, 5], anchor=CENTER+BOTTOM+FRONT);

up(5) back(10)

zcyl(l = 50, d = 20, , $fn=128, rounding1 = -2, anchor=CENTER+BOTTOM);

```
polygon_ = rect([4, 26.4], rounding = 2);
base_T = back(0);
aux_T = up(35) * fwd(30) * yrot(90);
up(5) back(40)
join_prism(polygon_,
"plane", // 'base'
base_T = base_T,
aux = "cylinder",
aux_d = 20,
aux_T = aux_T,
fillet = 2,
//debug = true
);
```

}

<image.png>

On Fri, Aug 23, 2024 at 2:02 PM Peter Kriens <peter.kriens@aqute.biz mailto:peter.kriens@aqute.biz> wrote:

You might want to look at `join_prism`

. It looks tricky to use but I think you should be able to make this work for you looking at the description. But quite complex.

On 23 Aug 2024, at 12:48, Roel Vanhout via Discuss <discuss@lists.openscad.org mailto:discuss@lists.openscad.org> wrote:

Hello all,

Any ideas on how I can do this? Thank you.

regards

Roel

<presser_foot_rounding.png>

include <BOSL2-master/screws.scad>

include <BOSL2-master/threading.scad>

// It has a separate name so that you know where it's used what it's for.

ZFE_2 = ZFE * 2;

ZFE_3 = ZFE * 3;

$fn = $preview ? 64 : 128;

// Global

g_corner_rounding = 2;

// Ring

g_wall_thickness = 3;

g_inside_size = 90;

g_height = 70;

g_lid_play = 1;

g_presser_height = 30;

g_presser_width = 20;

g_lid_rounding = 5;

g_presser_size = 10;

outside_size = g_inside_size + (2 * g_wall_thickness);

//cuboid([g_wall_thickness, depth, clip_height], chamfer=1, edges="X", anchor=LEFT+BOTTOM+FRONT);

difference() {

cuboid([outside_size, outside_size, g_height], rounding=g_corner_rounding, edges="Z");

cuboid([g_inside_size, g_inside_size, g_height + ZFE_2], rounding=g_corner_rounding, edges="Z");

}

}

cuboid([g_inside_size - g_lid_play, g_inside_size - g_lid_play, g_wall_thickness * 2], rounding=g_corner_rounding, edges="Z");

```
difference() {
union() {
// The outer cylinder that will make the presser handle ring
up(g_wall_thickness + g_presser_height * 1.5)
ycyl(l = g_presser_width, d=g_presser_size * 4, rounding = g_corner_rounding);
// The 'stem' of the presser handle
up(g_wall_thickness + g_presser_height / 2)
zcyl(l = g_presser_height, r=g_presser_size, rounding1=-g_lid_rounding);
}
// Cut away the inside of the presser handle ring. It will also cut into the top of the stem a bit, hence why
// it's here.
up(g_wall_thickness + g_presser_height * 1.5)
ycyl(l = g_presser_width + ZFE_2, d=g_presser_size * 3, rounding = -g_corner_rounding);
}
//up(g_wall_thickness)
for (r = [45 : 90 : 360]) {
zrot(r) up(g_wall_thickness)
wedge([g_presser_size, g_presser_size * 5, g_presser_size * 2], anchor=CENTER+BOTTOM+FRONT);
}
```

}

ring();

right(150) presser();

OpenSCAD mailing list

To unsubscribe send an email to discuss-leave@lists.openscad.org mailto:discuss-leave@lists.openscad.org

Its one of the many functions in BOSL2 that so far scared me too much to use ... :-)
But it looks promising ...
> On 24 Aug 2024, at 17:35, Roel Vanhout <roel.vanhout@gmail.com> wrote:
>
> Thank you for that, join_prism() is an amazing module, which has gotten me to the first image below using the code below that image. Although I can make it 'good enough' by increasing the rounding at the base of the cylinder and setting 'debug = true' to allow self-intersection in the join_prism(), I'm wondering if there's a clean solution for the gap at the bottom? The problem stems from the rounding not being able to handle 'flowing' into each other. See the last image below, which is with debug set to 'true' to allow self-intersection - this is with the cylinder and base plate hidden so that you can clearly see the corner at the bottom. As I said, I can sort of manage to get all roundings to just intersect each other and then I'm left with a sort of hard, inward corner where they all join, but I'm wondering if I'm missing something from the myriad of join_prism() options.
>
>
>
>
> <image.png>
>
> module join_prism_test() {
> cuboid([100, 100, 5], anchor=CENTER+BOTTOM+FRONT);
> up(5) back(10)
> zcyl(l = 50, d = 20, , $fn=128, rounding1 = -2, anchor=CENTER+BOTTOM);
>
> polygon_ = rect([4, 26.4], rounding = 2);
> base_T = back(0);
> aux_T = up(35) * fwd(30) * yrot(90);
> up(5) back(40)
> join_prism(polygon_,
> "plane", // 'base'
> base_T = base_T,
> aux = "cylinder",
> aux_d = 20,
> aux_T = aux_T,
> fillet = 2,
> //debug = true
> );
> }
>
> <image.png>
>
>
>
>
> On Fri, Aug 23, 2024 at 2:02 PM Peter Kriens <peter.kriens@aqute.biz <mailto:peter.kriens@aqute.biz>> wrote:
>> You might want to look at `join_prism`. It looks tricky to use but I think you should be able to make this work for you looking at the description. But quite complex.
>>
>>
>>
>>
>>
>>
>> > On 23 Aug 2024, at 12:48, Roel Vanhout via Discuss <discuss@lists.openscad.org <mailto:discuss@lists.openscad.org>> wrote:
>> >
>> > Hello all,
>> >
>> > I have a complex shape to round for which I'd like to ask if anyone has suggestions on how to approach this. I've always found rounding and chamfering to be very tedious using plain OpenSCAD until I found how to do it with BOSL2, which has been a godsend for the cases I've encountered so far. But today I have the shape in the picture below, for which the code is at the bottom. I'm looking to round out all surfaces of the 'fins' that radiate out from the center 'stem' come in contact with other surfaces. (this is a presser tool for stuffing food into a mold, the 'fins' are to distribute the pressure that is manually exerted on the ring to the bottom platelet).
>> >
>> > I've marked the various lines that need to be rounded out in different colors. Out of these, the turquoise one I could do with a BOSL2 rounding_edge_mask(), and the green one too if I use an appropriate 'ang' parameter (which I can calculate fairly easily). However I have no idea how to do the red one or the orange one, nor how to let e.g. the orange one blend smoothly into the green one for example; and the same for all the other places where roundovers meet.
>> >
>> > Any ideas on how I can do this? Thank you.
>> >
>> > regards
>> >
>> > Roel
>> >
>> >
>> > <presser_foot_rounding.png>
>> >
>> >
>> >
>> >
>> >
>> >
>> > include <BOSL2-master/std.scad>
>> > include <BOSL2-master/screws.scad>
>> > include <BOSL2-master/threading.scad>
>> >
>> > ZFE = 0.01; // Z fighting epsilon, a constant to prevent planes from overlapping.
>> > // It has a separate name so that you know where it's used what it's for.
>> > ZFE_2 = ZFE * 2;
>> > ZFE_3 = ZFE * 3;
>> > $fn = $preview ? 64 : 128;
>> >
>> > // Global
>> > g_corner_rounding = 2;
>> >
>> > // Ring
>> > g_wall_thickness = 3;
>> > g_inside_size = 90;
>> > g_height = 70;
>> >
>> > // Lid
>> > g_lid_play = 1;
>> > g_presser_height = 30;
>> > g_presser_width = 20;
>> > g_lid_rounding = 5;
>> > g_presser_size = 10;
>> >
>> > module ring() {
>> > outside_size = g_inside_size + (2 * g_wall_thickness);
>> > //cuboid([g_wall_thickness, depth, clip_height], chamfer=1, edges="X", anchor=LEFT+BOTTOM+FRONT);
>> > difference() {
>> > cuboid([outside_size, outside_size, g_height], rounding=g_corner_rounding, edges="Z");
>> > cuboid([g_inside_size, g_inside_size, g_height + ZFE_2], rounding=g_corner_rounding, edges="Z");
>> > }
>> > }
>> >
>> > module presser() {
>> > cuboid([g_inside_size - g_lid_play, g_inside_size - g_lid_play, g_wall_thickness * 2], rounding=g_corner_rounding, edges="Z");
>> >
>> > difference() {
>> > union() {
>> > // The outer cylinder that will make the presser handle ring
>> > up(g_wall_thickness + g_presser_height * 1.5)
>> > ycyl(l = g_presser_width, d=g_presser_size * 4, rounding = g_corner_rounding);
>> > // The 'stem' of the presser handle
>> > up(g_wall_thickness + g_presser_height / 2)
>> > zcyl(l = g_presser_height, r=g_presser_size, rounding1=-g_lid_rounding);
>> > }
>> > // Cut away the inside of the presser handle ring. It will also cut into the top of the stem a bit, hence why
>> > // it's here.
>> > up(g_wall_thickness + g_presser_height * 1.5)
>> > ycyl(l = g_presser_width + ZFE_2, d=g_presser_size * 3, rounding = -g_corner_rounding);
>> > }
>> > //up(g_wall_thickness)
>> > for (r = [45 : 90 : 360]) {
>> > zrot(r) up(g_wall_thickness)
>> > wedge([g_presser_size, g_presser_size * 5, g_presser_size * 2], anchor=CENTER+BOTTOM+FRONT);
>> > }
>> > }
>> >
>> > ring();
>> > right(150) presser();
>> > _______________________________________________
>> > OpenSCAD mailing list
>> > To unsubscribe send an email to discuss-leave@lists.openscad.org <mailto:discuss-leave@lists.openscad.org>
>>

AM

Adrian Mariano

Sat, Aug 24, 2024 5:07 PM

I believe that the approach Sanjeev uses is not to use python to generate

openscad code but to use python to generate the entire object as a

polyhedron and then just pass that to openscad to be rendered. You can of

course produce any object this way if you work hard enough on your python

code.

I don't see a way that you can fill the little gap with join_prism(). If

you allow self-intersection you won't be able to create an STL. Does that

matter to you?

A lot of the limitations in the join_prism() implementation result from the

need to have an interface to the module. I made it as general as I could

figure out how to make it, but it can't do everything. And as noted by

others, it's already not the most accessible interface.

I think if I were designing this model I would probably try to rethink it

so that it was easier to round. For example using the octagon idea one

person proposed so that the supports meet a plane. Or making the supports

meet in the middle with a concave rounding instead of transitioning to the

convex circular rounding, which is responsible for much of the challenge.

So something along these lines as the starting idea:

path = [[1,1],[7,1],[7,-1]];

fourpath = [for(ang=[0:90:359]) each zrot(-ang,path)];

roundpath = round_corners(fourpath, r=flatten(repeat([1.5,1,1],4)));

offset_sweep(roundpath, h=5, bottom=os_circle(r=-1), top=os_circle(r=1));

You'd need to cut it to make wedges and round their top edges. Having the

wedge shapes not taper all the way to nothing would also make the task

easier.

[image: image.png]

On Sat, Aug 24, 2024 at 11:39 AM Roel Vanhout via Discuss <

discuss@lists.openscad.org> wrote:

This is amazing, would you mind sharing the code that created this? I

write Python every day and I'm much more comfortable with it than with

straight OpenSCAD, but I always thought that using Python to generate

OpenSCAD code was mostly syntactic sugar like having 'real' for loops with

updating variables and such, I didn't know (and still don't quite see how

tbh) that it also allowed for such complex shapes.

cheers

On Sat, Aug 24, 2024 at 5:49 AM Sanjeev Prabhakar <

sprabhakar2006@gmail.com> wrote:

I gave it a try

[image: Screenshot 2024-08-24 at 9.16.07 AM.png]

On Fri, 23 Aug 2024 at 16:19, Roel Vanhout via Discuss <

discuss@lists.openscad.org> wrote:

Hello all,

suggestions on how to approach this. I've always found rounding and

chamfering to be very tedious using plain OpenSCAD until I found how to do

it with BOSL2, which has been a godsend for the cases I've encountered so

far. But today I have the shape in the picture below, for which the code is

at the bottom. I'm looking to round out all surfaces of the 'fins' that

radiate out from the center 'stem' come in contact with other surfaces.

(this is a presser tool for stuffing food into a mold, the 'fins' are to

distribute the pressure that is manually exerted on the ring to the bottom

platelet).

colors. Out of these, the turquoise one I could do with a BOSL2

rounding_edge_mask(), and the green one too if I use an appropriate 'ang'

parameter (which I can calculate fairly easily). However I have no idea how

to do the red one or the orange one, nor how to let e.g. the orange one

blend smoothly into the green one for example; and the same for all the

other places where roundovers meet.

Any ideas on how I can do this? Thank you.

regards

Roel

[image: presser_foot_rounding.png]

include <BOSL2-master/screws.scad>

include <BOSL2-master/threading.scad>

overlapping.

// It has a separate name so that you know where it's

used what it's for.

ZFE_2 = ZFE * 2;

ZFE_3 = ZFE * 3;

$fn = $preview ? 64 : 128;

// Global

g_corner_rounding = 2;

// Ring

g_wall_thickness = 3;

g_inside_size = 90;

g_height = 70;

g_lid_play = 1;

g_presser_height = 30;

g_presser_width = 20;

g_lid_rounding = 5;

g_presser_size = 10;

outside_size = g_inside_size + (2 * g_wall_thickness);

//cuboid([g_wall_thickness, depth, clip_height], chamfer=1,

edges="X", anchor=LEFT+BOTTOM+FRONT);

difference() {

cuboid([outside_size, outside_size, g_height],

rounding=g_corner_rounding, edges="Z");

cuboid([g_inside_size, g_inside_size, g_height + ZFE_2],

rounding=g_corner_rounding, edges="Z");

}

}

cuboid([g_inside_size - g_lid_play, g_inside_size - g_lid_play,

g_wall_thickness * 2], rounding=g_corner_rounding, edges="Z");

```
difference() {
union() {
// The outer cylinder that will make the presser handle ring
up(g_wall_thickness + g_presser_height * 1.5)
ycyl(l = g_presser_width, d=g_presser_size * 4, rounding
```

= g_corner_rounding);

// The 'stem' of the presser handle

up(g_wall_thickness + g_presser_height / 2)

zcyl(l = g_presser_height, r=g_presser_size,

rounding1=-g_lid_rounding);

}

// Cut away the inside of the presser handle ring. It will also

cut into the top of the stem a bit, hence why

// it's here.

up(g_wall_thickness + g_presser_height * 1.5)

ycyl(l = g_presser_width + ZFE_2, d=g_presser_size * 3,

rounding = -g_corner_rounding);

}

//up(g_wall_thickness)

for (r = [45 : 90 : 360]) {

zrot(r) up(g_wall_thickness)

wedge([g_presser_size, g_presser_size * 5, g_presser_size *

2], anchor=CENTER+BOTTOM+FRONT);

}

}

ring();

right(150) presser();

OpenSCAD mailing list

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

OpenSCAD mailing list

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

I believe that the approach Sanjeev uses is not to use python to generate
openscad code but to use python to generate the entire object as a
polyhedron and then just pass that to openscad to be rendered. You can of
course produce any object this way if you work hard enough on your python
code.
I don't see a way that you can fill the little gap with join_prism(). If
you allow self-intersection you won't be able to create an STL. Does that
matter to you?
A lot of the limitations in the join_prism() implementation result from the
need to have an interface to the module. I made it as general as I could
figure out how to make it, but it can't do everything. And as noted by
others, it's already not the most accessible interface.
I think if I were designing this model I would probably try to rethink it
so that it was easier to round. For example using the octagon idea one
person proposed so that the supports meet a plane. Or making the supports
meet in the middle with a concave rounding instead of transitioning to the
convex circular rounding, which is responsible for much of the challenge.
So something along these lines as the starting idea:
path = [[1,1],[7,1],[7,-1]];
fourpath = [for(ang=[0:90:359]) each zrot(-ang,path)];
roundpath = round_corners(fourpath, r=flatten(repeat([1.5,1,1],4)));
offset_sweep(roundpath, h=5, bottom=os_circle(r=-1), top=os_circle(r=1));
You'd need to cut it to make wedges and round their top edges. Having the
wedge shapes not taper all the way to nothing would also make the task
easier.
[image: image.png]
On Sat, Aug 24, 2024 at 11:39 AM Roel Vanhout via Discuss <
discuss@lists.openscad.org> wrote:
> This is amazing, would you mind sharing the code that created this? I
> write Python every day and I'm much more comfortable with it than with
> straight OpenSCAD, but I always thought that using Python to generate
> OpenSCAD code was mostly syntactic sugar like having 'real' for loops with
> updating variables and such, I didn't know (and still don't quite see how
> tbh) that it also allowed for such complex shapes.
>
> cheers
>
>
> On Sat, Aug 24, 2024 at 5:49 AM Sanjeev Prabhakar <
> sprabhakar2006@gmail.com> wrote:
>
>> I gave it a try
>> [image: Screenshot 2024-08-24 at 9.16.07 AM.png]
>>
>> On Fri, 23 Aug 2024 at 16:19, Roel Vanhout via Discuss <
>> discuss@lists.openscad.org> wrote:
>>
>>> Hello all,
>>>
>>> I have a complex shape to round for which I'd like to ask if anyone has
>>> suggestions on how to approach this. I've always found rounding and
>>> chamfering to be very tedious using plain OpenSCAD until I found how to do
>>> it with BOSL2, which has been a godsend for the cases I've encountered so
>>> far. But today I have the shape in the picture below, for which the code is
>>> at the bottom. I'm looking to round out all surfaces of the 'fins' that
>>> radiate out from the center 'stem' come in contact with other surfaces.
>>> (this is a presser tool for stuffing food into a mold, the 'fins' are to
>>> distribute the pressure that is manually exerted on the ring to the bottom
>>> platelet).
>>>
>>> I've marked the various lines that need to be rounded out in different
>>> colors. Out of these, the turquoise one I could do with a BOSL2
>>> rounding_edge_mask(), and the green one too if I use an appropriate 'ang'
>>> parameter (which I can calculate fairly easily). However I have no idea how
>>> to do the red one or the orange one, nor how to let e.g. the orange one
>>> blend smoothly into the green one for example; and the same for all the
>>> other places where roundovers meet.
>>>
>>> Any ideas on how I can do this? Thank you.
>>>
>>> regards
>>>
>>> Roel
>>>
>>>
>>> [image: presser_foot_rounding.png]
>>>
>>>
>>>
>>>
>>>
>>>
>>> include <BOSL2-master/std.scad>
>>> include <BOSL2-master/screws.scad>
>>> include <BOSL2-master/threading.scad>
>>>
>>> ZFE = 0.01; // Z fighting epsilon, a constant to prevent planes from
>>> overlapping.
>>> // It has a separate name so that you know where it's
>>> used what it's for.
>>> ZFE_2 = ZFE * 2;
>>> ZFE_3 = ZFE * 3;
>>> $fn = $preview ? 64 : 128;
>>>
>>> // Global
>>> g_corner_rounding = 2;
>>>
>>> // Ring
>>> g_wall_thickness = 3;
>>> g_inside_size = 90;
>>> g_height = 70;
>>>
>>> // Lid
>>> g_lid_play = 1;
>>> g_presser_height = 30;
>>> g_presser_width = 20;
>>> g_lid_rounding = 5;
>>> g_presser_size = 10;
>>>
>>> module ring() {
>>> outside_size = g_inside_size + (2 * g_wall_thickness);
>>> //cuboid([g_wall_thickness, depth, clip_height], chamfer=1,
>>> edges="X", anchor=LEFT+BOTTOM+FRONT);
>>> difference() {
>>> cuboid([outside_size, outside_size, g_height],
>>> rounding=g_corner_rounding, edges="Z");
>>> cuboid([g_inside_size, g_inside_size, g_height + ZFE_2],
>>> rounding=g_corner_rounding, edges="Z");
>>> }
>>> }
>>>
>>> module presser() {
>>> cuboid([g_inside_size - g_lid_play, g_inside_size - g_lid_play,
>>> g_wall_thickness * 2], rounding=g_corner_rounding, edges="Z");
>>>
>>> difference() {
>>> union() {
>>> // The outer cylinder that will make the presser handle ring
>>> up(g_wall_thickness + g_presser_height * 1.5)
>>> ycyl(l = g_presser_width, d=g_presser_size * 4, rounding
>>> = g_corner_rounding);
>>> // The 'stem' of the presser handle
>>> up(g_wall_thickness + g_presser_height / 2)
>>> zcyl(l = g_presser_height, r=g_presser_size,
>>> rounding1=-g_lid_rounding);
>>> }
>>> // Cut away the inside of the presser handle ring. It will also
>>> cut into the top of the stem a bit, hence why
>>> // it's here.
>>> up(g_wall_thickness + g_presser_height * 1.5)
>>> ycyl(l = g_presser_width + ZFE_2, d=g_presser_size * 3,
>>> rounding = -g_corner_rounding);
>>> }
>>> //up(g_wall_thickness)
>>> for (r = [45 : 90 : 360]) {
>>> zrot(r) up(g_wall_thickness)
>>> wedge([g_presser_size, g_presser_size * 5, g_presser_size *
>>> 2], anchor=CENTER+BOTTOM+FRONT);
>>> }
>>> }
>>>
>>> ring();
>>> right(150) presser();
>>> _______________________________________________
>>> 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
>

Replying to:

Empathy v1.0
2024 ©Harmonylists.com