mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: surfaceFeatureExtract: new syntax for non-manifold edges
This commit is contained in:
@ -721,16 +721,34 @@ int main(int argc, char *argv[])
|
||||
deleteBox(surf, bb, true, edgeStat);
|
||||
}
|
||||
|
||||
const Switch manifoldEdges =
|
||||
subsetDict.lookupOrDefault<Switch>("manifoldEdges", "no");
|
||||
const Switch nonManifoldEdges =
|
||||
subsetDict.lookupOrDefault<Switch>("nonManifoldEdges", "yes");
|
||||
|
||||
if (manifoldEdges)
|
||||
if (!nonManifoldEdges)
|
||||
{
|
||||
Info<< "Removing all non-manifold edges" << endl;
|
||||
Info<< "Removing all non-manifold edges"
|
||||
<< " (edges with > 2 connected faces)" << endl;
|
||||
|
||||
forAll(edgeStat, edgeI)
|
||||
{
|
||||
if (surf.edgeFaces()[edgeI].size() != 2)
|
||||
if (surf.edgeFaces()[edgeI].size() > 2)
|
||||
{
|
||||
edgeStat[edgeI] = surfaceFeatures::NONE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const Switch openEdges =
|
||||
subsetDict.lookupOrDefault<Switch>("openEdges", "yes");
|
||||
|
||||
if (!openEdges)
|
||||
{
|
||||
Info<< "Removing all open edges"
|
||||
<< " (edges with 1 connected face)" << endl;
|
||||
|
||||
forAll(edgeStat, edgeI)
|
||||
{
|
||||
if (surf.edgeFaces()[edgeI].size() == 1)
|
||||
{
|
||||
edgeStat[edgeI] = surfaceFeatures::NONE;
|
||||
}
|
||||
|
||||
@ -59,15 +59,21 @@ surface2.nas
|
||||
{
|
||||
// Use a plane to select feature edges
|
||||
// (normal)(basePoint)
|
||||
// Keep only edges that intersect the plane will be included
|
||||
plane (1 0 0)(0 0 0);
|
||||
|
||||
// Select feature edges using a box
|
||||
// (minPt)(maxPt)
|
||||
// Keep edges inside the box:
|
||||
insideBox (0 0 0)(1 1 1);
|
||||
// Keep edges outside the box:
|
||||
outsideBox (0 0 0)(1 1 1);
|
||||
|
||||
// Remove any non-manifold (open or > 2 connected faces) edges
|
||||
manifoldEdges no;
|
||||
// Keep nonManifold edges (edges with >2 connected faces)
|
||||
nonManifoldEdges yes;
|
||||
|
||||
// Keep open edges (edges with 1 connected face)
|
||||
openEdges yes;
|
||||
}
|
||||
|
||||
addFeatures
|
||||
|
||||
Reference in New Issue
Block a user