### Cutting a Cylindrical shell SK
Sayandeep Khan
Fri, Apr 23, 2021 10:01 PM

­Hello

I have made a cylindrical shell using binary difference between two cylinders.

The bezier_coordinate function spits out the coordinates for a polyline to be drawn.

I can project these points on the surface of the cylindrical shell, effectivly "wrapping the curve" on the outer cylindrical surface , The curve is a closed curve,

I want to find a way to cut the cylindrical shell along this line. As if, an arbitrarily small milling bit has milled through the entire depth of the shell , splitting it in different parts.

How is that possible using openscad. Thank you.

Ihr Recht auf Privatsphäre. Schützen Sie Ihre Daten und wechseln jetzt zu eclipso Mail & Cloud. NH
Fri, Apr 23, 2021 10:30 PM

I think you need to convert the point list into a polyhedron by adding a
second set of points on a circle bigger than the tube and further away then
its end. Then list all the faces to connect those points to your curve.
That would give a 3D shape that you can subtract from the tube to cut it.

On Fri, 23 Apr 2021 at 23:02, Sayandeep Khan seany@eclipso.de wrote:

­Hello

I have made a cylindrical shell using binary difference between two
cylinders.

I have made a cubic bezier curve using this :

The bezier_coordinate function spits out the coordinates for a polyline to
be drawn.

I can project these points on the surface of the cylindrical shell,
effectivly "wrapping the curve" on the outer cylindrical surface , The
curve is a closed curve,

I want to find a way to cut the cylindrical shell along this line. As if,
an arbitrarily small milling bit has milled through the entire depth of the
shell , splitting it in different parts.

How is that possible using openscad. Thank you.

Ihr Recht auf Privatsphäre. Schützen Sie Ihre Daten und wechseln jetzt zu eclipso
Mail & Cloud https://www.eclipso.de
.

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

I think you need to convert the point list into a polyhedron by adding a second set of points on a circle bigger than the tube and further away then its end. Then list all the faces to connect those points to your curve. That would give a 3D shape that you can subtract from the tube to cut it. On Fri, 23 Apr 2021 at 23:02, Sayandeep Khan <seany@eclipso.de> wrote: > ­Hello > > I have made a cylindrical shell using binary difference between two > cylinders. > > I have made a cubic bezier curve using this : > https://openhome.cc/eGossip/OpenSCAD/BezierCurve.html > > The bezier_coordinate function spits out the coordinates for a polyline to > be drawn. > > I can project these points on the surface of the cylindrical shell, > effectivly "wrapping the curve" on the outer cylindrical surface , The > curve is a closed curve, > > I want to find a way to cut the cylindrical shell along this line. As if, > an arbitrarily small milling bit has milled through the entire depth of the > shell , splitting it in different parts. > > How is that possible using openscad. Thank you. > > > > > Ihr Recht auf Privatsphäre. Schützen Sie Ihre Daten und wechseln jetzt zu *eclipso > Mail & Cloud <https://www.eclipso.de>*. > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org > SK
Sayandeep Khan
Fri, Apr 23, 2021 11:03 PM

­ How can we extract such faces from a shell given some conditions?

Datum: 24.04.2021 00:30:51
Betreff: Re: [OpenSCAD] Cutting a Cylindrical shell

I think you need to convert the point list into a polyhedron by adding a second set of points on a circle bigger than the tube and further away then its end. Then list all the faces to connect those points to your curve. That would give a 3D shape that you can subtract from the tube to cut it.

On Fri, 23 Apr 2021 at 23:02, Sayandeep Khan <seany@eclipso.de> wrote:

­Hello

I have made a cylindrical shell using binary difference between two cylinders.

The bezier_coordinate function spits out the coordinates for a polyline to be drawn.

I can project these points on the surface of the cylindrical shell, effectivly "wrapping the curve" on the outer cylindrical surface , The curve is a closed curve,

I want to find a way to cut the cylindrical shell along this line. As if, an arbitrarily small milling bit has milled through the entire depth of the shell , splitting it in different parts.

How is that possible using openscad. Thank you.

Ihr Recht auf Privatsphäre. Schützen Sie Ihre Daten und wechseln jetzt zu eclipso Mail & Cloud.

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

Ihr Recht auf Privatsphäre. Schützen Sie Ihre Daten und wechseln jetzt zu eclipso Mail & Cloud. NH
Fri, Apr 23, 2021 11:08 PM

You could simply duplicate the points and give them two different z values,
one where you want the cut and the other far away. Concatenate the lists
and pass that as the point list for polyhedron. Then for the faces list you
need to make the walls and the endcaps by listing triangles that index the
point list.

On Sat, 24 Apr 2021 at 00:04, Sayandeep Khan seany@eclipso.de wrote:

­ How can we extract such faces from a shell given some conditions?
Thank you

Datum: 24.04.2021 00:30:51
An: Sayandeep Khan seany@eclipso.de, OpenSCAD general discussion <
Betreff: Re: [OpenSCAD] Cutting a Cylindrical shell
I think you need to convert the point list into a polyhedron by adding a
second set of points on a circle bigger than the tube and further away then
its end. Then list all the faces to connect those points to your curve.
That would give a 3D shape that you can subtract from the tube to cut it.

On Fri, 23 Apr 2021 at 23:02, Sayandeep Khan <seany@eclipso.de
http://seany%40eclipso.de> wrote:

­Hello

I have made a cylindrical shell using binary difference between two
cylinders.

I have made a cubic bezier curve using this :

The bezier_coordinate function spits out the coordinates for a polyline to
be drawn.

I can project these points on the surface of the cylindrical shell,
effectivly "wrapping the curve" on the outer cylindrical surface , The
curve is a closed curve,

I want to find a way to cut the cylindrical shell along this line. As if,
an arbitrarily small milling bit has milled through the entire depth of the
shell , splitting it in different parts.

How is that possible using openscad. Thank you.

Ihr Recht auf Privatsphäre. Schützen Sie Ihre Daten und wechseln jetzt zu eclipso
Mail & Cloud https://www.eclipso.de
.

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

Ihr Recht auf Privatsphäre. Schützen Sie Ihre Daten und wechseln jetzt zu eclipso
Mail & Cloud https://www.eclipso.de
.

To unsubscribe send an email to discuss-leave@lists.openscad.org JB
Jordan Brown
Fri, Apr 23, 2021 11:17 PM

On 4/23/2021 4:03 PM, Sayandeep Khan wrote:

­How can we extract such faces from a shell given some conditions?

I'd be happy to cook up a demonstration, but I don't have time right now.

Here's the basic theory...

Have you looked at how you build a polyhedron?  You define a bunch of
points, and then you connect groups of those points into faces that all
add up to being the polyhedron.

The idea here is that you're going to build a polyhedron that mostly
looks like a cylinder a bit bigger than the cylinder that you're going
to cut, except that the top of this polyhedron is wavy, using your
Bezier curve.

On 4/23/2021 4:03 PM, Sayandeep Khan wrote: > ­How can we extract such faces from a shell given some conditions? I'd be happy to cook up a demonstration, but I don't have time right now. Here's the basic theory... Have you looked at how you build a polyhedron?  You define a bunch of points, and then you connect groups of those points into faces that all add up to being the polyhedron. The idea here is that you're going to build a polyhedron that mostly looks like a cylinder a bit bigger than the cylinder that you're going to cut, except that the top of this polyhedron is wavy, using your Bezier curve. A
arnholm@arnholm.org
Sat, Apr 24, 2021 7:30 AM

On 2021-04-24 00:01, Sayandeep Khan wrote:

I want to find a way to cut the cylindrical shell along this line. As
if, an arbitrarily small milling bit has milled through the entire
depth of the shell , splitting it in different parts.

How is that possible using openscad. Thank you.

If your curve is planar, there are simple ways to do it. If the curve is
general and non-planar, the suggestions given by others here apply, but
constructing a polyhedron from the ground up can be cumbersome.

Perhaps another approach is workable by first modelling the small drill
bit as a small polyhedron, then place copies of it, properly oriented,
in every point along the split curve. Union pairs of neighbouring drill
bits and use them to subtract from the cylindrical shell. When done for
all pairs, the result is a split cylinder.

Carsten Arnholm

On 2021-04-24 00:01, Sayandeep Khan wrote: > I want to find a way to cut the cylindrical shell along this line. As > if, an arbitrarily small milling bit has milled through the entire > depth of the shell , splitting it in different parts. > > How is that possible using openscad. Thank you. If your curve is planar, there are simple ways to do it. If the curve is general and non-planar, the suggestions given by others here apply, but constructing a polyhedron from the ground up can be cumbersome. Perhaps another approach is workable by first modelling the small drill bit as a small polyhedron, then place copies of it, properly oriented, in every point along the split curve. Union pairs of neighbouring drill bits and use them to subtract from the cylindrical shell. When done for all pairs, the result is a split cylinder. Carsten Arnholm SK
Sayandeep Khan
Sat, Apr 24, 2021 10:10 AM

Indeen my curve is not planer any more after wrapping it around a cylinder.
But I like the way you propose.

Thank you.

--- Ursprüngliche Nachricht ---
Von: arnholm@arnholm.org
Datum: 24.04.2021 09:30:03
Betreff: [OpenSCAD] Re: Cutting a Cylindrical shell

On 2021-04-24 00:01, Sayandeep Khan wrote:

I want to find a way to cut the cylindrical shell along this line. As

if, an arbitrarily small milling bit has milled through the entire
depth of the shell , splitting it in different parts.

How is that possible using openscad. Thank you.

If your curve is planar, there are simple ways to do it. If the curve is

general and non-planar, the suggestions given by others here apply, but

constructing a polyhedron from the ground up can be cumbersome.

Perhaps another approach is workable by first modelling the small drill

bit as a small polyhedron, then place copies of it, properly oriented,
in every point along the split curve. Union pairs of neighbouring drill

bits and use them to subtract from the cylindrical shell. When done for

all pairs, the result is a split cylinder.

Carsten Arnholm

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

Ihr Recht auf Privatsphäre. Schützen Sie Ihre Daten und wechseln jetzt zu eclipso Mail & Cloud - https://www.eclipso.de

Indeen my curve is not planer any more after wrapping it around a cylinder. But I like the way you propose. Thank you. --- Ursprüngliche Nachricht --- Von: arnholm@arnholm.org Datum: 24.04.2021 09:30:03 An: OpenSCAD general discussion <discuss@lists.openscad.org> Betreff: [OpenSCAD] Re: Cutting a Cylindrical shell On 2021-04-24 00:01, Sayandeep Khan wrote: > I want to find a way to cut the cylindrical shell along this line. As > if, an arbitrarily small milling bit has milled through the entire > depth of the shell , splitting it in different parts. > > How is that possible using openscad. Thank you. If your curve is planar, there are simple ways to do it. If the curve is general and non-planar, the suggestions given by others here apply, but constructing a polyhedron from the ground up can be cumbersome. Perhaps another approach is workable by first modelling the small drill bit as a small polyhedron, then place copies of it, properly oriented, in every point along the split curve. Union pairs of neighbouring drill bits and use them to subtract from the cylindrical shell. When done for all pairs, the result is a split cylinder. Carsten Arnholm _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to discuss-leave@lists.openscad.org ________________________________________________________ Ihr Recht auf Privatsphäre. Schützen Sie Ihre Daten und wechseln jetzt zu eclipso Mail & Cloud - https://www.eclipso.de A
arnholm@arnholm.org
Sat, Apr 24, 2021 12:18 PM

On 2021-04-24 12:10, Sayandeep Khan wrote:

Indeen my curve is not planer any more after wrapping it around a
cylinder.
But I like the way you propose.

Thank you.

Actually, I meant to say use hull() rather than union() for the drill
bit pairs

Carsten Arnholm

On 2021-04-24 12:10, Sayandeep Khan wrote: > Indeen my curve is not planer any more after wrapping it around a > cylinder. > But I like the way you propose. > > Thank you. Actually, I meant to say use hull() rather than union() for the drill bit pairs Carsten Arnholm A
Sat, Apr 24, 2021 12:22 PM

This approach will work, but it will be very slow.  I think the right
approach is to use a sweep to create the cutting polyhedron.  As you say,
it's hard to construct a polyhedron from the ground up, which is why you
should instead use helper functions to do it.  Many libraries provide a
sweep function such as dotSCAD, Parkinbot's naca sweep, and BOSL2.
Using BOSL2:

\$fn=90;
r=8;
thickness=1;
len=21;

curve = [for(theta=[0:4:359]) [rcos(theta), rsin(theta),
10+sin(4*theta)]];

difference(){
cylinder(r=r, l=len);
down(.5)cylinder(r=r-thickness, l=len+1);
path_sweep(left(.05,square([1.1,1])), curve, closed=true, method="manual",
normal=UP);
}

cacb wrote

On 2021-04-24 00:01, Sayandeep Khan wrote:

I want to find a way to cut the cylindrical shell along this line. As
if, an arbitrarily small milling bit has milled through the entire
depth of the shell , splitting it in different parts.

How is that possible using openscad. Thank you.

If your curve is planar, there are simple ways to do it. If the curve is
general and non-planar, the suggestions given by others here apply, but
constructing a polyhedron from the ground up can be cumbersome.

Perhaps another approach is workable by first modelling the small drill
bit as a small polyhedron, then place copies of it, properly oriented,
in every point along the split curve. Union pairs of neighbouring drill
bits and use them to subtract from the cylindrical shell. When done for
all pairs, the result is a split cylinder.

Carsten Arnholm

To unsubscribe send an email to

This approach will work, but it will be very slow. I think the right approach is to use a sweep to create the cutting polyhedron. As you say, it's hard to construct a polyhedron from the ground up, which is why you should instead use helper functions to do it. Many libraries provide a sweep function such as dotSCAD, Parkinbot's naca sweep, and BOSL2. Using BOSL2: https://github.com/revarbat/BOSL2/wiki/skin.scad#functionmodule-path_sweep \$fn=90; r=8; thickness=1; len=21; curve = [for(theta=[0:4:359]) [r*cos(theta), r*sin(theta), 10+sin(4*theta)]]; difference(){ cylinder(r=r, l=len); down(.5)cylinder(r=r-thickness, l=len+1); path_sweep(left(.05,square([1.1,1])), curve, closed=true, method="manual", normal=UP); } <http://forum.openscad.org/file/t2477/cutcyl.png> cacb wrote > On 2021-04-24 00:01, Sayandeep Khan wrote: >> I want to find a way to cut the cylindrical shell along this line. As >> if, an arbitrarily small milling bit has milled through the entire >> depth of the shell , splitting it in different parts. >> >> How is that possible using openscad. Thank you. > > If your curve is planar, there are simple ways to do it. If the curve is > general and non-planar, the suggestions given by others here apply, but > constructing a polyhedron from the ground up can be cumbersome. > > Perhaps another approach is workable by first modelling the small drill > bit as a small polyhedron, then place copies of it, properly oriented, > in every point along the split curve. Union pairs of neighbouring drill > bits and use them to subtract from the cylindrical shell. When done for > all pairs, the result is a split cylinder. > > Carsten Arnholm > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to > discuss-leave@.openscad -- Sent from: http://forum.openscad.org/ RP
Ronaldo Persiano
Sat, Apr 24, 2021 12:56 PM

An alternative approach is to use BOSL2 skin() to make a polyhedron to cut
away the cylinder unneeded part. Oskar Lange's skin() possibly would work
too.

r = 10;
h = 20;
module cyl_shell(r,h) {
difference() {
cylinder(r=r,h=h,center=true);
cylinder(r=r-0.1,h=h+.1,center=true);
}
}

n = 50;
a = 3;
cyl_curve = [for(i=[0:n-1]) [rcos(i360/n), rsin(i360/n),
acos(3i*360/n)] ];

cyl_curve_up = [for(p=cyl_curve) p + [0,0,100] ];

//trace_path(cyl_curve, size=.5, closed=true);
intersection() {
cyl_shell(r,h);
skin(1.01*[cyl_curve, cyl_curve_up],slices=1);
}

Em sáb., 24 de abr. de 2021 às 13:23, adrianv avm4@cornell.edu escreveu:

This approach will work, but it will be very slow.  I think the right
approach is to use a sweep to create the cutting polyhedron.  As you say,
it's hard to construct a polyhedron from the ground up, which is why you
should instead use helper functions to do it.  Many libraries provide a
sweep function such as dotSCAD, Parkinbot's naca sweep, and BOSL2.
Using BOSL2:

An alternative approach is to use BOSL2 skin() to make a polyhedron to cut away the cylinder unneeded part. Oskar Lange's skin() possibly would work too. include <BOSL2/std.scad> r = 10; h = 20; module cyl_shell(r,h) { difference() { cylinder(r=r,h=h,center=true); cylinder(r=r-0.1,h=h+.1,center=true); } } n = 50; a = 3; cyl_curve = [for(i=[0:n-1]) [r*cos(i*360/n), r*sin(i*360/n), a*cos(3*i*360/n)] ]; cyl_curve_up = [for(p=cyl_curve) p + [0,0,100] ]; //trace_path(cyl_curve, size=.5, closed=true); intersection() { cyl_shell(r,h); skin(1.01*[cyl_curve, cyl_curve_up],slices=1); } Em sáb., 24 de abr. de 2021 às 13:23, adrianv <avm4@cornell.edu> escreveu: > This approach will work, but it will be very slow. I think the right > approach is to use a sweep to create the cutting polyhedron. As you say, > it's hard to construct a polyhedron from the ground up, which is why you > should instead use helper functions to do it. Many libraries provide a > sweep function such as dotSCAD, Parkinbot's naca sweep, and BOSL2. > Using BOSL2: > >