I want to build surface of violin.
I found that it is Curtate Cycloid
So basic form is:
include <BOSL2/std.scad>
a=250; //
b=0.9*a;
m=12/b;
//down(a-b)
color("red")translate([0,-170,36])left(a/2)color("red")
for (fi=[0:1:360])
translate([(a*(fi)-b*sin(fi))/360 ,0,m*((b-b*cos(fi))) ])sphere(1);
// OR
path =[
for (fi=[0:1:360]) let(
pt =(a*fi-b*sin(fi))/360,
pt2=m*(b-b*cos(fi))
) [pt, pt2]
];
color("blue")path_sweep(square([1,1]),path);
I never use surfaces so I ask
If you can build the 2d point list of the violin as a grid you can use
vnf_vertex_array to make that into a surface. The hard part seems like
making that point list. To make a full shape you'd need to model the
front, back and then put them together into one list (or join them) so that
you get a closed object.
On Thu, May 28, 2026 at 11:02 AM yur_vol--- via Discuss <
discuss@lists.openscad.org> wrote:
I want to build surface of violin.
I found that it is Curtate Cycloid
So basic form is:
include <BOSL2/std.scad>
a=250; //
b=0.9*a;
m=12/b;
//down(a-b)
color("red")translate([0,-170,36])left(a/2)color("red")
for (fi=[0:1:360])
translate([(a*(fi)-b*sin(fi))/360 ,0,m*((b-b*cos(fi))) ])sphere(1);
// OR
path =[
for (fi=[0:1:360]) let(
pt =(a*fi-b*sin(fi))/360,
pt2=m*(b-b*cos(fi))
) [pt, pt2]
];
color("blue")path_sweep(square([1,1]),path);
I never use surfaces so I ask
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
Got it, made partially but
I want to connect two mirrored surfaces to make it solid then diff with target form.
Howto connect? simply append second point list?
include <BOSL2/std.scad>
a=250; //
b=0.9*a;
k=12;
m=k/b;
path =[
for (fi=[0:1:360]) let(
pt =(a*fi-b*sin(fi))/360,
pt2=m*(b-b*cos(fi))
) [pt, 0,pt2]
];
color("blue")path_sweep(square([1,1]),path);
module show_triangulation1(style) {
pts = [
for(u=[0:1:360])
[ for (fi=[0:1:360]) let(
pt =(a*fi-b*sin(fi))/360,
pt2=m*(b-b*cos(fi)),
ypt=(a*u-b*sin(u))/360,
ypt2=m*(b-b*cos(u))
) [pt, ypt*2,pt2*ypt2*0.04]
]
];
vnf = vnf_vertex_array(pts, style=style);
color("#ccf") vnf_polyhedron(vnf);
// echo(pts);
}
up(20)show_triangulation1( "default");
mirror([0,0,1])up(20)show_triangulation1( "default");
%translate([120,250,0])scale([1,2,1])cyl(d=200,h=100);
I mirrored with zero Z
Do they share boundary edges
but still cannot vnf_join both polyhedrons
What I do wrong?
include <BOSL2/std.scad>
a=250; //
b=0.9*a;
k=12;
m=k/b;
path =[
for (fi=[0:1:360]) let(
pt =(a*fi-b*sin(fi))/360,
pt2=m*(b-b*cos(fi))
) [pt, 0,pt2]
];
color("blue")path_sweep(square([1,1]),path);
pts = [
for(u=[0:1:360])
[ for (fi=[0:1:360]) let(
pt =(a*fi-b*sin(fi))/360,
pt2=m*(b-b*cos(fi)),
ypt=(a*u-b*sin(u))/360,
ypt2=m*(b-b*cos(u))
) [pt, ypt*2,pt2*ypt2*0.04]
]
];
vnf = vnf_vertex_array(pts, style="default");
color("#ccf") vnf_polyhedron(vnf);
// echo(pts);
pts1 = [
for(u1=[0:1:360])
[ for (fi1=[0:1:360]) let(
ppt =(a*fi1-b*sin(fi1))/360,
ppt2=m*(b-b*cos(fi1)),
pypt=(a*u1-b*sin(u1))/360,
pypt2=m*(b-b*cos(u1))
) [ppt, pypt*2,-ppt2*pypt2*0.04]
]
];
vnf1 = vnf_vertex_array(pts1, style="default");
color("#ccf") vnf_polyhedron(vnf1);
vnf_polyhedron(vnf);
//up(20)show_triangulation1( "default");
//mirror([0,0,1])up(20)show_triangulation1( "default");
//%translate([120,250,0])scale([1,2,1])cyl(d=200,h=100);
full = vnf_join([vnf,vnf1]);
vnf_polyhedron(full);
Using your original version you can build a surface like this:
vnf = vnf_vertex_array(pts, style=style,reverse=true);
vnf2 = zflip(vnf);
v = vnf_join([vnf,vnf2]);
vnf_polyhedron(v);
Note that reverse is needed because your made your faces backwards. The
way to tell this is to select "thrown together" as the rendering method
(instead of preview) and use F5. If your object is entirely yellow you're
OK. If you see any purple, those parts are backwards. An object is only
valid if it's entirely yellow. (And this won't work if you apply your own
color.) If you want to use this method for a violin you'll also need to
construct with vnf_verte_array the strip that connects the two halves.
Another option that might be less work would be to use textured_tile()
which can accept your points and put them on a cuboid for you, so it
creates the other faces. That will only work if your points exist on a
grid in (x,y) though.
On Fri, May 29, 2026 at 3:57 AM yur_vol--- via Discuss <
discuss@lists.openscad.org> wrote:
I mirrored with zero Z
Do they share boundary edges
but still cannot vnf_join both polyhedrons
What I do wrong?
include <BOSL2/std.scad>
a=250; //
b=0.9*a;
k=12;
m=k/b;
path =[
for (fi=[0:1:360]) let(
pt =(a*fi-b*sin(fi))/360,
pt2=m*(b-b*cos(fi))
) [pt, 0,pt2]
];
color("blue")path_sweep(square([1,1]),path);
pts = [
for(u=[0:1:360])
[ for (fi=[0:1:360]) let(
pt =(a*fi-b*sin(fi))/360,
pt2=m*(b-b*cos(fi)),
ypt=(a*u-b*sin(u))/360,
ypt2=m*(b-b*cos(u))
) [pt, ypt*2,pt2*ypt2*0.04]
]
];
vnf = vnf_vertex_array(pts, style="default");
color("#ccf") vnf_polyhedron(vnf);
// echo(pts);
pts1 = [
for(u1=[0:1:360])
[ for (fi1=[0:1:360]) let(
ppt =(a*fi1-b*sin(fi1))/360,
ppt2=m*(b-b*cos(fi1)),
pypt=(a*u1-b*sin(u1))/360,
pypt2=m*(b-b*cos(u1))
) [ppt, pypt*2,-ppt2*pypt2*0.04]
]
];
vnf1 = vnf_vertex_array(pts1, style="default");
color("#ccf") vnf_polyhedron(vnf1);
vnf_polyhedron(vnf);
//up(20)show_triangulation1( "default");
//mirror([0,0,1])up(20)show_triangulation1( "default");
//%translate([120,250,0])scale([1,2,1])cyl(d=200,h=100);
full = vnf_join([vnf,vnf1]);
vnf_polyhedron(full);
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
Thank you! I did it.