Merge branch 'occfrompython' into 'master'

Occfrompython

See merge request !67
This commit is contained in:
Joachim Schöberl 2017-10-30 13:05:08 +01:00
commit b269c9a2c9
2 changed files with 7 additions and 1 deletions

View File

@ -1137,7 +1137,12 @@ namespace netgen
Handle(Geom_Surface) surf = BRep_Tool::Surface (face);
Handle(Poly_Triangulation) triangulation = BRep_Tool::Triangulation (face, loc);
if (triangulation.IsNull()) continue;
if (triangulation.IsNull())
{
BRepTools::Clean (geom.shape);
BRepMesh_IncrementalMesh (geom.shape, 0.01, true);
triangulation = BRep_Tool::Triangulation (face, loc);
}
BRepAdaptor_Surface sf(face, Standard_True);
BRepLProp_SLProps prop(sf, 2, 1e-5);

View File

@ -33,6 +33,7 @@ DLL_HEADER void ExportNgOCC(py::module &m)
SetGlobalMesh(mesh);
mesh->SetGeometry(geo);
ng_geometry = geo;
try
{
geo->GenerateMesh(mesh,param);