Rectangular cylinder controlled by Arduino

I'm doing an Arduino hardware project, and would really appreciate some feedback from this forum.
Central to the project is a rectangular cylinder which will be moved by a solenoid controlled by an Arduino.
I have attached a sketch of the rectangular cylinder below. The piston in the cylinder will move up and down
as shown on the sketch.

Figure 1 shows the rectangular cylindrical chamber.
Figure 2 shows the piston which will move up and down inside the cylinder.
Figure 3 shows the cylinder from the side.

The cylinder must be quite strong and light, and work in temperatures from -20C to 30C.

I'm wondering if it is possible to buy such a cylinder somewhere? If not, what is the best way to get someone to make a prototype of such a piston?

Thanks for any help you may be able to provide!

Round the corners - the o-ring won't like to seal into a sharp corner and it makes it easier to machine the pocket.

Round the corners - the o-ring won't like to seal into a sharp corner and it makes it easier to machine the pocket.

You are right, the corners should be made round. I'll improve that in my next iteration. Thanks!

But how can I get such a cylinder made? I'm guessing it would require some very good metalworking and blacksmith skills. Does anything which resembles this exist anywhere in the world?

To me it looks like a cutting edge on the piston which is why you want the rectangular shape so the blade does not rotate.

They do make "non rotating air cylinders". Some are small (pancake) if space is restricted.

There are sites that will prototype but they will need a design. Don't know what the minimum charge is but they will quote it.

Visit some local machine shops and run it by them. They might even know someone that needs a little work. No harm in trying.

Don't know what neck of the woods you are from but giving your location might help.

What is the end purpose? - Scotty

Cylinder? I thought they were round!

Firstly such an object might be prototyped in metal by a CNC machine. But do you need metal? A prototype in plastic or wood is much easier to make and adapt and cheaper too - depends what "quite strong" means - what sorts of forces are involved? For high forces a threaded shaft would allow a motor to drive the piston perhaps?

Thanks for the useful feedback. I'll try to make the prototype myself using wood, and if that works okay I'll get someone to make a prototype using an CNC machine. I'll post some more updates later if you are interested.

Square piston air engine.