De: "Frederic Dubois" <[email protected]> À: "Behzad Samadi" <[email protected]> Envoyé: Mardi 30 Avril 2019 06:40:09 Objet: Re: [Gmsh] Boolean operations Hi, Boolean is a feature provided by occ and it only work with objects created by occ (stl are "discrete" objects not occ objects). This is explained in the documentation in the part related to the API. Regards De: "Behzad Samadi" <[email protected]> À: "gmsh" <[email protected]> Envoyé: Lundi 29 Avril 2019 23:36:10 Objet: [Gmsh] Boolean operations BQ_BEGIN 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 BQ_END -- Frédéric Dubois, PhD, Eng. --- SRK Consulting, Oceanic Plaza, 22nd Floor, 1066 West Hastings Street Vancouver, BC, Canada V6E 3X2 Mobile: +12368650766 --- Directeur adjoint du LMGC, responsable du service ReMICS. Laboratoire de Mécanique et Génie Civil - CNRS/UM cc 048, 163 rue Auguste Broussonnet, 34090 Montpellier http://www.lmgc.univ-montp2.fr/~dubois Tel: 33/0 467144984 Mobile: 33/0 635490843 -- Frédéric Dubois, PhD, Eng. --- SRK Consulting, Oceanic Plaza, 22nd Floor, 1066 West Hastings Street Vancouver, BC, Canada V6E 3X2 Mobile: +12368650766 --- Directeur adjoint du LMGC, responsable du service ReMICS. Laboratoire de Mécanique et Génie Civil - CNRS/UM cc 048, 163 rue Auguste Broussonnet, 34090 Montpellier http://www.lmgc.univ-montp2.fr/~dubois Tel: 33/0 467144984 Mobile: 33/0 635490843
_______________________________________________ gmsh mailing list [email protected] http://onelab.info/mailman/listinfo/gmsh
