Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

Exporting mesh using a sript

More
6 years 6 months ago #193 by Nils
Hello together,

I would like to export a mesh, generated in netgen, using a script command. Basically I would like to circumvent clicking on "File"->"Export Mesh" .
Is there any command I can add to my Python script?

Tank you and best regards,
Nils
More
6 years 6 months ago #194 by christopher
The netgen mesh has a method "Export" which takes a filename and a format.

Best
Christopher
The following user(s) said Thank You: Nils
More
6 years 6 months ago #195 by Nils
Replied by Nils on topic Exporting mesh using a sript
Thank you for your fast reply,
but unfortunately it does not solve my problem. The mesh I am using is a ngsolve mesh and therein I cannot find a method "Export" or something related. Is it possible to simply convert the ngsolve mesh to a netgen type mesh or to add the export method to ngsolve?
More
6 years 6 months ago #196 by schruste
Hi Nils,

The NGsolve mesh has a member ngmesh which gives you access to the netgen mesh.

Try mesh.ngmesh.Export...

Best,
Christoph
The following user(s) said Thank You: Nils
More
6 years 6 months ago #197 by Nils
Replied by Nils on topic Exporting mesh using a sript
Now it works as looked-for.
Thanks for your help Christoph and Christopher
Time to create page: 0.146 seconds