- myGen.PrepareCompute( myLocMesh, myLocShape);
- bool ok = myGen.Compute( myLocMesh, myLocShape);
+ myGen.PrepareCompute( myLocMesh, myLocShape );
+ int how = ::SMESH_Gen::COMPACT_MESH;
+ if ( myLocShape != myLocMesh.GetShapeToMesh() ) // compute a sub-mesh
+ how |= ::SMESH_Gen::SHAPE_ONLY;
+ bool ok = myGen.Compute( myLocMesh, myLocShape, how );