[Gmsh] [Gmsh API] OpenCASCADE and mesh files usage

Valentin Boltach val.boltach at gmail.com
Mon Apr 22 18:10:34 CEST 2019


Good day to all.
There was a problem: I want to prepare a model for further analysis, in
particular, cut the cylinder from stl model (as a part of Constructive
Solid Geometry).
Judging by the existing examples, the order is as follows:

gmsh.initialize()
gmsh.open(filepath)
model = gmsh.model
factory = model.occ
model.add("boolean")
R = 1.4
Rs = R * .7
factory.addCylinder(-2 * R, 0, 0, 4 * R, 0, 0, Rs, 2)


# how should it works?
# factory.cut([(3, 1)], [(3, 2)], 3)


factory.synchronize()
model.mesh.generate(3)


In GUI this action did not work. Is it even possible with this tool?
As I see here (http://geuz.org/pipermail/gmsh/2019/012737.html)
<http://geuz.org/pipermail/gmsh/2019/012737.html> it works but in
another order. Example from this link doesn't work for me.
I'm using gmsh 4.3.0

Thanks,
Valiantsin Boltach
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20190422/3e5c2052/attachment.html>


More information about the gmsh mailing list