I want to design a series of vases. Imagine the shape starting at the
bottom as a circle, and as you rise up, the circle gets smaller, then
larger (a neck). But at some point, the circle becomes an ellipse, and
then the orientation of the ellipse changes. So, the cross section
changes in radius, and X- and Y- scale as you go up. So, I need to
specify those three curves in order to specify the vase.
I thought of creating the curves with Bezier curves inside OpenSCAD, but
most implementations are limited to 4 control points; and working in
OpenSCAD by typing in numbers could be both laborious and non-intuitive.
I thought of creating the curves in InkScape, but 1) I'm not sure how to
move them in to OpenSCAD, and B) the whole thing becomes a bit clunky
(modify the curve in InkScape, Copy [or whatever], Paste into OpenSCAD,
F5, rinse, repeat).
Any suggestions about how to create a workflow that is less painful and
[hopefully] intuitive?
I realize that pieces of this have probably been discussed in the past
Jon
--
Sent from my desktop computer.
I do not receive emails while away from my desk,
nor do I receive texts on my main phone number
(which is a land line).
If you know that I am on the road, please text me.
If you know that I am home, please email me.
How do you feel about creating the curves of the cross section along the
Z-axis and performing a rotate_extrude?
You get the fine detail control of Inkscape and very little code in
OpenSCAD.
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/2D_to_3D_Extrusion#Rotate_Extrude
--
Sent from: http://forum.openscad.org/
This is the kind of shape I want to make, only with better control over
the shape It starts out symmetrical, but then the cross section changes
from circular to elliptical. Not very compelling at the moment. I want
to be able to draw a curve for the diameter, x scale, and y scale as a
function of z. And then, of course, I will want curves for x and y
translation. It never ends.
inches = 25.4;
$fn = 200;
module Crosssections(i) {
if (i < 90)
// base and neck
translate([0, 0, i])
cylinder(h = 0.1, d = (3 * cos(4*i) + 6) * inches);
else if (i <= 180)
// transition to ellipse
translate([0, 0, i])
scale([1, 90 / i, 1])
cylinder(h = 0.1, d = 9 * inches);
else if (i < 360)
// transition to other ellipse
translate([0, 0, i])
scale([360 / (2 * i), (180 + i) / 720, 1])
cylinder(h = 0.1, d = 9 * inches);
}
for (i = [1:360])
hull() {
Crosssections(i);
Crosssections(i+1);
}
On 2/15/2018 5:03 PM, jon wrote:
I want to design a series of vases. Imagine the shape starting at the
bottom as a circle, and as you rise up, the circle gets smaller, then
larger (a neck). But at some point, the circle becomes an ellipse,
and then the orientation of the ellipse changes. So, the cross
section changes in radius, and X- and Y- scale as you go up. So, I
need to specify those three curves in order to specify the vase.
I thought of creating the curves with Bezier curves inside OpenSCAD,
but most implementations are limited to 4 control points; and working
in OpenSCAD by typing in numbers could be both laborious and
non-intuitive.
I thought of creating the curves in InkScape, but 1) I'm not sure how
to move them in to OpenSCAD, and B) the whole thing becomes a bit
clunky (modify the curve in InkScape, Copy [or whatever], Paste into
OpenSCAD, F5, rinse, repeat).
Any suggestions about how to create a workflow that is less painful
and [hopefully] intuitive?
I realize that pieces of this have probably been discussed in the past
Jon
--
Sent from my desktop computer.
I do not receive emails while away from my desk,
nor do I receive texts on my main phone number
(which is a land line).
If you know that I am on the road, please text me.
If you know that I am home, please email me.
Hi Jon,
I did this a while back by stacking a bunch of linear_extrude() segments:
The $t stuff was to play with animations to discover fun variants.
SLABS = 30;
HEIGHT = 80;
TWIST = 90sin(2$t360+90);
FREQ=180 + 360$t;
START=200+4360$t;
SCALE=0.3;
IDX=2;
slab(HEIGHT/SLABS, 0, TWIST/SLABS, scale(0), scale(1/SLABS)) cross();
for (i = [0:SLABS-1]) {
translate([0,0,iHEIGHT/SLABS]) {
slab(HEIGHT/SLABS, iTWIST/SLABS, (i+1)*TWIST/SLABS,
scale(i/SLABS), scale((i+1)/SLABS)) slice();
}
}
module cross() {
minkowski() {
circle(r=3, $fn=16);
union() {
square([10,20], center=true);
square([20,10], center=true);
}
}
}
module slab(h, rot_from, rot_to, scale_from, scale_to) {
linear_extrude(height=h, twist=rot_to-rot_from, scale=scale_to/scale_from) {
rotate(-rot_from)
scale(scale_from)
children();
}
}
function scale(t) = 1+SCALE*(sin(t*FREQ + START)+1);
module slice() {
difference() {
cross();
offset(-1) cross();
}
}
Another way of doing it is stacking cross sections, and then hulling an
unioning them in sequence.
--
Sent from: http://forum.openscad.org/
$fn = 200;
I've never needed such a high setting (especially while developing!)
indeed some of my best pen pots relied on $fn being so small that the
triangulation was a feature of the design...
adding a twist to linear_extrude can make some great effects....
On 2018-02-16 10:03, Troberg wrote:
Another way of doing it is stacking cross sections, and then hulling an
unioning them in sequence.
This will only work if the cross sections are solid, without holes. For
the typical vase it will not be the case, unless you are ok with
creating 2 with slightly different X/Y scaling and subtract one from the
other.
Carsten Arnholm
I agree. My effort is towards allowing me to specify the cross sections
in a manner that is efficient and intuitive, rather than laborious and
obscure.
On 2/16/2018 4:03 AM, Troberg wrote:
Another way of doing it is stacking cross sections, and then hulling an
unioning them in sequence.
--
Sent from: http://forum.openscad.org/
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
--
Sent from my desktop computer.
I do not receive emails while away from my desk,
nor do I receive texts on my main phone number
(which is a land line).
If you know that I am on the road, please text me.
If you know that I am home, please email me.
You may consider using Bezier subdivision as expressed in [1]. That was in
principle to generate points in a cubic Bezier curve defined by 4 control
points but may be used in a more general setting. If you feed subdivb3()
with more than 4 control points, it will generate points of all cubic
Bezier arcs defined by
p[3j]... p[3(j+1)] for some integer j
To get smooth transition between arcs you will need some conditions on the
control points:
p[3j] is in the segment with extremes
p[3j-1] p[3*j+1] for all j>0
An easy way to satisfy this condition is to choose:
p[3j] = ( p[3j-1] + p[3*j+1] ) / 2
In subdivb3, n is the depth of recursion and should be a low integer.
[1] http://forum.openscad.org/OpenSCAD-programming-question-
recursion-functions-and-modules-tp23197p23217.html
Em 15 de fev de 2018 8:04 PM, "jon" jon@jonbondy.com escreveu:
I thought of creating the curves with Bezier curves inside OpenSCAD, but
most implementations are limited to 4 control points; and working in
OpenSCAD by typing in numbers could be both laborious and non-intuitive.
This will only work if the cross sections are solid, without holes. For
the typical vase it will not be the case, unless you are ok with
creating 2 with slightly different X/Y scaling and subtract one from the
other.
How I've done similar tasks:
Have all the cross sections and make a solid shape by hulling and
unioning.
Then, take each cross section (except the first, if you want a bottom), do
a negative offset on each, hull and union.
Make a difference between the first object and the second object.
--
Sent from: http://forum.openscad.org/