Hmm, it seems square ones are a lot more complicated because of the parts where they touch.

First attempt:

for (i=[1:4]){


rotate (a = [0, 0, i*90]){
translate ([0,15,0])
rotate(a = [90, 0, 0]) {
linear_extrude(height = 35, convexity = 10, $fn=100)
translate([10, 0, 0])
polygon(points=[[0,0],[3,3],[0,10],[7,7],[8,8],[10,0]], paths=[[0,1,2,3,4,5]]);
}}}

It needs more polygons defining the ends of the shape I think