mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: surfaceFeatureExtract: get info from Coeffs dictionary. Added comment
This commit is contained in:
@ -592,7 +592,7 @@ int main(int argc, char *argv[])
|
|||||||
if (extractionMethod == "extractFromFile")
|
if (extractionMethod == "extractFromFile")
|
||||||
{
|
{
|
||||||
const fileName featureEdgeFile =
|
const fileName featureEdgeFile =
|
||||||
surfaceDict.subDict("extractFromFile").lookup
|
surfaceDict.subDict("extractFromFileCoeffs").lookup
|
||||||
(
|
(
|
||||||
"featureEdgeFile"
|
"featureEdgeFile"
|
||||||
);
|
);
|
||||||
@ -612,7 +612,7 @@ int main(int argc, char *argv[])
|
|||||||
const scalar includedAngle =
|
const scalar includedAngle =
|
||||||
readScalar
|
readScalar
|
||||||
(
|
(
|
||||||
surfaceDict.subDict("extractFromSurface").lookup
|
surfaceDict.subDict("extractFromSurfaceCoeffs").lookup
|
||||||
(
|
(
|
||||||
"includedAngle"
|
"includedAngle"
|
||||||
)
|
)
|
||||||
@ -747,10 +747,10 @@ int main(int argc, char *argv[])
|
|||||||
surfaceFeatures newSet(surf);
|
surfaceFeatures newSet(surf);
|
||||||
newSet.setFromStatus(edgeStat);
|
newSet.setFromStatus(edgeStat);
|
||||||
|
|
||||||
if (writeObj)
|
//if (writeObj)
|
||||||
{
|
//{
|
||||||
newSet.writeObj("final");
|
// newSet.writeObj("final");
|
||||||
}
|
//}
|
||||||
|
|
||||||
Info<< nl
|
Info<< nl
|
||||||
<< "Final feature set after trimming and subsetting:" << nl
|
<< "Final feature set after trimming and subsetting:" << nl
|
||||||
@ -775,7 +775,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (writeObj)
|
if (writeObj)
|
||||||
{
|
{
|
||||||
feMesh.writeObj(surfFileName.lessExt().name());
|
feMesh.writeObj(feMesh.path()/surfFileName.lessExt().name());
|
||||||
}
|
}
|
||||||
|
|
||||||
feMesh.write();
|
feMesh.write();
|
||||||
|
|||||||
@ -16,10 +16,34 @@ FoamFile
|
|||||||
|
|
||||||
surface1.stl
|
surface1.stl
|
||||||
{
|
{
|
||||||
// extractFromFile || extractFromSurface
|
// How to obtain raw features (extractFromFile || extractFromSurface)
|
||||||
|
extractionMethod extractFromSurface;
|
||||||
|
|
||||||
|
extractFromSurfaceCoeffs
|
||||||
|
{
|
||||||
|
// Mark edges whose adjacent surface normals are at an angle less
|
||||||
|
// than includedAngle as features
|
||||||
|
// - 0 : selects no edges
|
||||||
|
// - 180: selects all edges
|
||||||
|
includedAngle 120;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Write options
|
||||||
|
|
||||||
|
// Write .eMesh file (for snappyHexMesh)
|
||||||
|
writeFeatureEdgeMesh yes;
|
||||||
|
|
||||||
|
// Write features to obj format for postprocessing
|
||||||
|
writeObj yes;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
surface2.nas
|
||||||
|
{
|
||||||
|
// How to obtain raw features (extractFromFile || extractFromSurface)
|
||||||
extractionMethod extractFromFile;
|
extractionMethod extractFromFile;
|
||||||
|
|
||||||
extractFromFile
|
extractFromFileCoeffs
|
||||||
{
|
{
|
||||||
// Load from an existing feature edge file
|
// Load from an existing feature edge file
|
||||||
featureEdgeFile "constant/triSurface/featureEdges.nas";
|
featureEdgeFile "constant/triSurface/featureEdges.nas";
|
||||||
@ -62,25 +86,18 @@ surface1.stl
|
|||||||
closeness no;
|
closeness no;
|
||||||
|
|
||||||
// Write options
|
// Write options
|
||||||
writeVTK no;
|
|
||||||
writeObj yes;
|
// Write .eMesh file (for snappyHexMesh)
|
||||||
writeFeatureEdgeMesh no;
|
writeFeatureEdgeMesh no;
|
||||||
|
|
||||||
|
// Write features to obj format for postprocessing
|
||||||
|
writeObj yes;
|
||||||
|
|
||||||
|
// Write surface proximity and curvature fields to vtk format
|
||||||
|
// for postprocessing
|
||||||
|
writeVTK no;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
surface2.nas
|
|
||||||
{
|
|
||||||
extractionMethod extractFromSurface;
|
|
||||||
|
|
||||||
extractFromSurface
|
|
||||||
{
|
|
||||||
// Mark edges whose adjacent surface normals are at an angle less
|
|
||||||
// than includedAngle as features
|
|
||||||
// - 0 : selects no edges
|
|
||||||
// - 180: selects all edges
|
|
||||||
includedAngle 120;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -18,7 +18,7 @@ bottomAir.stl
|
|||||||
{
|
{
|
||||||
extractionMethod extractFromSurface;
|
extractionMethod extractFromSurface;
|
||||||
|
|
||||||
extractFromSurface
|
extractFromSurfaceCoeffs
|
||||||
{
|
{
|
||||||
// Mark edges whose adjacent surface normals are at an angle less
|
// Mark edges whose adjacent surface normals are at an angle less
|
||||||
// than includedAngle as features
|
// than includedAngle as features
|
||||||
@ -34,7 +34,7 @@ heater.stl
|
|||||||
{
|
{
|
||||||
extractionMethod extractFromSurface;
|
extractionMethod extractFromSurface;
|
||||||
|
|
||||||
extractFromSurface
|
extractFromSurfaceCoeffs
|
||||||
{
|
{
|
||||||
// Mark edges whose adjacent surface normals are at an angle less
|
// Mark edges whose adjacent surface normals are at an angle less
|
||||||
// than includedAngle as features
|
// than includedAngle as features
|
||||||
@ -50,7 +50,7 @@ leftSolid.stl
|
|||||||
{
|
{
|
||||||
extractionMethod extractFromSurface;
|
extractionMethod extractFromSurface;
|
||||||
|
|
||||||
extractFromSurface
|
extractFromSurfaceCoeffs
|
||||||
{
|
{
|
||||||
// Mark edges whose adjacent surface normals are at an angle less
|
// Mark edges whose adjacent surface normals are at an angle less
|
||||||
// than includedAngle as features
|
// than includedAngle as features
|
||||||
@ -66,7 +66,7 @@ rightSolid.stl
|
|||||||
{
|
{
|
||||||
extractionMethod extractFromSurface;
|
extractionMethod extractFromSurface;
|
||||||
|
|
||||||
extractFromSurface
|
extractFromSurfaceCoeffs
|
||||||
{
|
{
|
||||||
// Mark edges whose adjacent surface normals are at an angle less
|
// Mark edges whose adjacent surface normals are at an angle less
|
||||||
// than includedAngle as features
|
// than includedAngle as features
|
||||||
@ -82,7 +82,7 @@ topAir.stl
|
|||||||
{
|
{
|
||||||
extractionMethod extractFromSurface;
|
extractionMethod extractFromSurface;
|
||||||
|
|
||||||
extractFromSurface
|
extractFromSurfaceCoeffs
|
||||||
{
|
{
|
||||||
// Mark edges whose adjacent surface normals are at an angle less
|
// Mark edges whose adjacent surface normals are at an angle less
|
||||||
// than includedAngle as features
|
// than includedAngle as features
|
||||||
|
|||||||
@ -18,7 +18,7 @@ flange.obj
|
|||||||
{
|
{
|
||||||
extractionMethod extractFromSurface;
|
extractionMethod extractFromSurface;
|
||||||
|
|
||||||
extractFromSurface
|
extractFromSurfaceCoeffs
|
||||||
{
|
{
|
||||||
// Mark edges whose adjacent surface normals are at an angle less
|
// Mark edges whose adjacent surface normals are at an angle less
|
||||||
// than includedAngle as features
|
// than includedAngle as features
|
||||||
@ -27,10 +27,14 @@ flange.obj
|
|||||||
includedAngle 155;
|
includedAngle 155;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Write options
|
// Write options
|
||||||
writeVTK no;
|
|
||||||
writeObj yes;
|
// Write .eMesh file (for snappyHexMesh)
|
||||||
writeFeatureEdgeMesh no;
|
writeFeatureEdgeMesh no;
|
||||||
|
|
||||||
|
// Write features to obj format for postprocessing
|
||||||
|
writeObj yes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user