I would try some reverse engineering.
- Draw a obstruct by hand
- then by automation
- read out the points array
- delete the obstruct
- put the obstruct again
If this works, there is no error in your PutObstruct its in creation of your points array.
Also clarify wather you use the correct polygone type (e.g. closed or not) for yout PutObstruct command.