Thomas, Is there a way to do this other way around? i.e. if I have mesh information how do I convert it to Solid. I think that's what Chris was asking too. I've tried to do it (here <https://gist.github.com/1351019>), but the solids I create do not behave correctly in subsequent boolean operations on them.
Any hint will be appreciated. Thanks. -- Jayesh On Tue, Nov 29, 2011 at 7:58 PM, Thomas Paviot <tpav...@gmail.com> wrote: > 2011/11/29 Chris Jones <chr...@specsoft-it.com> > >> Hi, >> >> I must say that I think the work being done by you guys is fantastic ! >> >> I have a requirement to generate a solid from a set of XYZ points which >> represent >> an open pit mining shell. >> >> I need to generate a solid of one wireframe/solid subtracted from the >> another >> wireframe/solid. >> >> From the difference I need to calculate the changed volume. >> >> I've been plating around with the mesh examples, but have not yet figured >> out how >> to turn the XYZ points into a wireframe/solid. >> >> Any help and/or assistance will be really appreciated. >> >> Thanks, >> Chris >> >> > Hi Chris, > > Thank you for your support. > > You can get vertex coords/normals/vertex indices/faces with the help of > the OCC.Msh.Mesh.py module. > > Here is an example that meshes a box, and prints the result. > > HTH > > Thomas > > ======= > from OCC.BRepPrimAPI import BRepPrimAPI_MakeBox > from OCC.MSH.Mesh import * > > box_shape = BRepPrimAPI_MakeBox(1,1,1).Shape() > > init_time = time.time() > a_mesh = QuickTriangleMesh() > a_mesh.set_shape(box_shape) > a_mesh.set_precision(0.3) > a_mesh.compute() > print 'Number of triangles: %i'%a_mesh.get_nb_faces() > print 'Number of vertices: %i'%a_mesh.get_nb_nodes() > #a_mesh.build_lists_shared_vertices() > print 'All done in %f seconds.'%(time.time()-init_time) > # > print "#################" > print a_mesh.get_vertices() > print "##############" > print a_mesh.get_normals() > print "################" > print a_mesh.get_faces() > > > _______________________________________________ > Pythonocc-users mailing list > Pythonocc-users@gna.org > https://mail.gna.org/listinfo/pythonocc-users > >
_______________________________________________ Pythonocc-users mailing list Pythonocc-users@gna.org https://mail.gna.org/listinfo/pythonocc-users