>> Look at what Anders Wallin is doing with opencamlib >> http://www.anderswallin.net/ > > Thanks for the link. Look good: http://code.google.com/p/opencamlib/
Hi all, There are about three or four parts (objects) that make up a simulation. Some are sort of ready, some are not. (a) interpreter (read in g-code, call simulator with something close to emc2 canon-commands) (b) stock model. Now I am using a scalar distance field stored in an octree. Some of the better isosurface extraction algorithms store exact intersections as well as normal data in the octree also. (c) surface extraction. This algorithm/object looks at the octree and produces triangles for rendering. The simplest one is classic lorensen&cline marching-cubes, but there are newer ones that handle sharp edges better. (d) rendering interface. My latest experiment uses a Qt QGLWidget (a wrapper around OpenGL) and an OpenGL VBO to store triangles. The stock model calls deleteTriangle on triangles that are cut, the surface extraction algorithm calls addTriangle to add new triangles. I have not looked at (a) seriously at all. It would be great if someone familiar with the emc2 interp could help. For now (b) stores a scalar distance field, and the updates are done with the tool "static", i.e. positioned at some (x,y,z) position. This means that a G0/1/2/3 move should be sampled densely and the cutter subtracted for each sample position. A fancier/faster(?) version would calculate the cutter sweep volume for a G0/1/2/3 move and subtract the whole sweep. This is not trivial for 4/5-axis simultaneous G1/2/3 moves. I have a simple marching-cubes algorithm for (c). Extended marching cubes (Kobbelt) or dual contouring (Ju et al) would be better, but also more computationally expensive. Requires some rewriting of the octree and cutting-volume classes to store 'hermite'-data (exact intersections and normals). Kobbelt has a reference implementation online which should prove useful to at least look at. For rendering (d) I am using QGLWidget just because I got it to work quite painlessly. For emc2 any OpenGL/toolkit would do. I was driving things(c++ objects) from python previously, but now I think that is too slow for rendering and it all needs to be c++. As usual I have a lot of pdf papers about these things if anyone wants to read! :) I am a bit busy now in May but if there is interest, esp. wrt. emc2 interpreter and opengl/rendering on emc2-distro or even AXIS, then it would be great to get something going in June or so. Anders ------------------------------------------------------------------------------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users