There is a line between that which is POSSIBLE and that which is FEASIBLE. I imagine that it might be possible to create a machine that will produce a kilt for you. Why not? Japan now has a robot that will make ramen for you... Which is pretty impressive. I would've never imagined that a machine could make ramen like this... http://www.youtube.com/watch?v=S0GKIQdpscg

So yes. I think such a machine could certainly be made. However, is it feasible? When you consider the cost of R&D, engineering, parts & labour, and everything else, you could be facing something rather scary. The real question then is WHY? As a proof of concept? To say that it CAN be done? If so, then good luck -- I would be curious to see what such a project would look like. If it would be for commercial venture, I'd say that it's not feasible. There's a reason why even today, mass-produced garments are often produced by hand and not by machine... Here's what a blue jeans making operation looks like. Notice that there is some automation, but humans still have many, many roles to play in the process.

http://www.youtube.com/watch?v=-MTyEwUJPBA