PDA

View Full Version : Layers on z axis

2Gatunek
05-18-2011, 01:00 AM
HI
I`m writing software for 3D printer, for something like this.
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 , i`m 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

V-man
05-22-2011, 07:13 AM
It is pretty simple. It just involves linear interpolation between 2 vertices in a triangle and you get a new point in between them. No need to think of contours. No need for GL either.
You would do that for all triangles and you get yourself a contour made of all those points on the z axis. Connecting them gives you a contour.

2Gatunek
05-25-2011, 03:27 PM
I think i understand what u want to say but, how to calculate this (linear interpolation) . for example if model is a ball im cutting it by glClipPlane(GL_CLIP_PLANE0, @Plane); , but this is not my layer only a (for example half of a ball) but i need layer im wondering is my method ok for for this. so v-man can u write something more about calulating this linear interpolation.
from witch triangles i schold calculate this , becouse i think i cant calculate vertices on other sites of model).

2Gatunek
05-26-2011, 08:16 AM
I was thinking about it and now i know that my last post dos not have any sens. so i will ask is there any function in opengl to caltulate point between 2 points on z axis ? or i have to caltulate it by my own?
2. if i will have my points , how i will be know how to connect them (witch point witch with point).