Hey! This thing is still a Work in Progress. Files, instructions, and other stuff might change!

Round to square connector

by kitwallace, published

Round to square connector by kitwallace Feb 14, 2013


This provides a connector between a square-ended tube and a round-ended tube. It is an application of the superellipse en.wikipedia.org/wiki/Superellipse. The script makes use of the fact that the superellipse family of curves encompassed both a square and a circle, so smooth morphing between the two can be achieved parametrically. The derivation of the script is discussed in my blog kitwallace.posterous.com/piet-hein-and-the-superegg

Recent Comments

view all

for a hollow duct, scale the above down a bit (only x and y) and then do the difference and you have a hollow duct. circle to square.



translate([0,0,30]) cube([20,20,1],center=true);


Could you give an example? I don't understand how it works...

More from Replacement Parts

view more

Liked By

view all

Give a Shout Out

If you print this Thing and display it in public proudly give attribution by printing and displaying this tag. Print Thing Tag


- Generation time is long for higher numbers of layers
- Not yet proved by printing


You must be logged in to post a comment.

fma on Feb 19, 2013 said:

This new version seems to works much better!
Ok, next step: square/rectangle-to-circle/ellipse connector! That would be great if we could choose the exact shape of input and output, but I don't know if the maths can allow that...

kitwallace on Feb 19, 2013 said:

Thanks - problem is that the square section becomes a lozenge rather than a rectangle when eccentricity ne 1 - however I could go rectangle -square - ellipse but not sure it will look nice with the additional transition - working on it..

kitwallace on Feb 15, 2013 said:

Well, this seemed like a good idea at the time, but thinking about it a bit more, a better way to achieve the same effect would be to use hull() between a square and a circle, both extruded a tad (TAD = 0.01;) Faster and more generic.

fma on Feb 20, 2013 said:

Could you give an example? I don't understand how it works...

kitwallace on Feb 17, 2013 said:

Well maybe this approach has merit after all , now the thickness issue has been improved.

fma on Feb 14, 2013 said:

Excellent! But I think that 'square_side' should be devided by 2...

kitwallace on Feb 14, 2013 said:

You are so right - actually it was a sin upsidedown which came to the same thing.