On 24/03/11 23:12, Perrin Meyer wrote:
Hi.
I svn co https://geuz.org/svn/gmsh
but I don't really see any python files, or even what is wrapping stuff
for python.
Where would I find an example of using python to create a mesh?
Hi Perrin - If you have swig >= 2.0 installed on your system the
wrappers should be automatically built (make _gmshpy). Attached is a
small example.
Ch.
Thanks,
Perrin
On Mar 16, 2011, at 2:23 PM, Christophe Geuzaine wrote:
On 16/03/11 19:44, Perrin Meyer wrote:
Hi.
I would like to use Lua to create gmsh meshes. So far I have two issues.
(1) - I can't seem to find any documentation?
(2) when I start gmsh -lua and get a prompt >, after every syntax error
I make, lua exits. Is this a bug with my lua installation? I'm running
gmsh 2.5.0
Hello Perrin,
After a long internal debate we are actually transitioning from the
integrated lua bindings to more traditional (swig-generated) python
bindings.
We are actively working on this; the latest SVN contains fairly
functional python binding generation. Lots of new things are in the
pipeline in this regards, e.g. python-binded gui-driven data generation.
Christophe
Thank you for your help, and also a great open source tool.
Sincerely,
Perrin Meyer
--------------------
Perrin Meyer
Senior DSP Engineer
[email protected] <mailto:[email protected]>
phone: 510-486-1166
NOTICE: This email may contain confidential information. Please see
http://www.meyersound.com/confidential/ for our complete policy.
_______________________________________________
gmsh mailing list
[email protected]
http://www.geuz.org/mailman/listinfo/gmsh
--
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science
http://www.montefiore.ulg.ac.be/~geuzaine
--------------------------
Perrin Meyer
Senior DSP Engineer
[email protected]
phone: 510-486-1166
NOTICE: This email may contain confidential information. Please see
http://www.meyersound.com/confidential/ for our complete policy.
--
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science
http://www.montefiore.ulg.ac.be/~geuzaine
#!/usr/bin/env python
from gmshpy import *
# from http://en.wikipedia.org/wiki/Constructive_solid_geometry
R = 1.4;
s = .7;
t = 1.25;
myModel = GModel();
myModel.addBlock([-R,-R,-R],[R,R,R]);
myTool = GModel();
myTool.addSphere(0,0,0,R*t);
myModel.computeBooleanIntersection(myTool);
myTool2 = GModel();
myTool2.addCylinder([-2*R,0,0],[2*R,0,0],R*s);
myTool3 = GModel();
myTool3.addCylinder([0,-2*R,0],[0,2*R,0],R*s);
myModel2 = GModel();
myModel2.addCylinder([0,0,-2*R],[0,0,2*R],R*s);
myModel2.computeBooleanUnion(myTool2);
myModel2.computeBooleanUnion(myTool3);
myModel.computeBooleanDifference(myModel2);
myModel.setAsCurrent();
myModel.mesh(3);
#FlGui.instance();
#FlGui.run();
_______________________________________________
gmsh mailing list
[email protected]
http://www.geuz.org/mailman/listinfo/gmsh