- Thank you received: 0
Error while exporting without GUI
- Amilibia i Sison
- Topic Author
- Offline
- New Member
Less
More
3 years 11 months ago #3401
by Amilibia i Sison
Error while exporting without GUI was created 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!
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!
3 years 11 months ago #3402
by cwinters
Replied by cwinters on topic Error while exporting without GUI
Hi,
you have to call the GenerateMesh function
then the export works.
You just copied the GenerateMesh function to the new function "mesh".
Best,
Christoph
you have to call the GenerateMesh function
Code:
mesh = geo.GenerateMesh()
You just copied the GenerateMesh function to the new function "mesh".
Best,
Christoph
Time to create page: 0.113 seconds