If it's an object you can key it's visibilty(check the stack), of course you need two halves, meaning 2 separate objects. To hide polygons I you could create a polygon cluster, for the polys to hide. First select the polygons, then right click them>create cluster(or cluster with center). Right click the cluster in the viewport>add visibilty. You can now decide if it's hidden in render, the viewport or both, which I recommend. Press 0 to fire up the fcurve editor there's a little plus now, if you you click on it you see the two vis channels ;)
The solution you've suggested it's not applicable in my case, cause this object has to be animated many many times, and every time it goes in the X position, a piece of it has to disappear.
you can see the result in the My new bot topic in Wip section; the "aperture" in the middle of the hand that let come out the blade is the object that has to been hide; you can notice that when it open doesn't come out trought the borders of the "hand"