Don't see exactly what you want to do. But let me remark some points.
It is always better to start with some small N, like N=10. This saves time.
gen_dat() uses a 2D shape function like circle_() or airfoil_data() to
generate a series of parametrized polygons and a trajectory function to
place those shapes in 3D. sweep() knits this series together into a 3D
shape. It should be clear that this does has some constraints on the data.
The data must be 'nice' enough to describe a non-self-intersecting 3D shape.
This means:
-
each polygon must behave well to be 'knitable'
- no self intersection !!
- convex shape at best (like circle) or at minimum some half-symmetry
(like airfoil), because I used a lazy triangulation for the two cap faces (I
will update this one day - promised). You can try skin() instead of sweep()
if that is not the case.
- a common number of vertices. You can try skin() instead of sweep() if
that is not the case.
- the right sense: CCW
-
The trajectory function must be 'nice'.
- 2D shapes are not allowed to intersect in 3D when being swept. If this is
unavoidable, split the data and union two (or more) sweeps.
- My code does not test those things (OpenSCAD currently has no error
scheme for reporting problems), but it should be clear from general sweep()
semantics.
Using thrown together view (f12) will reveal problems. Magenta shaped
triangles have wrong sense.
http://forum.openscad.org/file/n17265/sw.png
--
View this message in context: http://forum.openscad.org/Splines-for-drawing-fan-blades-tp16784p17265.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Don't see exactly what you want to do. But let me remark some points.
It is always better to start with some small N, like N=10. This saves time.
gen_dat() uses a 2D shape function like circle_() or airfoil_data() to
generate a series of parametrized polygons and a trajectory function to
place those shapes in 3D. sweep() knits this series together into a 3D
shape. It should be clear that this does has some constraints on the data.
The data must be 'nice' enough to describe a non-self-intersecting 3D shape.
This means:
1. each polygon must behave well to be 'knitable'
- no self intersection !!
- convex shape at best (like circle) or at minimum some half-symmetry
(like airfoil), because I used a lazy triangulation for the two cap faces (I
will update this one day - promised). You can try skin() instead of sweep()
if that is not the case.
- a common number of vertices. You can try skin() instead of sweep() if
that is not the case.
- the right sense: CCW
2. The trajectory function must be 'nice'.
- 2D shapes are not allowed to intersect in 3D when being swept. If this is
unavoidable, split the data and union two (or more) sweeps.
3. My code does not test those things (OpenSCAD currently has no error
scheme for reporting problems), but it should be clear from general sweep()
semantics.
Using thrown together view (f12) will reveal problems. Magenta shaped
triangles have wrong sense.
<http://forum.openscad.org/file/n17265/sw.png>
--
View this message in context: http://forum.openscad.org/Splines-for-drawing-fan-blades-tp16784p17265.html
Sent from the OpenSCAD mailing list archive at Nabble.com.