[Gmsh] Cut mesh

Christophe Geuzaine cgeuzaine at ulg.ac.be
Fri Nov 22 17:17:51 CET 2013


On 15 Nov 2013, at 10:11, Hunold Alexander TU Ilmenau <Alexander.Hunold at tu-ilmenau.de> wrote:

> Dear Gmsh-experts,
>  
> Thanks for supplying this fabulous tools and all your effort in support.
>  
> I would like to cut a tetrahedral mesh stored in *.mesh format and use it as dataset for a rapid prototyping printer.
> The cutting plane is: 0*x + 2.78049438e+03*y + -2.47538882704395e+04*z+ -2.145903764510082e+06 = 0
> Is there a way of performing a cut on a pure mesh in Gmsh?
>  
> In the email archive, I found the description of using the “Cut Plane” plugin but I received an error: Error: View[-1] does not exist.

You could use Plugin(NewView) to create a view based on the mesh, then apply Plugin(CutPlane). You can then save the resulting view as an STL triangulation. (You could reload the triangulation and save it as a .mesh file afterwards.)


> I guess it’s because I don’t have any post processing data loaded, because I don’t have any post processing data.
>  
> As an alternative I exported the mesh in the vtk-format and performed the truncation in Matlab. However I have problems to load the new vtk file back into Gmsh.
> Please find the files here: https://www.dropbox.com/sh/8vq7nddi35ciw6u/4P_k-dEgna
>  
> Can you provide any suggestion to fix the vtk-file or to perfom the cut in Gmsh directly?
>  
> I appreciate any hint. Thank you very much in advance.
>  
> Best regards,
> Alexander Hunold
> _______________________________________
> Alexander Hunold, M.Sc.
> Ilmenau University of Technology
>  
> Faculty of Computer Science and Automation
> Institute of Biomedical Engineering and Informatics
> POB 100565
> 98684 Ilmenau
>  
> Office: Bionic-Building, Room 20
> Phone: +49 3677 69-1348
> Fax: +49 3677 69-1311
> Email: alexander.hunold at tu-ilmenau.de
> Web: www.tu-ilmenau.de/bmti
>  
>  
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh

-- 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine