Nabble removed Mailing-list integration from the Forum.
This killed the Forum. This is now an ARCHIVE.
It is likely Nabble will shutdown in the future.
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. _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
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: Hello _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
How can we extract such faces from a shell given some conditions?
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] |
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 <[hidden email]> wrote: How can we extract such faces from a shell given some conditions? _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
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] |
In reply to this post by Sayandeep Khan
On 4/23/2021 4:17 PM, Jordan Brown
wrote:
[ 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:
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] |
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] |
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] |
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] |
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); }
Sent from the OpenSCAD mailing list archive at Nabble.com. _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
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 <[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. _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
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 <include<BOSL2/std.scad> which I forgot to include in my post. This is what the cutting shape looks like from the skin example:
Sent from the OpenSCAD mailing list archive at Nabble.com. _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
Theg bit perpendicular and will work for any curve whose slope stays finite (the normal has a nonzero component in the z direction). The inclusion of one more section to skin should solve the thickness issue: include <BOSL2/std.scad> $fn=90; r=8; thickness=1; h = 20; module cyl_shell(r,h) { difference() { cylinder(r=r,h=h,center=true); cylinder(r=r-thickness,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)] ]; out_cyl_curve = [for(p=cyl_curve) [1.1*p[0], 1.1*p[1], p[2]]] ; in_cyl_curve = [for(p=cyl_curve) [(0.9*(r-thickness)/r)*p[0], (0.9*(r-thickness)/r)*p[1], p[2]]] ; out_cyl_curve_up = [for(p=out_cyl_curve) p + [0,0,h] ]; //trace_path(cyl_curve, size=.5, closed=true); intersection(convexity=10) { cyl_shell(r,h); skin([in_cyl_curve, out_cyl_curve, out_cyl_curve_up],slices=1); } _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
That solution does appear OK, though it seems better to just use a circle for the top instead of the curved profile. However, having gone that far, why not just make the entire shape with skin(). Note that this approach only makes one half of the shape the original poster seemed to be requesting. This could also be constructed using vnf_vertex_array instead of skin.
include<BOSL2/std.scad> $fn=90; r=8; thickness=1; len=21; n=4; outer_curve = [for(theta=[360:-4:1]) [r*cos(theta), r*sin(theta), 10+sin(n*theta)]]; inner_curve = [for(theta=[360:-4:1]) [(r-thickness)*cos(theta), (r-thickness)*sin(theta), 10+sin(n*theta)]]; skin([inner_curve, outer_curve, path3d(circle(r),len), path3d(circle(r-thickness), len)], slices=0, closed=true);
Sent from the OpenSCAD mailing list archive at Nabble.com. _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
Free forum by Nabble | Edit this page |