I'm working on a project at the moment that requires bending a
cylinder to follow two different curves  a sin wave that wraps around the surface of another cylinder. The only way I've been able to implement such a thing is by tessellating many thin sections of a cylinder, and the code is ugly. It'd be a nice feature to have, but I don't have any idea what the interface should look like  considering that arbitrary curves would be nice to be able to represent. Perhaps we can pass a mathematical function, and bounds within that function should be evaluated to describe the curve? tim 
I was trying to do something similar a while ago, but never found a way. What I was trying required an arbitrary path and varying diameter. What I suggested was a way to extrude from one 2D polygon, morphing into another. With this, it should be fairly simple to set up a series of polygons to follow a sine wave to achieve what you are suggesting. Unfortunately, I think in both cases the best way is currently to generate the geometry with an external script.
On Friday, February 11, 2011 at 3:57 PM, Tim Schmidt wrote:

A morphing extrusion between 2 2D shapes would be a fantastic
addition! I wanted to do this just an hour ago  take a square and morph it into a circle in order to make an adaptor that would let me smoothly connect a tubular pipe to a boxsection tube! (Did you come up with even an external way to do this?) Cheers, Len. On Sat, Feb 12, 2011 at 1:05 PM, Whosawhatsis <[hidden email]> wrote: > I was trying to do something similar a while ago, but never found a way. > What I was trying required an arbitrary path and varying diameter. What I > suggested was a way to extrude from one 2D polygon, morphing into another. > With this, it should be fairly simple to set up a series of polygons to > follow a sine wave to achieve what you are suggesting. Unfortunately, I > think in both cases the best way is currently to generate the geometry with > an external script. > > On Friday, February 11, 2011 at 3:57 PM, Tim Schmidt wrote: > > I'm working on a project at the moment that requires bending a > cylinder to follow two different curves  a sin wave that wraps around > the surface of another cylinder. The only way I've been able to > implement such a thing is by tessellating many thin sections of a > cylinder, and the code is ugly. > > It'd be a nice feature to have, but I don't have any idea what the > interface should look like  considering that arbitrary curves would > be nice to be able to represent. Perhaps we can pass a mathematical > function, and bounds within that function should be evaluated to > describe the curve? > > tim > _______________________________________________ > OpenSCAD mailing list > [hidden email] > http://rocklinux.net/mailman/listinfo/openscad > > > _______________________________________________ > OpenSCAD mailing list > [hidden email] > http://rocklinux.net/mailman/listinfo/openscad > > 
It should be fairly straightforward to work out the math for that, then you could generate a call to the polyhedron module with the proper points. If you could use loops to define the points in a polyhedron, you would be able to implement it entirely within OpenSCAD.
On Friday, February 11, 2011 at 4:20 PM, Len Trigg wrote:

Yes, generating opensacd from eg. python is a possible approach. There
is some code in MCAD to allow that, but I haven't used that. been meaning to expand that into something greater. Elmo On 02/12/2011 02:28 AM, Whosawhatsis wrote: > It should be fairly straightforward to work out the math for that, then > you could generate a call to the polyhedron module with the proper > points. If you could use loops to define the points in a polyhedron, you > would be able to implement it entirely within OpenSCAD. > > On Friday, February 11, 2011 at 4:20 PM, Len Trigg wrote: > >> A morphing extrusion between 2 2D shapes would be a fantastic >> addition! I wanted to do this just an hour ago  take a square and >> morph it into a circle in order to make an adaptor that would let me >> smoothly connect a tubular pipe to a boxsection tube! (Did you come >> up with even an external way to do this?) >> >> Cheers, >> Len. >> >> On Sat, Feb 12, 2011 at 1:05 PM, Whosawhatsis <[hidden email] >> <mailto:[hidden email]>> wrote: >>> I was trying to do something similar a while ago, but never found a way. >>> What I was trying required an arbitrary path and varying diameter. What I >>> suggested was a way to extrude from one 2D polygon, morphing into >>> another. >>> With this, it should be fairly simple to set up a series of polygons to >>> follow a sine wave to achieve what you are suggesting. Unfortunately, I >>> think in both cases the best way is currently to generate the >>> geometry with >>> an external script. >>> >>> On Friday, February 11, 2011 at 3:57 PM, Tim Schmidt wrote: >>> >>> I'm working on a project at the moment that requires bending a >>> cylinder to follow two different curves  a sin wave that wraps around >>> the surface of another cylinder. The only way I've been able to >>> implement such a thing is by tessellating many thin sections of a >>> cylinder, and the code is ugly. >>> >>> It'd be a nice feature to have, but I don't have any idea what the >>> interface should look like  considering that arbitrary curves would >>> be nice to be able to represent. Perhaps we can pass a mathematical >>> function, and bounds within that function should be evaluated to >>> describe the curve? >>> >>> tim >>> _______________________________________________ >>> OpenSCAD mailing list >>> [hidden email] <mailto:[hidden email]> >>> http://rocklinux.net/mailman/listinfo/openscad >>> >>> >>> _______________________________________________ >>> OpenSCAD mailing list >>> [hidden email] <mailto:[hidden email]> >>> http://rocklinux.net/mailman/listinfo/openscad >> _______________________________________________ >> OpenSCAD mailing list >> [hidden email] <mailto:[hidden email]> >> http://rocklinux.net/mailman/listinfo/openscad > > > > _______________________________________________ > OpenSCAD mailing list > [hidden email] > http://rocklinux.net/mailman/listinfo/openscad 
Free forum by Nabble  Edit this page 