<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">I am a new user of Gmsh. I wanted to use the Julia API to compute the Boolean difference between two models given in two STL files.</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">I wasn't able to figure out the commands from the documentation and the api demos. I also tried to use getMass and getCenterOfMass commands but I don't know what the tag of my model is. This is my code. I had to comment out the line with getCenterOfMass. I was wondering if someone can help me.</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Thank you!</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;line-height:18px;white-space:pre"><div><span style="color:rgb(106,153,85)">#!/usr/bin/julia</span></div><br><div><span style="color:rgb(220,220,170)">include</span>(<span style="color:rgb(206,145,120)">"/Apps/gmsh-4.3.0-MacOSX-sdk/lib/gmsh.jl"</span>)</div><br><div><span style="color:rgb(197,134,192)">import</span> .gmsh</div><br><div><span style="color:rgb(106,153,85)"># nice shortcuts</span></div><div>model = gmsh.model</div><div>factory = model.geo</div><br><div><span style="color:rgb(106,153,85)"># initialize Gmsh</span></div><div>gmsh.<span style="color:rgb(220,220,170)">initialize</span>(ARGS)</div><br><div><span style="color:rgb(106,153,85)"># Print messages in terminal</span></div><div>gmsh.option.<span style="color:rgb(220,220,170)">setNumber</span>(<span style="color:rgb(206,145,120)">"General.Terminal"</span>, <span style="color:rgb(181,206,168)">1</span>)</div><br><div>model.<span style="color:rgb(220,220,170)">add</span>(<span style="color:rgb(206,145,120)">"top"</span>)</div><br><div>gmsh.<span style="color:rgb(220,220,170)">merge</span>(<span style="color:rgb(206,145,120)">"../models/top.stl"</span>)</div><br><div><span style="color:rgb(106,153,85)"># model.occ.getCenterOfMass(3, 1)</span></div><br><div><span style="color:rgb(106,153,85)"># export the mesh ; use explore.py to read and examine the mesh</span></div><div>gmsh.<span style="color:rgb(220,220,170)">write</span>(<span style="color:rgb(206,145,120)">"test01.stl"</span>)</div><br><div>gmsh.<span style="color:rgb(220,220,170)">finalize</span>()</div></div></div></div>