discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

sweep in BOSL2

L
larry
Sat, Sep 20, 2025 7:20 PM

Before I ask for a feature in BOSL2, I thought I'd as here in case I am
missing something.

I had occasion to use sweep, but found out I can only use it for 2D
objects. I ended up using zcopies with start and end angles of 10 and
40 degrees, and an n value of 100. This produces a fairly satisfactory
result, but it sort of makes me shudder, and takes a fairly long time
to render

Is there way to do a sweep or sweep-like operation with a 3D object?

L

Before I ask for a feature in BOSL2, I thought I'd as here in case I am missing something. I had occasion to use sweep, but found out I can only use it for 2D objects. I ended up using zcopies with start and end angles of 10 and 40 degrees, and an n value of 100. This produces a fairly satisfactory result, but it sort of makes me shudder, and takes a fairly long time to render Is there way to do a sweep or sweep-like operation with a 3D object? L
DP
Dan Perry
Sat, Sep 20, 2025 9:47 PM

BOSL2 path_sweep() takes a caps argument: " if closed is false, set caps to
false to leave the ends open. Other values are true to create a flat cap, a
number a rounded cap, or an offset_sweep() end treatment to create the
specified offset sweep. Can be a single value or pair of values to control
the caps independently at each end. Default: true"

A rounded cap would be the same as sweeping a sphere.  If it's more
complicated than that (I cannot picture your description of your
workaround), you could union() two copies of the 3D object to the ends of
the sweep perhaps?

Dan

On Sat, Sep 20, 2025 at 8:21 PM larry via Discuss <
discuss@lists.openscad.org> wrote:

Before I ask for a feature in BOSL2, I thought I'd as here in case I am
missing something.

I had occasion to use sweep, but found out I can only use it for 2D
objects. I ended up using zcopies with start and end angles of 10 and
40 degrees, and an n value of 100. This produces a fairly satisfactory
result, but it sort of makes me shudder, and takes a fairly long time
to render

Is there way to do a sweep or sweep-like operation with a 3D object?

L


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

BOSL2 path_sweep() takes a caps argument: " if closed is false, set caps to false to leave the ends open. Other values are true to create a flat cap, a number a rounded cap, or an offset_sweep() end treatment to create the specified offset sweep. Can be a single value or pair of values to control the caps independently at each end. Default: true" A rounded cap would be the same as sweeping a sphere. If it's more complicated than that (I cannot picture your description of your workaround), you could union() two copies of the 3D object to the ends of the sweep perhaps? Dan On Sat, Sep 20, 2025 at 8:21 PM larry via Discuss < discuss@lists.openscad.org> wrote: > Before I ask for a feature in BOSL2, I thought I'd as here in case I am > missing something. > > I had occasion to use sweep, but found out I can only use it for 2D > objects. I ended up using zcopies with start and end angles of 10 and > 40 degrees, and an n value of 100. This produces a fairly satisfactory > result, but it sort of makes me shudder, and takes a fairly long time > to render > > Is there way to do a sweep or sweep-like operation with a 3D object? > > > L > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
L
larry
Sat, Sep 20, 2025 10:26 PM

On Sat, 2025-09-20 at 22:47 +0100, Dan Perry via Discuss wrote:

BOSL2 path_sweep() takes a caps argument: " if closed is false, set
caps to false to leave the ends open. Other values are true to create
a flat cap, a number a rounded cap, or an offset_sweep() end
treatment to create the specified offset sweep. Can be a single value
or pair of values to control the caps independently at each end.
Default: true"

A rounded cap would be the same as sweeping a sphere.  If it's more
complicated than that (I cannot picture your description of your
workaround), you could union() two copies of the 3D object to the
ends of the sweep perhaps?
Dan

It's a more complicated object. I am trying to write an OpenSCAD
program to allow a user to make a parametric filament clip that will
snap-fit into the holes on the rim of a spool.

//------
include <BOSL2/std.scad>
$fn= $preview ? 60 : 180;

spool_rad=100;
holeposition_rad=spool_rad-6;
hole_dia=6;
hole_hole_dist_max=33.9;
hole_hole_dist_min=21.9;

arc_copies(n=200,sa=78,ea=102)// profile();
difference() {
profile();
up(2.5)filament_slot();
}

module profile() {
hull() {
right(holeposition_rad)
up(0.05)cyl(d=hole_dia*1.8,h=0.1);
up(2)
right(holeposition_rad) cyl(h=2,d=hole_dia,rounding=1);
}
}

module filament_slot() {
rotate_extrude() right(holeposition_rad) circle(1.76/2);
}
//-----

On Sat, Sep 20, 2025 at 8:21 PM larry via Discuss
discuss@lists.openscad.org wrote:

Before I ask for a feature in BOSL2, I thought I'd as here in case
I am
missing something.

I had occasion to use sweep, but found out I can only use it for 2D
objects. I ended up using zcopies with start and end angles of 10
and
40 degrees, and an n value of 100. This produces a fairly
satisfactory
result, but it sort of makes me shudder, and takes a fairly long
time
to render

Is there way to do a sweep or sweep-like operation with a 3D
object?

L


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

On Sat, 2025-09-20 at 22:47 +0100, Dan Perry via Discuss wrote: > BOSL2 path_sweep() takes a caps argument: " if closed is false, set > caps to false to leave the ends open. Other values are true to create > a flat cap, a number a rounded cap, or an offset_sweep() end > treatment to create the specified offset sweep. Can be a single value > or pair of values to control the caps independently at each end. > Default: true" > > A rounded cap would be the same as sweeping a sphere.  If it's more > complicated than that (I cannot picture your description of your > workaround), you could union() two copies of the 3D object to the > ends of the sweep perhaps? > Dan It's a more complicated object. I am trying to write an OpenSCAD program to allow a user to make a parametric filament clip that will snap-fit into the holes on the rim of a spool. //------ include <BOSL2/std.scad> $fn= $preview ? 60 : 180; spool_rad=100; holeposition_rad=spool_rad-6; hole_dia=6; hole_hole_dist_max=33.9; hole_hole_dist_min=21.9; arc_copies(n=200,sa=78,ea=102)// profile(); difference() { profile(); up(2.5)filament_slot(); } module profile() { hull() { right(holeposition_rad) up(0.05)cyl(d=hole_dia*1.8,h=0.1); up(2) right(holeposition_rad) cyl(h=2,d=hole_dia,rounding=1); } } module filament_slot() { rotate_extrude() right(holeposition_rad) circle(1.76/2); } //----- > On Sat, Sep 20, 2025 at 8:21 PM larry via Discuss > <discuss@lists.openscad.org> wrote: > > Before I ask for a feature in BOSL2, I thought I'd as here in case > > I am > > missing something. > > > > I had occasion to use sweep, but found out I can only use it for 2D > > objects. I ended up using zcopies with start and end angles of 10 > > and > > 40 degrees, and an n value of 100. This produces a fairly > > satisfactory > > result, but it sort of makes me shudder, and takes a fairly long > > time > > to render > > > > Is there way to do a sweep or sweep-like operation with a 3D > > object? > > > > > > L > > _______________________________________________ > > 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
AM
Adrian Mariano
Sun, Sep 21, 2025 2:14 AM

That shapes looks like it could be constructed (except maybe for the ends)
from a regular path_sweep using the center profile of your shape.

I can say that the feature you are asking for is not feasible to implement
in user space.  It would be 100x slower than your existing implementation.

On Sat, Sep 20, 2025 at 6:26 PM larry via Discuss <
discuss@lists.openscad.org> wrote:

On Sat, 2025-09-20 at 22:47 +0100, Dan Perry via Discuss wrote:

BOSL2 path_sweep() takes a caps argument: " if closed is false, set
caps to false to leave the ends open. Other values are true to create
a flat cap, a number a rounded cap, or an offset_sweep() end
treatment to create the specified offset sweep. Can be a single value
or pair of values to control the caps independently at each end.
Default: true"

A rounded cap would be the same as sweeping a sphere.  If it's more
complicated than that (I cannot picture your description of your
workaround), you could union() two copies of the 3D object to the
ends of the sweep perhaps?
Dan

It's a more complicated object. I am trying to write an OpenSCAD
program to allow a user to make a parametric filament clip that will
snap-fit into the holes on the rim of a spool.

//------
include <BOSL2/std.scad>
$fn= $preview ? 60 : 180;

spool_rad=100;
holeposition_rad=spool_rad-6;
hole_dia=6;
hole_hole_dist_max=33.9;
hole_hole_dist_min=21.9;

arc_copies(n=200,sa=78,ea=102)// profile();
difference() {
profile();
up(2.5)filament_slot();
}

module profile() {
hull() {
right(holeposition_rad)
up(0.05)cyl(d=hole_dia*1.8,h=0.1);
up(2)
right(holeposition_rad) cyl(h=2,d=hole_dia,rounding=1);
}
}

module filament_slot() {
rotate_extrude() right(holeposition_rad) circle(1.76/2);
}
//-----

On Sat, Sep 20, 2025 at 8:21 PM larry via Discuss
discuss@lists.openscad.org wrote:

Before I ask for a feature in BOSL2, I thought I'd as here in case
I am
missing something.

I had occasion to use sweep, but found out I can only use it for 2D
objects. I ended up using zcopies with start and end angles of 10
and
40 degrees, and an n value of 100. This produces a fairly
satisfactory
result, but it sort of makes me shudder, and takes a fairly long
time
to render

Is there way to do a sweep or sweep-like operation with a 3D
object?

L


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


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


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

That shapes looks like it could be constructed (except maybe for the ends) from a regular path_sweep using the center profile of your shape. I can say that the feature you are asking for is not feasible to implement in user space. It would be 100x slower than your existing implementation. On Sat, Sep 20, 2025 at 6:26 PM larry via Discuss < discuss@lists.openscad.org> wrote: > On Sat, 2025-09-20 at 22:47 +0100, Dan Perry via Discuss wrote: > > BOSL2 path_sweep() takes a caps argument: " if closed is false, set > > caps to false to leave the ends open. Other values are true to create > > a flat cap, a number a rounded cap, or an offset_sweep() end > > treatment to create the specified offset sweep. Can be a single value > > or pair of values to control the caps independently at each end. > > Default: true" > > > > A rounded cap would be the same as sweeping a sphere. If it's more > > complicated than that (I cannot picture your description of your > > workaround), you could union() two copies of the 3D object to the > > ends of the sweep perhaps? > > Dan > > It's a more complicated object. I am trying to write an OpenSCAD > program to allow a user to make a parametric filament clip that will > snap-fit into the holes on the rim of a spool. > > //------ > include <BOSL2/std.scad> > $fn= $preview ? 60 : 180; > > spool_rad=100; > holeposition_rad=spool_rad-6; > hole_dia=6; > hole_hole_dist_max=33.9; > hole_hole_dist_min=21.9; > > > arc_copies(n=200,sa=78,ea=102)// profile(); > difference() { > profile(); > up(2.5)filament_slot(); > } > > module profile() { > hull() { > right(holeposition_rad) > up(0.05)cyl(d=hole_dia*1.8,h=0.1); > up(2) > right(holeposition_rad) cyl(h=2,d=hole_dia,rounding=1); > } > } > > module filament_slot() { > rotate_extrude() right(holeposition_rad) circle(1.76/2); > } > //----- > > > > On Sat, Sep 20, 2025 at 8:21 PM larry via Discuss > > <discuss@lists.openscad.org> wrote: > > > Before I ask for a feature in BOSL2, I thought I'd as here in case > > > I am > > > missing something. > > > > > > I had occasion to use sweep, but found out I can only use it for 2D > > > objects. I ended up using zcopies with start and end angles of 10 > > > and > > > 40 degrees, and an n value of 100. This produces a fairly > > > satisfactory > > > result, but it sort of makes me shudder, and takes a fairly long > > > time > > > to render > > > > > > Is there way to do a sweep or sweep-like operation with a 3D > > > object? > > > > > > > > > L > > > _______________________________________________ > > > OpenSCAD mailing list > > > To unsubscribe send an email to discuss-leave@lists.openscad.org > > _______________________________________________ > > OpenSCAD mailing list > > To unsubscribe send an email to discuss-leave@lists.openscad.org > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
L
larry
Sun, Sep 21, 2025 2:26 AM

On Sat, 2025-09-20 at 22:14 -0400, Adrian Mariano via Discuss wrote:

That shapes looks like it could be constructed (except maybe for the
ends) from a regular path_sweep using the center profile of your
shape.  
I can say that the feature you are asking for is not feasible to
implement in user space.  It would be 100x slower than your existing
implementation.  

Thanks Adrian. I think I'll try a combination of your suggestion and
Dan's; sweep the profile and use two halves of a 3D object rotated into
position and unioned.

Hmm... thinking about it, I can use a projection of the end pieces to
create the 2D profile. Miht be easier than I thought.

On Sat, Sep 20, 2025 at 6:26 PM larry via Discuss
discuss@lists.openscad.org wrote:

On Sat, 2025-09-20 at 22:47 +0100, Dan Perry via Discuss wrote:

BOSL2 path_sweep() takes a caps argument: " if closed is false,
set
caps to false to leave the ends open. Other values are true to
create
a flat cap, a number a rounded cap, or an offset_sweep() end
treatment to create the specified offset sweep. Can be a single
value
or pair of values to control the caps independently at each end.
Default: true"

A rounded cap would be the same as sweeping a sphere.  If it's
more
complicated than that (I cannot picture your description of your
workaround), you could union() two copies of the 3D object to the
ends of the sweep perhaps?
Dan

It's a more complicated object. I am trying to write an OpenSCAD
program to allow a user to make a parametric filament clip that
will
snap-fit into the holes on the rim of a spool.

//------
include <BOSL2/std.scad>
$fn= $preview ? 60 : 180;

spool_rad=100;
holeposition_rad=spool_rad-6;
hole_dia=6;
hole_hole_dist_max=33.9;
hole_hole_dist_min=21.9;

arc_copies(n=200,sa=78,ea=102)// profile();
difference() {
        profile();
        up(2.5)filament_slot();
}

module profile() {
        hull() {
                right(holeposition_rad)
up(0.05)cyl(d=hole_dia*1.8,h=0.1);
                up(2)
right(holeposition_rad) cyl(h=2,d=hole_dia,rounding=1);
                }
}

module filament_slot() {
 rotate_extrude() right(holeposition_rad) circle(1.76/2);
        }
//-----

On Sat, Sep 20, 2025 at 8:21 PM larry via Discuss
discuss@lists.openscad.org wrote:

Before I ask for a feature in BOSL2, I thought I'd as here in
case
I am
missing something.

I had occasion to use sweep, but found out I can only use it
for 2D
objects. I ended up using zcopies with start and end angles of
10
and
40 degrees, and an n value of 100. This produces a fairly
satisfactory
result, but it sort of makes me shudder, and takes a fairly
long
time
to render

Is there way to do a sweep or sweep-like operation with a 3D
object?

L


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


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


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


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

On Sat, 2025-09-20 at 22:14 -0400, Adrian Mariano via Discuss wrote: > That shapes looks like it could be constructed (except maybe for the > ends) from a regular path_sweep using the center profile of your > shape.   > I can say that the feature you are asking for is not feasible to > implement in user space.  It would be 100x slower than your existing > implementation.   Thanks Adrian. I think I'll try a combination of your suggestion and Dan's; sweep the profile and use two halves of a 3D object rotated into position and unioned. Hmm... thinking about it, I can use a projection of the end pieces to create the 2D profile. Miht be easier than I thought. > On Sat, Sep 20, 2025 at 6:26 PM larry via Discuss > <discuss@lists.openscad.org> wrote: > > On Sat, 2025-09-20 at 22:47 +0100, Dan Perry via Discuss wrote: > > > BOSL2 path_sweep() takes a caps argument: " if closed is false, > > > set > > > caps to false to leave the ends open. Other values are true to > > > create > > > a flat cap, a number a rounded cap, or an offset_sweep() end > > > treatment to create the specified offset sweep. Can be a single > > > value > > > or pair of values to control the caps independently at each end. > > > Default: true" > > > > > > A rounded cap would be the same as sweeping a sphere.  If it's > > > more > > > complicated than that (I cannot picture your description of your > > > workaround), you could union() two copies of the 3D object to the > > > ends of the sweep perhaps? > > > Dan > > > > It's a more complicated object. I am trying to write an OpenSCAD > > program to allow a user to make a parametric filament clip that > > will > > snap-fit into the holes on the rim of a spool. > > > > //------ > > include <BOSL2/std.scad> > > $fn= $preview ? 60 : 180; > > > > spool_rad=100; > > holeposition_rad=spool_rad-6; > > hole_dia=6; > > hole_hole_dist_max=33.9; > > hole_hole_dist_min=21.9; > > > > > > arc_copies(n=200,sa=78,ea=102)// profile(); > > difference() { > >         profile(); > >         up(2.5)filament_slot(); > > } > > > > module profile() { > >         hull() { > >                 right(holeposition_rad) > > up(0.05)cyl(d=hole_dia*1.8,h=0.1); > >                 up(2) > > right(holeposition_rad) cyl(h=2,d=hole_dia,rounding=1); > >                 } > > } > > > > module filament_slot() { > >  rotate_extrude() right(holeposition_rad) circle(1.76/2); > >         } > > //----- > > > > > > > On Sat, Sep 20, 2025 at 8:21 PM larry via Discuss > > > <discuss@lists.openscad.org> wrote: > > > > Before I ask for a feature in BOSL2, I thought I'd as here in > > > > case > > > > I am > > > > missing something. > > > > > > > > I had occasion to use sweep, but found out I can only use it > > > > for 2D > > > > objects. I ended up using zcopies with start and end angles of > > > > 10 > > > > and > > > > 40 degrees, and an n value of 100. This produces a fairly > > > > satisfactory > > > > result, but it sort of makes me shudder, and takes a fairly > > > > long > > > > time > > > > to render > > > > > > > > Is there way to do a sweep or sweep-like operation with a 3D > > > > object? > > > > > > > > > > > > L > > > > _______________________________________________ > > > > OpenSCAD mailing list > > > > To unsubscribe send an email to > > > > discuss-leave@lists.openscad.org > > > _______________________________________________ > > > OpenSCAD mailing list > > > To unsubscribe send an email to discuss-leave@lists.openscad.org > > > > _______________________________________________ > > OpenSCAD mailing list > > To unsubscribe send an email to discuss-leave@lists.openscad.org > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
L
larry
Sun, Sep 21, 2025 10:20 PM

On Sat, 2025-09-20 at 20:26 -0600, larry via Discuss wrote:

Thanks Adrian. I think I'll try a combination of your suggestion and
Dan's; sweep the profile and use two halves of a 3D object rotated into
position and unioned.

Hmm... thinking about it, I can use a projection of the end pieces to
create the 2D profile. Miht be easier than I thought.

Well, I have a start, making a 2D profile, but I am stuck on how to
rotate_sweep the profile.

L

On Sat, 2025-09-20 at 20:26 -0600, larry via Discuss wrote: > Thanks Adrian. I think I'll try a combination of your suggestion and > Dan's; sweep the profile and use two halves of a 3D object rotated into > position and unioned. > > Hmm... thinking about it, I can use a projection of the end pieces to > create the 2D profile. Miht be easier than I thought. Well, I have a start, making a 2D profile, but I am stuck on how to rotate_sweep the profile. L
AM
Adrian Mariano
Sun, Sep 21, 2025 10:24 PM

Why can't you use rotate_sweep or path_sweep?

On Sun, Sep 21, 2025 at 6:21 PM larry via Discuss <
discuss@lists.openscad.org> wrote:

On Sat, 2025-09-20 at 20:26 -0600, larry via Discuss wrote:

Thanks Adrian. I think I'll try a combination of your suggestion and
Dan's; sweep the profile and use two halves of a 3D object rotated into
position and unioned.

Hmm... thinking about it, I can use a projection of the end pieces to
create the 2D profile. Miht be easier than I thought.

Well, I have a start, making a 2D profile, but I am stuck on how to
rotate_sweep the profile.

L


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

Why can't you use rotate_sweep or path_sweep? On Sun, Sep 21, 2025 at 6:21 PM larry via Discuss < discuss@lists.openscad.org> wrote: > On Sat, 2025-09-20 at 20:26 -0600, larry via Discuss wrote: > > Thanks Adrian. I think I'll try a combination of your suggestion and > > Dan's; sweep the profile and use two halves of a 3D object rotated into > > position and unioned. > > > > Hmm... thinking about it, I can use a projection of the end pieces to > > create the 2D profile. Miht be easier than I thought. > > Well, I have a start, making a 2D profile, but I am stuck on how to > rotate_sweep the profile. > > > L > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
L
larry
Sun, Sep 21, 2025 10:45 PM

On Sun, 2025-09-21 at 18:24 -0400, Adrian Mariano via Discuss wrote:

Why can't you use rotate_sweep or path_sweep?  

oops... forgot to post the code.
I can't use it because I don't know the syntax. All the examples, which
I usually use to learn the syntax, I can't relate to my code, and I get
nothing but syntax errors with everything I've tried.

Here's the code for the profile. I just can't figure out how to
rotate_extrude it.

//----
include <BOSL2/std.scad>
$fn= $preview ? 60 : 180;

spool_rad=100;
holeposition_rad=spool_rad-6;
hole_dia=6;
hole_hole_dist_max=33.9;
hole_hole_dist_min=21.9;

module profile() {
projection() back(1.5) right(holeposition_rad) xrot(-90)
cyl(h=3,d1=hole_dia*1.8,d2=hole_dia,rounding2=1);
}
//----

On Sun, Sep 21, 2025 at 6:21 PM larry via Discuss
discuss@lists.openscad.org wrote:

On Sat, 2025-09-20 at 20:26 -0600, larry via Discuss wrote:

Thanks Adrian. I think I'll try a combination of your suggestion
and
Dan's; sweep the profile and use two halves of a 3D object
rotated into
position and unioned.

Hmm... thinking about it, I can use a projection of the end
pieces to
create the 2D profile. Miht be easier than I thought.

Well, I have a start, making a 2D profile, but I am stuck on how to
rotate_sweep the profile.

L


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

On Sun, 2025-09-21 at 18:24 -0400, Adrian Mariano via Discuss wrote: > Why can't you use rotate_sweep or path_sweep?   oops... forgot to post the code. I can't use it because I don't know the syntax. All the examples, which I usually use to learn the syntax, I can't relate to my code, and I get nothing but syntax errors with everything I've tried. Here's the code for the profile. I just can't figure out how to rotate_extrude it. //---- include <BOSL2/std.scad> $fn= $preview ? 60 : 180; spool_rad=100; holeposition_rad=spool_rad-6; hole_dia=6; hole_hole_dist_max=33.9; hole_hole_dist_min=21.9; module profile() { projection() back(1.5) right(holeposition_rad) xrot(-90) cyl(h=3,d1=hole_dia*1.8,d2=hole_dia,rounding2=1); } //---- > On Sun, Sep 21, 2025 at 6:21 PM larry via Discuss > <discuss@lists.openscad.org> wrote: > > On Sat, 2025-09-20 at 20:26 -0600, larry via Discuss wrote: > > > Thanks Adrian. I think I'll try a combination of your suggestion > > > and > > > Dan's; sweep the profile and use two halves of a 3D object > > > rotated into > > > position and unioned. > > > > > > Hmm... thinking about it, I can use a projection of the end > > > pieces to > > > create the 2D profile. Miht be easier than I thought. > > > > Well, I have a start, making a 2D profile, but I am stuck on how to > > rotate_sweep the profile. > > > > > > L > > _______________________________________________ > > 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
L
larry
Sun, Sep 21, 2025 10:54 PM

On Sun, 2025-09-21 at 16:45 -0600, larry via Discuss wrote:

On Sun, 2025-09-21 at 18:24 -0400, Adrian Mariano via Discuss wrote:

Why can't you use rotate_sweep or path_sweep?  

oops... forgot to post the code.
I can't use it because I don't know the syntax. All the examples, which
I usually use to learn the syntax, I can't relate to my code, and I get
nothing but syntax errors with everything I've tried.

Here's the code for the profile. I just can't figure out how to
rotate_extrude it.

oops again. Not rotate_extrude, but rotate_sweep (or would
rotate_extrude work here?

//----
include <BOSL2/std.scad>
$fn= $preview ? 60 : 180;

spool_rad=100;
holeposition_rad=spool_rad-6;
hole_dia=6;
hole_hole_dist_max=33.9;
hole_hole_dist_min=21.9;

module profile() {
projection() back(1.5) right(holeposition_rad) xrot(-90)
cyl(h=3,d1=hole_dia*1.8,d2=hole_dia,rounding2=1);
}
//----

On Sun, Sep 21, 2025 at 6:21 PM larry via Discuss
discuss@lists.openscad.org wrote:

On Sat, 2025-09-20 at 20:26 -0600, larry via Discuss wrote:

Thanks Adrian. I think I'll try a combination of your suggestion
and
Dan's; sweep the profile and use two halves of a 3D object
rotated into
position and unioned.

Hmm... thinking about it, I can use a projection of the end
pieces to
create the 2D profile. Miht be easier than I thought.

Well, I have a start, making a 2D profile, but I am stuck on how to
rotate_sweep the profile.

L


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


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


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

On Sun, 2025-09-21 at 16:45 -0600, larry via Discuss wrote: > On Sun, 2025-09-21 at 18:24 -0400, Adrian Mariano via Discuss wrote: > > Why can't you use rotate_sweep or path_sweep?   > > oops... forgot to post the code. > I can't use it because I don't know the syntax. All the examples, which > I usually use to learn the syntax, I can't relate to my code, and I get > nothing but syntax errors with everything I've tried. > > Here's the code for the profile. I just can't figure out how to > rotate_extrude it. oops again. Not rotate_extrude, but rotate_sweep (or would rotate_extrude work here? > //---- > include <BOSL2/std.scad> > $fn= $preview ? 60 : 180; > > spool_rad=100; > holeposition_rad=spool_rad-6; > hole_dia=6; > hole_hole_dist_max=33.9; > hole_hole_dist_min=21.9; > > > module profile() { > projection() back(1.5) right(holeposition_rad) xrot(-90) > cyl(h=3,d1=hole_dia*1.8,d2=hole_dia,rounding2=1); > } > //---- > > > On Sun, Sep 21, 2025 at 6:21 PM larry via Discuss > > <discuss@lists.openscad.org> wrote: > > > On Sat, 2025-09-20 at 20:26 -0600, larry via Discuss wrote: > > > > Thanks Adrian. I think I'll try a combination of your suggestion > > > > and > > > > Dan's; sweep the profile and use two halves of a 3D object > > > > rotated into > > > > position and unioned. > > > > > > > > Hmm... thinking about it, I can use a projection of the end > > > > pieces to > > > > create the 2D profile. Miht be easier than I thought. > > > > > > Well, I have a start, making a 2D profile, but I am stuck on how to > > > rotate_sweep the profile. > > > > > > > > > L > > > _______________________________________________ > > > OpenSCAD mailing list > > > To unsubscribe send an email to discuss-leave@lists.openscad.org > > _______________________________________________ > > OpenSCAD mailing list > > To unsubscribe send an email to discuss-leave@lists.openscad.org > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
JB
Jordan Brown
Sun, Sep 21, 2025 11:00 PM

On 9/21/2025 3:54 PM, larry via Discuss wrote:

projection() back(1.5) right(holeposition_rad) xrot(-90)
cyl(h=3,d1=hole_dia*1.8,d2=hole_dia,rounding2=1);
}

projection() produces actual OpenSCAD geometry.  BOSL2's sweep functions
require lists of points.

You could rotate_extrude() or linear_extrude() that projection, but if
you really wanted a sweep along an arbitrary path then that won't help you.

On 9/21/2025 3:54 PM, larry via Discuss wrote: >> projection() back(1.5) right(holeposition_rad) xrot(-90) >> cyl(h=3,d1=hole_dia*1.8,d2=hole_dia,rounding2=1); >> } projection() produces actual OpenSCAD geometry.  BOSL2's sweep functions require lists of points. You could rotate_extrude() or linear_extrude() that projection, but if you really wanted a sweep along an arbitrary path then that won't help you.