Try something like this, to see where it is going. And be aware that the
cross section depends on the twist angle. I used a 90° section of a ring to
get an easy solution. Try to change this angle to control the "height" of
the cross section.
$fn= 100;
linear_extrude(height=51.84, center=true, convexity=10, twist=1866.24)
intersection()
{
difference()
{
circle(38);
circle(36);
}
square(38);
}
--
View this message in context: http://forum.openscad.org/linear-extrude-thickness-tp21345p21346.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Thank you!
I am simply wondering how it works?
Vasilis
--
View this message in context: http://forum.openscad.org/linear-extrude-thickness-tp21345p21352.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
linear_extrude() Z-extrudes a 2D object (living in the XY plane) into a 3D
object by sweeping the shape along Z for the specified height - internally,
a shifted copy of the bottom shape is made and used as top face and "walls"
are added around the outlines to "connect" the two faces into a water-tight
3D-object.
When you specify a twist parameter, the linear_extrude() operator will also
Z-rotate the 2D shape during the Z-extrusion. To get some approximation of a
"round" object, the extrusion path is cut into little slices and the top
face of each new slice that is added is Z-translated and Z-rotated a bit
against the bottom face (when constructing the 3D object, obviously only the
walls are added plus the very first bottom face and the very last top face).
Say you want 100 slices ($fn=100), a height of 10 and a twist angle of 1000.
Then obviously, each slice will have its bottom face Z-translated by 0.1 and
Z-rotated by 10. It is easy to visualize the behaviour of linear_extrude()
with a stack of cards or beer mats.
Now think about the first slice. It is exacly the shape that your final
object "pierces" through the XY-plane.
So if you want to construct some coiled design with linear_extrude(), you
have to find this shape and use it as operand. In the case of a coil with a
square as "cross section" this is easy, because it is the section of a ring
Note, that all this is only necessary because linear_extrude expects a 2D
object living on the XY plane to do, what it does.
OpenSCAD has no built-in operator that does what want. However, there are of
course solutions. The more basic approach builds upon the build-in hull()
operator. But it renders quite slow, because OpenSCAD is very slow when it
has to calculate the union of hundreds of little objects. Other, more
advanced solutions build upon libraries implementing sweep() or skin()
modules, and thus operate exactly as you expected linear_extrude() to do.
They also render very fast, because they compute all the data necessary to
describe the final 3D object and finally call polyhedron(), the most
powerful and general OpenSCAD built-in module.
--
View this message in context: http://forum.openscad.org/linear-extrude-thickness-tp21345p21354.html
Sent from the OpenSCAD mailing list archive at Nabble.com.