Cutting 3D model on layers

HI
Im writing software for 3D printer, for something like this. [http://www.youtube.com/watch?v=5ddmB9ScSbQ&feature=related](http://www.youtube.com/watch?v=5ddmB9ScSbQ&feature=related) My software open STL files and show 3D model, and this is all i have for now. Problem is that software must cut this model on rasters , layers, and calculate vector for all conturs and this is what i cant do , im wondering witch procedures should i use for this , meybe some of you can sugest some methods for this, im begginer in opengl so it is little hard for me to find good method for me.
Regards

No one know ?