Hi Max,
what I am trying to accomplish is the ability to call something like
`model.save('foo.geo')`
in the attached script. I am only beginning to explore the API and this
would allow me to
create part of the model in python, save it and optionally continue in gmsh
language. I guess
this would be useful if not all of the API is exposed.
Thanks, Miro
On Thu, Sep 26, 2019 at 4:23 PM Max Orok <[email protected]> wrote:
> Hi Miro,
>
> I don't think so. Can you tell us more about what you are trying to
> accomplish?
> The tutorials have many examples of equivalent functionality between geo
> and python (c++, julia, etc.)
>
> Geo examples: https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial
> Equivalent API examples:
> https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api
>
> Sincerely,
> Max
>
> On Wed, Sep 25, 2019 at 4:20 PM Miroslav Kuchta <[email protected]>
> wrote:
>
>> Hi,
>>
>> is there a way to write as geo file the model constructed using python
>> API?
>>
>> Thanks, Miro
>> _______________________________________________
>> gmsh mailing list
>> [email protected]
>> http://onelab.info/mailman/listinfo/gmsh
>>
>
>
> --
> Max Orok
> Contractor
> www.mevex.com
>
>
>
import gmsh
import sys
model = gmsh.model
factory = model.occ
gmsh.initialize(sys.argv)
gmsh.option.setNumber("General.Terminal", 1)
factory.addBox(0, 0, 0, 1, 1, 1)
factory.synchronize();
model.mesh.generate(3)
gmsh.write("boolean.msh")
_______________________________________________
gmsh mailing list
[email protected]
http://onelab.info/mailman/listinfo/gmsh