2011/1/27 Sébastien Ramage <sebastien.ram...@gmail.com> > > > Le 27/01/2011 12:48, Thomas Paviot a écrit : > > >> >> Freecad does not use the default OCC OpenGL pipe. TopoDS_Shapes are >> tesselated from OCC, and then passed to another OpenGL renderer with a >> better OpenGL implementation (Coin3d). (I'm quite sure HeeksCAD does use the >> same way to render shapes). Well, this is what I understood from the source >> code, I maybe wrong. >> >> The issue you report is OCC/OpenGL specific, and I'm afraid ther's no >> simple solution (there might be a patch for Salome, but I'm not sure about >> that). >> >> > Thank you Thomas, you're right. > I started to look at HeeksCAD source and if I correctly understood the > code, it use a TopExp_Explorer for get faces and BRepMesh to convert each > face into mesh and finally simply use OpenGl command to draw each mesh face. > > It's simple and maybe less efficient than the OCC OpenGl pipe, but I'll try > to create viewer like this because it can solve my Intel cards problem ! > > Sébastien
Sébastien, There were many changes to the OCC.MSH.Mesh module from 0.4 to 0.5 in that purpose. Actually, I noticed that the 0.4 algorithm was buggy while trying your occray program : some triangles and normals were wrong, and the output picture was sometimes ugly. I worked hard to fix these issues, and your occray should benefit from using the QuickTriangleMesh class (there's no need for you to compute vertices, faces indices or normals, everything is done out of the box. For instance: my_mesh = QuickTriangleMesh(() my_mesh.set_shape(any_topods_shape) my_mesh.compute() vertices = my_mesh.get_vertices() normals = my_mesh.get_normals() faces_indices = my_mesh.get_faces() Thomas
_______________________________________________ Pythonocc-users mailing list Pythonocc-users@gna.org https://mail.gna.org/listinfo/pythonocc-users