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.

Error while exporting without GUI

More
3 years 4 months ago #3401 by Amilibia i Sison
Hi,
I'm just getting started on Netgen on Mac. I wanted to upload a surface mesh, generate a volumetric mesh with certain parameters and export it later. I was able to import the mesh and generate the volumetric mesh. But after generating the mesh, the GUI opens and the following error appears:

AttributeError: 'builtin_function_or_method' object has no attribute ‘Export'

I was wondering if you guys could help me export the mesh. Here's my code attached:

FREECADPATH = '/Applications/Netgen'
import sys
sys.path.append(FREECADPATH)

import netgen.meshing as meshing
from netgen.meshing import MeshingParameters
from netgen.csg import *
from netgen.NgOCC import *
from ngsolve import *

geo = OCCGeometry('/Users/emilio/Desktop/tfgs/skull_solid_step.step')
mesh = geo.GenerateMesh
mesh.Export("test.msh", "Gmsh Format")

Thank you!
More
3 years 4 months ago #3402 by cwinters
Hi,

you have to call the GenerateMesh function
Code:
mesh = geo.GenerateMesh()
then the export works.
You just copied the GenerateMesh function to the new function "mesh".

Best,
Christoph
Time to create page: 0.117 seconds