mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-14 10:08:32 +05:00
set occparams and generate triangulation with BRepMesh
This commit is contained in:
parent
8f11b84911
commit
a90ee2e437
@ -1137,7 +1137,12 @@ namespace netgen
|
|||||||
Handle(Geom_Surface) surf = BRep_Tool::Surface (face);
|
Handle(Geom_Surface) surf = BRep_Tool::Surface (face);
|
||||||
Handle(Poly_Triangulation) triangulation = BRep_Tool::Triangulation (face, loc);
|
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);
|
BRepAdaptor_Surface sf(face, Standard_True);
|
||||||
BRepLProp_SLProps prop(sf, 2, 1e-5);
|
BRepLProp_SLProps prop(sf, 2, 1e-5);
|
||||||
@ -1286,6 +1291,10 @@ namespace netgen
|
|||||||
|
|
||||||
int OCCGenerateMesh (OCCGeometry & geom, shared_ptr<Mesh> & mesh, MeshingParameters & mparam)
|
int OCCGenerateMesh (OCCGeometry & geom, shared_ptr<Mesh> & mesh, MeshingParameters & mparam)
|
||||||
{
|
{
|
||||||
|
cout << "MeshingParameters: " << mparam << endl;
|
||||||
|
cout << "OCCParameters: " << endl;
|
||||||
|
occparam.Print(cout);
|
||||||
|
|
||||||
multithread.percent = 0;
|
multithread.percent = 0;
|
||||||
|
|
||||||
if (mparam.perfstepsstart <= MESHCONST_ANALYSE)
|
if (mparam.perfstepsstart <= MESHCONST_ANALYSE)
|
||||||
|
@ -33,6 +33,12 @@ DLL_HEADER void ExportNgOCC(py::module &m)
|
|||||||
SetGlobalMesh(mesh);
|
SetGlobalMesh(mesh);
|
||||||
mesh->SetGeometry(geo);
|
mesh->SetGeometry(geo);
|
||||||
ng_geometry = geo;
|
ng_geometry = geo;
|
||||||
|
|
||||||
|
occparam.resthcloseedgefac = 2.0;
|
||||||
|
occparam.resthcloseedgeenable = 1;
|
||||||
|
occparam.resthminedgelen = 0.2;
|
||||||
|
occparam.resthminedgelenenable = 1;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
geo->GenerateMesh(mesh,param);
|
geo->GenerateMesh(mesh,param);
|
||||||
|
Loading…
Reference in New Issue
Block a user