Array Modifier deforming mesh I am using an array modifier to create a long fence along a curve. I have modeled a small section of the fence so that I can use an array modifier to fill in the rest. I am using a curve as the path for the array modifier. The curve follows the path of the terrain. The fence is getting deformed as it is follow the curve. It is making the fence unrealistic.



The planks going from pole  should be straight like they are in the original model.

 

If I use a low poly fence that is made up of simple boxes only the deformation the planks behave like I expect them to.



This is the behaviour I expect from the high poly fence. I think the low poly fence works because there are no vertices to deform in the planks beside the endpoints. 
How can I prevent the planks from deforming with the curve?

I want it to distort the poles, so that it looks like the are follow the surface of the terrain. I do not want to planks to be bend, only stretched to connect to the poles as needed

blend file
The curve contains too many unnecessary points. Additional curvatures will bend the object where you don't want.

For better control in this case, I suggest to separate planks from poles, making them as two individual objects. Then use one simplified curve (or two curves) to control each of them.