This post has NOT been accepted by the mailing list yet.
I try to use openscad for all my 'opensource' 3d parts. It's been a while since i've been out of touch, and now i am trying to create something that must change from a square to a circle.
I found some examples using skin() on https://github.com/openscad/listcomprehensiondemos that might do the trick. But trying to run them show that my version does not understand a method used there "to_3d()". And searching for "openscad to_3d" is extremely useless. I only get results for things like "turn this 2d drawing to 3d" type of stuff. I can't even tell if that is a custom (utils?) method or native. Anyway, i am trying to achieve something similar to https://grabcad.com/tutorials/extrudingfromsquaretoround but with a controllable thickness skin. What's the best way to go about it? Any suggestions? 
Administrator

Welcome back to the forum. Your post is still flagged as "This post has NOT been accepted by the mailing list yet", so nobody gets it unless they look.
You need to subscribe to the mailing list, and CLICK THE LINK in the registration email (check your spam folder). I've quoted your post for others to see.
Admin  email* me if you need anything,
or if I've done something stupid... * click on my MichaelAtOz label, there is a link to email me. Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above. The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out! 
This post has NOT been accepted by the mailing list yet.
thanks. I will try to revalidate my email.
meanwhile, i think i solved whatever dumb thing i was doing with hull: wallthickness=2; // thinest wall printable largestpipe = 50; // diameter of the largest pipe mounth fansize = 40; // 40mm fan module conector(fansize,pipe,tall){ difference(){ color("teal") hull(){ color("red") translate([0,0,0] ) cylinder(1,pipe/2); color("green") translate([0,0,tall] ) cube([fansize,fansize,1],true); } color("blue") hull(){ color("red") translate([0,0,0] ) cylinder(1,pipe/2wallthickness); color("green") translate([0,0,tall] ) cube([fansizewallthickness,fansizewallthickness,1],true); } } } conector(fansize,largestpipe, 30 ); 
In reply to this post by gcb
The simplest way is hull:
(if making a 3d shape with hull, you need to start with 3d shapes, not 2D, hence linear_extrude) hull() { linear_extrude (0.1) square (100, center=true); translate ([0, 0, 60]) linear_extrude (0.1) circle (50); } This approach works for creating a manifold between any shapes, but it is incredibly ugly for shapes when you might want to see the "shift" from one to the other. For instance, the code below does not make a twisted transition from shape to shape: hull() { linear_extrude (0.1) square (100, center=true); translate ([0, 0, 60]) rotate ([0, 0, 90]) linear_extrude (0.1) square (100, center=true); }  http://www.thingiverse.com/thing:161646 This uses the concept of "tweening" between polygons. For instance, to go between a square and a circle, start with a 360sided polygon that looks like a circle, and a 360sided polygon arranged so that most of the segments are colinear so that it looks like a square. The shift from square to circle is then a weighted average of these two polygons arrays; at A(100)B(0) you get A, at A(25)B(75) you get a shape that is 25% A, 75%B, etc. The advantage of this approach is that you can do any shape, as long as you define the polygons beforehand (e.g. triangle to heart, etc.) This builds lots of slices from A>B. http://www.thingiverse.com/thing:50363 This one uses the concept of superellipses  you can represent a square and a circle with the same mathematical function. By adjust the parameter, you range from a pure square to a pure circle. The downside is this approach only works for squares and circles. 
@gcb, The function to_3D either in skin.scad or sweep.scad is an embedding of a 2D polygon in 3D space. I could not find where it has been defined but it is something like:function to_3D(p) = [for(pi=p) [pi[0],pi[1],0]]; @shadowwynd,_______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org 
Free forum by Nabble  Edit this page 