<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="GENERATOR" content="GtkHTML/4.8.5">
</head>
<body>
Hello<br>
<br>
I found a segmentation fault when trying to export a merged STL into a BREP (or STEP). Perhaps this cannot be done by gmsh, but in any case the code must either give an error message or save an empty file.<br>
<br>
Consider the file demos/sphere-surf.stl provided in gmsh svn tree:<br>
<br>
<br>
<a href="mailto:gtheler@blinky">gtheler@blinky</a>:~/FreeCAD_files/gmsh$ cat sphere-surf.geo
<br>
Merge "sphere-surf.stl";<br>
Save "sphere-surf.brep";<br>
<a href="mailto:gtheler@blinky">gtheler@blinky</a>:~/FreeCAD_files/gmsh$ gdb --args gmsh sphere-surf.geo<br>
GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1<br>
Copyright (C) 2014 Free Software Foundation, Inc.<br>
License GPLv3+: GNU GPL version 3 or later <<a href="http://gnu.org/licenses/gpl.html">http://gnu.org/licenses/gpl.html</a>><br>
This is free software: you are free to change and redistribute it.<br>
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"<br>
and "show warranty" for details.<br>
This GDB was configured as "x86_64-linux-gnu".<br>
Type "show configuration" for configuration details.<br>
For bug reporting instructions, please see:<br>
<<a href="http://www.gnu.org/software/gdb/bugs/">http://www.gnu.org/software/gdb/bugs/</a>>.<br>
Find the GDB manual and other documentation resources online at:<br>
<<a href="http://www.gnu.org/software/gdb/documentation/">http://www.gnu.org/software/gdb/documentation/</a>>.<br>
For help, type "help".<br>
Type "apropos word" to search for commands related to "word"...<br>
Reading symbols from gmsh...done.<br>
(gdb) run<br>
Starting program: /home/gtheler/bin/gmsh sphere-surf.geo<br>
[Thread debugging using libthread_db enabled]<br>
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".<br>
[New Thread 0x7fffdf322700 (LWP 31202)]<br>
[New Thread 0x7fffdeb21700 (LWP 31203)]<br>
[New Thread 0x7fffde320700 (LWP 31204)]<br>
[New Thread 0x7fffddb1f700 (LWP 31205)]<br>
[Thread 0x7fffddb1f700 (LWP 31205) exited]<br>
[Thread 0x7fffdeb21700 (LWP 31203) exited]<br>
[Thread 0x7fffdf322700 (LWP 31202) exited]<br>
[Thread 0x7fffde320700 (LWP 31204) exited]<br>
<br>
Program received signal SIGSEGV, Segmentation fault.<br>
0x00007fffeb504d5d in TopTools_IndexedMapOfShape::Clear() () from /usr/lib/x86_64-linux-gnu/libTKBRep.so.8<br>
(gdb) where<br>
#0  0x00007fffeb504d5d in TopTools_IndexedMapOfShape::Clear() () from /usr/lib/x86_64-linux-gnu/libTKBRep.so.8<br>
#1  0x00007ffff6972e87 in OCC_Internals::buildShapeFromGModel (this=0x0, gm=0x7ab100)<br>
    at /home/gtheler/codigos/3ros/build/gmsh/Geo/GModelIO_OCC.cpp:40<br>
#2  0x00007ffff697a89a in GModel::writeOCCBREP (this=0x7ab100, fn="sphere-surf.brep")<br>
    at /home/gtheler/codigos/3ros/build/gmsh/Geo/GModelIO_OCC.cpp:1056<br>
#3  0x00007ffff673d005 in CreateOutputFile (fileName="sphere-surf.brep", format=35, status=false, redraw=false)<br>
    at /home/gtheler/codigos/3ros/build/gmsh/Common/CreateFile.cpp:377<br>
#4  0x00007ffff673c619 in CreateOutputFile (fileName="sphere-surf.brep", format=10, status=true, redraw=true)<br>
    at /home/gtheler/codigos/3ros/build/gmsh/Common/CreateFile.cpp:245<br>
#5  0x00007ffff6e78647 in gmsh_yyparse () at Gmsh.y:2675<br>
#6  0x00007ffff6735565 in ParseFile (fileName="sphere-surf.geo", close=true, warnIfMissing=false)<br>
    at /home/gtheler/codigos/3ros/build/gmsh/Common/OpenFile.cpp:210<br>
#7  0x00007ffff696e778 in GModel::readGEO (name="sphere-surf.geo")<br>
    at /home/gtheler/codigos/3ros/build/gmsh/Geo/GModelIO_GEO.cpp:43<br>
#8  0x00007ffff673728f in MergeFile (fileName="sphere-surf.geo", warnIfMissing=false, setWindowTitle=true, setBoundingBox=true)<br>
    at /home/gtheler/codigos/3ros/build/gmsh/Common/OpenFile.cpp:496<br>
#9  0x00007ffff67383b0 in OpenProject (fileName="sphere-surf.geo", setWindowTitle=true)<br>
    at /home/gtheler/codigos/3ros/build/gmsh/Common/OpenFile.cpp:691<br>
#10 0x00007ffff66b4a0e in GmshFLTK (argc=2, argv=0x7fffffffe008) at /home/gtheler/codigos/3ros/build/gmsh/Common/Gmsh.cpp:349<br>
#11 0x00000000004015bd in main (argc=2, argv=0x7fffffffe008) at /home/gtheler/codigos/3ros/build/gmsh/Fltk/Main.cpp:47<br>
(gdb)<br>
<br>
<br>
<br>
<table cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td>-- <br>
<b>Germán Theler :: </b><i>CTO Eng & IT</i><br>
<br>
<b>CITES</b> – Centro de Innovación Tecnológica Empresarial y Social S.A.<br>
Dirección General Sancor Seguros<br>
Grupo Sancor Seguros<br>
tel +54 3493 –428 500 – Int.:<i> 3374</i><br>
<a href="mailto:ccipolatti@cites-gss.com">gtheler@cites-gss.com</a><br>
<u><a href="http://www.cites-gss.com">www.cites-gss.com</a></u> - <a href="http://www.gruposancorseguros.com">
www.gruposancorseguros.com</a><br>
<br>
<br>
<br>
</td>
</tr>
</tbody>
</table>
<hr>
<font color="#336600" size="2">Imprima este mensaje <strong>sólo si es absolutamente necesario</strong>.<br>
Para imprimir, en lo posible utilice el papel de ambos lados.<br>
El Grupo Sancor Seguros se compromete con el cuidado del medioambiente.</font><br>
<br>
<br>
<p style="font-size:8pt; color:gray; font-family:'Arial','Calibri','Cambria','garamond','serif';">
************AVISO DE CONFIDENCIALIDAD************<br>
<br>
El Grupo Sancor Seguros comunica que:<br>
<br>
Este mensaje y todos los archivos adjuntos a el son para uso exclusivo del destinatario y pueden contener información confidencial o propietaria, cuya divulgación es sancionada por ley. Si usted recibió este mensaje erróneamente, por favor notifíquenos respondiendo
 al remitente, borre el mensaje original y destruya las copias (impresas o grabadas en cualquier medio magnético) que pueda haber realizado del mismo. Todas las opiniones contenidas en este mail son propias del autor del mensaje. La publicación, uso, copia
 o impresión total o parcial de este mensaje o documentos adjuntos queda prohibida.<br>
<br>
Disposición DNDP 10-2008. El titular de los datos personales tiene la facultad de ejercer el derecho de acceso a los mismos en forma gratuita a intervalos no inferiores a seis meses, salvo que acredite un interés legítimo al efecto conforme lo establecido en
 el artículo 14, inciso 3 de la Ley 25.326. La DIRECCIÓN NACIONAL DE PROTECCIÓN DE DATOS PERSONALES, Organo de Control de la Ley 25.326, tiene la atribución de atender las denuncias y reclamos que se interpongan con relación al incumplimiento de las normas
 sobre la protección de datos personales. </p>
</body>
</html>