#include <occgeom.hpp>
#include <meshing.hpp>
#include <stlgeom.hpp>
-//#include <stltool.hxx>
+//#include <stltool.hpp>
#include <boost/container/flat_set.hpp>
// #endif
// extern STLParameters stlparam;
// }
+namespace nglib
+{
+ extern netgen::Array<netgen::Point<3> > readedges;
+}
namespace
{
{
// set bad faces into a compute error
const char* text = "Non-manifold mesh. Only manifold mesh can be re-meshed";
- SMESH_ComputeErrorPtr error = SMESH_ComputeError::New( COMPERR_BAD_INPUT_MESH, text );
+ SMESH_BadInputElements* error =
+ new SMESH_BadInputElements( myMeshDS, COMPERR_BAD_INPUT_MESH, text );
SMESH::Controls::MultiConnection2D fun;
fun.SetMesh( myMeshDS );
SMDS_ElemIteratorPtr fIt = myMeshDS->elementsIterator( SMDSAbs_Face );
if ( fun.GetValue( f->GetID() ) > 2 )
error->myBadElements.push_back( f );
}
- theMesh.GetSubMesh( theMesh.GetShapeToMesh() )->GetComputeError() = error;
+ theMesh.GetSubMesh( theMesh.GetShapeToMesh() )->GetComputeError().reset( error );
throw SALOME_Exception( text );
}
if ( !freeBords._coincidentGroups.empty() )
{
const char* text = "Can't re-meshed a mesh with coincident free edges";
- SMESH_ComputeErrorPtr error = SMESH_ComputeError::New( COMPERR_BAD_INPUT_MESH, text );
+ SMESH_BadInputElements* error =
+ new SMESH_BadInputElements( myMeshDS, COMPERR_BAD_INPUT_MESH, text );
for ( size_t i = 0; i < freeBords._borders.size(); ++i )
error->myBadElements.insert( error->myBadElements.end(),
freeBords._borders[i].begin(),
freeBords._borders[i].end() );
- theMesh.GetSubMesh( theMesh.GetShapeToMesh() )->GetComputeError() = error;
+ theMesh.GetSubMesh( theMesh.GetShapeToMesh() )->GetComputeError().reset( error );
throw SALOME_Exception( text );
}
}
void HoleFiller::AddHoleBorders( Ng_STL_Geometry * ngStlGeo )
{
+ nglib::readedges.SetSize(0);
+
for ( size_t i = 0; i < myHole.size(); ++i )
for ( size_t iP = 1; iP < myHole[i].size(); ++iP )
{
*/
//=============================================================================
-NETGENPlugin_Remesher_2D::NETGENPlugin_Remesher_2D(int hypId, int studyId, SMESH_Gen* gen)
- : SMESH_2D_Algo(hypId, studyId, gen)
+NETGENPlugin_Remesher_2D::NETGENPlugin_Remesher_2D(int hypId, SMESH_Gen* gen)
+ : SMESH_2D_Algo(hypId, gen)
{
_name = "NETGEN_Remesher_2D";
_shapeType = (1 << TopAbs_FACE); // 1 bit /shape type
netgen::mparam.minh = netgen::mparam.maxh;
}
+ // TODO: expose stlparam.resth* to the user
+ // netgen::stlparam.resthcloseedgeenable = 0; // Restrict H due to close edges
+ // netgen::stlparam.resthlinelengthenable = 0; // Restrict H due to line-length
+ // netgen::stlparam.resthatlasenable = 0;
+ // //netgen::stlparam.resthchartdistenable = 0;
+
double h = netgen::mparam.maxh;
ngMesh->SetGlobalH( h );
ngMesh->SetMinimalH( netgen::mparam.minh );