Nabble has removed Mailing-list integration.
Posts created here DO NOT GET SENT TO THE MAILING LIST.
Mailing-list emails DO NOT GET POSTED TO THE FORUM.
So basically the Forum is now out of date, we are looking into migrating the history.

# Cutting a Cylindrical shell

14 messages
Open this post in threaded view
|

## Cutting a Cylindrical shell

 ­HelloI 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.htmlThe 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. _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email]
Open this post in threaded view
|

## Re: 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 <[hidden email]> wrote:­HelloI 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.htmlThe 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. _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email]
Open this post in threaded view
|

## Re: Cutting a Cylindrical shell

Open this post in threaded view
|

## Re: Cutting a Cylindrical shell

Open this post in threaded view
|

## Re: Cutting a Cylindrical shell

 In reply to this post by Sayandeep Khan 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. _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email]
Open this post in threaded view
|

## Re: Cutting a Cylindrical shell

 In reply to this post by Sayandeep Khan On 4/23/2021 4:17 PM, Jordan Brown wrote: 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. [ And on autopilot I hit Ctrl+Enter and sent the message when I wasn't ready to... ] If you have N points in your Bezier curve, you're probably going to have 3*N, or maybe 2*N+1 faces: Your top surface is a bunch of triangles with their outside vertices along the Bezier curve that's wrapped around the cylinder, and the inside vertex at the center of the cylinder at some middle-of-the-road Z value The shell is a bunch of quadrilaterals with those same outside vertices as the top vertices, and the bottom vertices being those same X/Y values and Z just below the base of the cylinder to be cut. The bottom surface might be a set of triangles similar to the top surface, but all with that same just-below-the-base Z value, or maybe you can do it as one big N-gon. Doing this is a bit intricate, but isn't all that *hard* once you get the pattern down.  Mostly it's a bunch of list comprehensions, and some light trigonometry to walk around the circumference of the cylinder-like polyhedron that you're constructing. _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email]
Open this post in threaded view
|

## Re: Cutting a Cylindrical shell

 In reply to this post by Sayandeep Khan 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 [hidden email]
Open this post in threaded view
|

## Re: Cutting a Cylindrical shell

 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: [hidden email] Datum: 24.04.2021 09:30:03 An: OpenSCAD general discussion <[hidden email]> 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 [hidden email] ________________________________________________________ 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 [hidden email]
Open this post in threaded view
|

## Re: Cutting a Cylindrical shell

 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 _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email]
Open this post in threaded view
|

## Re: Cutting a Cylindrical shell

 In reply to this post by cacb 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); } 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 [hidden email] Sent from the OpenSCAD mailing list archive at Nabble.com._______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email]
Open this post in threaded view
|

## Re: Cutting a Cylindrical shell

 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 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 <[hidden email]> 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: _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email]
Open this post in threaded view
|

## Re: Cutting a Cylindrical shell

 The cutting shape produced by that code has a sharp corner, which means it looks OK for the very thin shell in the demo, but doesn't work so well if the shell is thicker.  This is a result of trying to construct the non-planar "face" defined by the cutting curve, so the approach may work for some curves but not so well for others.  It's as if the cutting bit has turned at a very extreme angle instead of remaining perpendicular to the cylinder.  The path_sweep example keeps the cutting bit perpendicular and will work for any curve whose slope stays finite (the normal has a nonzero component in the z direction).   Note that my example requires  which I forgot to include in my post.   This is what the cutting shape looks like from the skin example: Ronaldo wrote 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 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 <[hidden email]> 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: > > _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] Sent from the OpenSCAD mailing list archive at Nabble.com._______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email]