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.

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.

Thank you!

#!/usr/bin/julia

include("/Apps/gmsh-4.3.0-MacOSX-sdk/lib/gmsh.jl")

import .gmsh

# nice shortcuts
model = gmsh.model
factory = model.geo

# initialize Gmsh
gmsh.initialize(ARGS)

# Print messages in terminal
gmsh.option.setNumber("General.Terminal", 1)

model.add("top")

gmsh.merge("../models/top.stl")

# model.occ.getCenterOfMass(3, 1)

# export the mesh ; use explore.py to read and examine the mesh
gmsh.write("test01.stl")

gmsh.finalize()
_______________________________________________
gmsh mailing list
[email protected]
http://onelab.info/mailman/listinfo/gmsh

Reply via email to