<div dir="ltr"><div>It looks like this did exactly what I needed, thank you.<br><br></div>Bram<br><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Mar 18, 2017 at 4:46 AM, Christophe Geuzaine <span dir="ltr"><<a href="mailto:cgeuzaine@ulg.ac.be" target="_blank">cgeuzaine@ulg.ac.be</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
> On 17 Mar 2017, at 23:24, Bram Sterling <<a href="mailto:bram.sterling@ossiumhealth.com">bram.sterling@ossiumhealth.<wbr>com</a>> wrote:<br>
><br>
> I'm trying to mesh a 3D 2-material construct created in another program (FreeCAD) and brought into Gmsh by way of a BREP file. After some troubleshooting downstream, I determined that Gmsh is turning the two volumes into two disjoint meshes despite their extensive shared surface.<br>
><br>
> Poking around, I suspect the reason for this is that the two volumes share no elementary geometry. Instead, the shared lines and surfaces are duplicated.<br>
><br>
> If the original geometry had been defined in a Geo script this would seem straightforward to fix manually, but it seems a bit more complicated here, especially as this is bound to come up again with more complex geometry later. Is deleting the redundant geometry and rebuilding other effected parts manually the best option, or is there a better way?<br>
><br>
<br>
</span>With a recent nightly build, create a .geo script that does the following (assuming the brep contains 2 volumes):<br>
<br>
SetFactory("OpenCASCADE");<br>
a() = ShapeFromFile("file.brep");<br>
BooleanFragments{ Volume{a(0)}; Delete; }{ Volume{a(1)}; Delete; }<br>
<br>
Note that you can now directly create your CAD inside Gmsh: see demos/boolean/*.geo for examples.<br>
<br>
Christophe<br>
<br>
<br>
><br>
> Thank you,<br>
> Bram Sterling<br>
> ______________________________<wbr>_________________<br>
> gmsh mailing list<br>
> <a href="mailto:gmsh@onelab.info">gmsh@onelab.info</a><br>
> <a href="http://onelab.info/mailman/listinfo/gmsh" rel="noreferrer" target="_blank">http://onelab.info/mailman/<wbr>listinfo/gmsh</a><br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Prof. Christophe Geuzaine<br>
University of Liege, Electrical Engineering and Computer Science<br>
<a href="http://www.montefiore.ulg.ac.be/~geuzaine" rel="noreferrer" target="_blank">http://www.montefiore.ulg.ac.<wbr>be/~geuzaine</a><br>
<br>
Free software: <a href="http://gmsh.info" rel="noreferrer" target="_blank">http://gmsh.info</a> | <a href="http://getdp.info" rel="noreferrer" target="_blank">http://getdp.info</a> | <a href="http://onelab.info" rel="noreferrer" target="_blank">http://onelab.info</a><br>
<br>
</font></span></blockquote></div><br></div></div></div></div>