surfaceFeatures: New version of surfaceFeatureExtract with simplied controls
Surfaces are specified as a list and the controls applied to each, e.g. in the
rhoPimpleFoam/RAS/annularThermalMixer tutorial:
surfaces
(
"AMI.obj"
"shaft.obj"
"wall.obj"
"statorBlades.obj"
"rotorBlades.obj"
);
includedAngle 150; // Identifes a feature when angle
// between faces < includedAngle
trimFeatures
{
minElem 10; // minimum edges within a feature
}
writeObj yes; // writes out _edgeMesh.obj files to view features
If different controls are required for different surfaces multiple
sub-dictionaries can be used:
AMIsurfaces
{
surfaces
(
"AMI.obj"
);
includedAngle 140; // Identifes a feature when angle
// between faces < includedAngle
trimFeatures
{
minElem 8; // minimum edges within a feature
}
writeObj yes; // writes out _edgeMesh.obj files to view features
}
otherSurfaces
{
surfaces
(
"shaft.obj"
"wall.obj"
"statorBlades.obj"
"rotorBlades.obj"
);
includedAngle 150; // Identifes a feature when angle
// between faces < includedAngle
trimFeatures
{
minElem 10; // minimum edges within a feature
}
writeObj yes; // writes out _edgeMesh.obj files to view features
}
Existing feature edge files corresponding to particular surfaces can be specified using
the "files" association list:
surfaces
(
"AMI.obj"
"shaft.obj"
"wall.obj"
"statorBlades.obj"
"rotorBlades.obj"
);
files
(
"AMI.obj" "constant/triSurface/AMI.obj.eMesh";
);
includedAngle 150; // Identifes a feature when angle
// between faces < includedAngle
trimFeatures
{
minElem 10; // minimum edges within a feature
}
writeObj yes; // writes out _edgeMesh.obj files to view features
This commit is contained in:
@ -1381,7 +1381,8 @@ void Foam::extendedEdgeMesh::flipNormals()
|
||||
|
||||
void Foam::extendedEdgeMesh::writeObj
|
||||
(
|
||||
const fileName& prefix
|
||||
const fileName& prefix,
|
||||
const bool verbose
|
||||
) const
|
||||
{
|
||||
Info<< nl << "Writing extendedEdgeMesh components to " << prefix
|
||||
@ -1389,6 +1390,8 @@ void Foam::extendedEdgeMesh::writeObj
|
||||
|
||||
edgeMesh::write(prefix + "_edgeMesh.obj");
|
||||
|
||||
if (!verbose) return;
|
||||
|
||||
OBJstream convexFtPtStr(prefix + "_convexFeaturePts.obj");
|
||||
Info<< "Writing convex feature points to " << convexFtPtStr.name() << endl;
|
||||
|
||||
@ -1511,19 +1514,15 @@ void Foam::extendedEdgeMesh::writeStats(Ostream& os) const
|
||||
os << incrIndent;
|
||||
os << indent << "convex feature points : "
|
||||
<< setw(8) << concaveStart_-convexStart_
|
||||
//<< setw(8) << convexStart_
|
||||
<< nl;
|
||||
os << indent << "concave feature points : "
|
||||
<< setw(8) << mixedStart_-concaveStart_
|
||||
//<< setw(8) << concaveStart_
|
||||
<< nl;
|
||||
os << indent << "mixed feature points : "
|
||||
<< setw(8) << nonFeatureStart_-mixedStart_
|
||||
//<< setw(8) << mixedStart_
|
||||
<< nl;
|
||||
os << indent << "other (non-feature) points : "
|
||||
<< setw(8) << points().size()-nonFeatureStart_
|
||||
//<< setw(8) << nonFeatureStart_
|
||||
<< nl;
|
||||
os << decrIndent;
|
||||
|
||||
@ -1531,23 +1530,18 @@ void Foam::extendedEdgeMesh::writeStats(Ostream& os) const
|
||||
os << incrIndent;
|
||||
os << indent << "external (convex angle) edges : "
|
||||
<< setw(8) << internalStart_-externalStart_
|
||||
//<< setw(8) << externalStart_
|
||||
<< nl;
|
||||
os << indent << "internal (concave angle) edges : "
|
||||
<< setw(8) << flatStart_-internalStart_
|
||||
//<< setw(8) << internalStart_
|
||||
<< nl;
|
||||
os << indent << "flat region edges : "
|
||||
<< setw(8) << openStart_-flatStart_
|
||||
//<< setw(8) << flatStart_
|
||||
<< nl;
|
||||
os << indent << "open edges : "
|
||||
<< setw(8) << multipleStart_-openStart_
|
||||
//<< setw(8) << openStart_
|
||||
<< nl;
|
||||
os << indent << "multiply connected edges : "
|
||||
<< setw(8) << edges().size()-multipleStart_
|
||||
//<< setw(8) << multipleStart_
|
||||
<< nl;
|
||||
os << decrIndent;
|
||||
}
|
||||
|
||||
@ -520,7 +520,11 @@ public:
|
||||
// Write
|
||||
|
||||
//- Write all components of the extendedEdgeMesh as obj files
|
||||
void writeObj(const fileName& prefix) const;
|
||||
void writeObj
|
||||
(
|
||||
const fileName& prefix,
|
||||
const bool verbose = true
|
||||
) const;
|
||||
|
||||
//- Dump some information
|
||||
virtual void writeStats(Ostream& os) const;
|
||||
|
||||
Reference in New Issue
Block a user