本文整理汇总了C++中SMESH_subMesh::IsEmpty方法的典型用法代码示例。如果您正苦于以下问题:C++ SMESH_subMesh::IsEmpty方法的具体用法?C++ SMESH_subMesh::IsEmpty怎么用?C++ SMESH_subMesh::IsEmpty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SMESH_subMesh
的用法示例。
在下文中一共展示了SMESH_subMesh::IsEmpty方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PrepareOCCgeometry
void NETGENPlugin_Mesher::PrepareOCCgeometry(netgen::OCCGeometry& occgeo,
const TopoDS_Shape& shape,
SMESH_Mesh& mesh,
list< SMESH_subMesh* > * meshedSM)
{
BRepTools::Clean (shape);
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
BRepMesh_IncrementalMesh::BRepMesh_IncrementalMesh (shape, 0.01, true);
} catch (Standard_Failure) {
}
Bnd_Box bb;
BRepBndLib::Add (shape, bb);
double x1,y1,z1,x2,y2,z2;
bb.Get (x1,y1,z1,x2,y2,z2);
MESSAGE("shape bounding box:\n" <<
"(" << x1 << " " << y1 << " " << z1 << ") " <<
"(" << x2 << " " << y2 << " " << z2 << ")");
netgen::Point<3> p1 = netgen::Point<3> (x1,y1,z1);
netgen::Point<3> p2 = netgen::Point<3> (x2,y2,z2);
occgeo.boundingbox = netgen::Box<3> (p1,p2);
occgeo.shape = shape;
occgeo.changed = 1;
//occgeo.BuildFMap();
// fill maps of shapes of occgeo with not yet meshed subshapes
// get root submeshes
list< SMESH_subMesh* > rootSM;
if ( SMESH_subMesh* sm = mesh.GetSubMeshContaining( shape )) {
rootSM.push_back( sm );
}
else {
for ( TopoDS_Iterator it( shape ); it.More(); it.Next() )
rootSM.push_back( mesh.GetSubMesh( it.Value() ));
}
// add subshapes of empty submeshes
list< SMESH_subMesh* >::iterator rootIt = rootSM.begin(), rootEnd = rootSM.end();
for ( ; rootIt != rootEnd; ++rootIt ) {
SMESH_subMesh * root = *rootIt;
SMESH_subMeshIteratorPtr smIt = root->getDependsOnIterator(/*includeSelf=*/true,
/*complexShapeFirst=*/true);
// to find a right orientation of subshapes (PAL20462)
TopTools_IndexedMapOfShape subShapes;
TopExp::MapShapes(root->GetSubShape(), subShapes);
while ( smIt->more() ) {
SMESH_subMesh* sm = smIt->next();
if ( !meshedSM || sm->IsEmpty() ) {
TopoDS_Shape shape = sm->GetSubShape();
if ( shape.ShapeType() != TopAbs_VERTEX )
shape = subShapes( subShapes.FindIndex( shape ));// - shape->index->oriented shape
switch ( shape.ShapeType() ) {
case TopAbs_FACE : occgeo.fmap.Add( shape ); break;
case TopAbs_EDGE : occgeo.emap.Add( shape ); break;
case TopAbs_VERTEX: occgeo.vmap.Add( shape ); break;
case TopAbs_SOLID :occgeo.somap.Add( shape ); break;
default:;
}
}
// collect submeshes of meshed shapes
else if (meshedSM) {
meshedSM->push_back( sm );
}
}
}
occgeo.facemeshstatus.SetSize (occgeo.fmap.Extent());
occgeo.facemeshstatus = 0;
}