diff --git a/applications/utilities/surface/surfaceFeatureExtract/extractionMethod/Make/options b/applications/utilities/surface/surfaceFeatureExtract/extractionMethod/Make/options index 322709bfff9a5d63f8015f4aa155ec6fcf248b70..a5976d53f84a0c0c47012d4f0dfa4ba80c3af152 100644 --- a/applications/utilities/surface/surfaceFeatureExtract/extractionMethod/Make/options +++ b/applications/utilities/surface/surfaceFeatureExtract/extractionMethod/Make/options @@ -1,11 +1,7 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/edgeMesh/lnInclude \ - -I$(LIB_SRC)/triSurface/lnInclude \ - -I$(LIB_SRC)/surfMesh/lnInclude + -I$(LIB_SRC)/surfMesh/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude LIB_LIBS = \ - -lmeshTools \ - -ledgeMesh \ - -ltriSurface + -lmeshTools diff --git a/applications/utilities/surface/surfaceFeatureExtract/extractionMethod/extractFromFile.C b/applications/utilities/surface/surfaceFeatureExtract/extractionMethod/extractFromFile.C index d9fb9b1dde6e8c2806f9f1513d5c1ae5e50a67b8..7b2b0c8ad093242b74e03e0e705b2b2de9ea326c 100644 --- a/applications/utilities/surface/surfaceFeatureExtract/extractionMethod/extractFromFile.C +++ b/applications/utilities/surface/surfaceFeatureExtract/extractionMethod/extractFromFile.C @@ -53,7 +53,8 @@ Foam::surfaceFeaturesExtraction::extractFromFile::extractFromFile : method() { - const dictionary& coeffDict = dict.subDict("extractFromFileCoeffs"); + const dictionary& coeffDict = + dict.optionalSubDict("extractFromFileCoeffs"); coeffDict.lookup("featureEdgeFile") >> featureEdgeFile_; coeffDict.readIfPresent("geometricTestOnly", geometricTestOnly_); diff --git a/applications/utilities/surface/surfaceFeatureExtract/extractionMethod/extractFromFile.H b/applications/utilities/surface/surfaceFeatureExtract/extractionMethod/extractFromFile.H index bca148439ffc1f2d1a77aa6ef7955e2616b09adf..83853fab2debf4b2eff8cd39a71e07e74def950d 100644 --- a/applications/utilities/surface/surfaceFeatureExtract/extractionMethod/extractFromFile.H +++ b/applications/utilities/surface/surfaceFeatureExtract/extractionMethod/extractFromFile.H @@ -27,8 +27,11 @@ Class Description Run-time selectable surface feature extraction. + Mandatory dictionary entries: "featureEdgeFile". + Optional dictionary entries: "geometricTestOnly". + SourceFiles - extractionMethod.C + extractFromFile.C \*---------------------------------------------------------------------------*/ @@ -36,8 +39,6 @@ SourceFiles #define surfaceFeaturesExtraction_extractFromFile_H #include "surfaceFeaturesExtraction.H" -#include "dictionary.H" -#include "Switch.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/utilities/surface/surfaceFeatureExtract/extractionMethod/extractFromNone.C b/applications/utilities/surface/surfaceFeatureExtract/extractionMethod/extractFromNone.C index 887e9a4d6591c1a3fa1ac9d48677b39ce9fd330e..c49db760a98269e4728a28c1333afe7bad31dbce 100644 --- a/applications/utilities/surface/surfaceFeatureExtract/extractionMethod/extractFromNone.C +++ b/applications/utilities/surface/surfaceFeatureExtract/extractionMethod/extractFromNone.C @@ -52,7 +52,7 @@ Foam::surfaceFeaturesExtraction::extractFromNone::extractFromNone : method() { - const dictionary& coeffDict = dict.subOrEmptyDict("extractFromNoneCoeffs"); + const dictionary& coeffDict = dict.optionalSubDict("noneCoeffs"); coeffDict.readIfPresent("includedAngle", includedAngle_); coeffDict.readIfPresent("geometricTestOnly", geometricTestOnly_); diff --git a/applications/utilities/surface/surfaceFeatureExtract/extractionMethod/extractFromNone.H b/applications/utilities/surface/surfaceFeatureExtract/extractionMethod/extractFromNone.H index da80a3c624a4e3ddae034a380a9683f0d831ff35..9f9b94410f47ba38a6ccac0af1d814b033ba4d09 100644 --- a/applications/utilities/surface/surfaceFeatureExtract/extractionMethod/extractFromNone.H +++ b/applications/utilities/surface/surfaceFeatureExtract/extractionMethod/extractFromNone.H @@ -25,10 +25,13 @@ Class Foam::surfaceFeaturesExtraction::extractFromNone Description - Run-time selectable surface feature extraction. + Run-time selectable surface feature extraction - no extraction. + Primarily useful with self-intersection methods. + + Optional dictionary entries: "includedAngle", "geometricTestOnly". SourceFiles - extractionMethod.C + extractFromNone.C \*---------------------------------------------------------------------------*/ @@ -36,10 +39,6 @@ SourceFiles #define surfaceFeaturesExtraction_extractFromNone_H #include "surfaceFeaturesExtraction.H" -#include "dictionary.H" -#include "Switch.H" -#include "triSurface.H" -#include "edgeIntersections.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/utilities/surface/surfaceFeatureExtract/extractionMethod/extractFromSurface.C b/applications/utilities/surface/surfaceFeatureExtract/extractionMethod/extractFromSurface.C index 6621d6c93147586c75a231f0faa53f86c1e418d7..35b5dc0e3f0aef30332bc5aac0ae654ad2e8e74d 100644 --- a/applications/utilities/surface/surfaceFeatureExtract/extractionMethod/extractFromSurface.C +++ b/applications/utilities/surface/surfaceFeatureExtract/extractionMethod/extractFromSurface.C @@ -52,7 +52,8 @@ Foam::surfaceFeaturesExtraction::extractFromSurface::extractFromSurface : method() { - const dictionary& coeffDict = dict.subDict("extractFromSurfaceCoeffs"); + const dictionary& coeffDict = + dict.optionalSubDict("extractFromSurfaceCoeffs"); coeffDict.lookup("includedAngle") >> includedAngle_; coeffDict.readIfPresent("geometricTestOnly", geometricTestOnly_); diff --git a/applications/utilities/surface/surfaceFeatureExtract/extractionMethod/extractFromSurface.H b/applications/utilities/surface/surfaceFeatureExtract/extractionMethod/extractFromSurface.H index e007a8d3b9e97eba56d596b38d71b4a394de9ed6..3ad3412819aa9db252c531deb18d13d0df28f8c8 100644 --- a/applications/utilities/surface/surfaceFeatureExtract/extractionMethod/extractFromSurface.H +++ b/applications/utilities/surface/surfaceFeatureExtract/extractionMethod/extractFromSurface.H @@ -25,10 +25,13 @@ Class Foam::surfaceFeaturesExtraction::extractFromSurface Description - Run-time selectable surface feature extraction. + Run-time selectable surface feature extraction - extract from surface. + + Mandatory dictionary entries: "includedAngle". + Optional dictionary entries: "geometricTestOnly". SourceFiles - extractionMethod.C + extractFromSurface.C \*---------------------------------------------------------------------------*/ @@ -36,10 +39,6 @@ SourceFiles #define surfaceFeaturesExtraction_extractFromSurface_H #include "surfaceFeaturesExtraction.H" -#include "dictionary.H" -#include "Switch.H" -#include "triSurface.H" -#include "edgeIntersections.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtractDict b/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtractDict index 362e7f99eef61ebad2b109f05b09c0ce0b502bdc..65322152987efb854b83a8b44346215f9867c871 100644 --- a/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtractDict +++ b/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtractDict @@ -19,17 +19,22 @@ surface1.stl // How to obtain raw features (extractFromFile | extractFromSurface | none) extractionMethod 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; + + // Do not mark region edges + geometricTestOnly yes; + + /* alternative specification as coeff dictionary 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; - // Do not mark region edges geometricTestOnly yes; - } + } */ // Generate additional features from self-intersect selfIntersection false; @@ -69,27 +74,27 @@ 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); + 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); + insideBox (0 0 0)(1 1 1); // Keep edges outside the box: - outsideBox (0 0 0)(1 1 1); + outsideBox (0 0 0)(1 1 1); // Keep nonManifold edges (edges with >2 connected faces where // the faces form more than two different normal planes) - nonManifoldEdges yes; + nonManifoldEdges yes; // Keep open edges (edges with 1 connected face) - openEdges yes; + openEdges yes; } addFeatures { // Add (without merging) another extendedFeatureEdgeMesh - name axZ.extendedFeatureEdgeMesh; + name axZ.extendedFeatureEdgeMesh; // Optionally flip features (invert all normals, making // convex<->concave etc) @@ -149,19 +154,10 @@ dummyName // Tolerance for surface intersections tolerance 1e-3; - extractFromSurfaceCoeffs - { - includedAngle 120; + includedAngle 120; - // Do not mark region edges - geometricTestOnly yes; - } - - extractFromNoneCoeffs - { - includedAngle 120; - - } + // Do not mark region edges + geometricTestOnly yes; // Write options @@ -180,7 +176,7 @@ dummyName // surfaces { - extractionMethod extractFromNone; + extractionMethod none; surfaces (surface1.stl surface2.nas); @@ -193,10 +189,12 @@ surfaces // Tolerance for surface intersections tolerance 1e-3; - extractFromNoneCoeffs + /* alternative specification as coeff dictionary + noneCoeffs { includedAngle 0; } + */ // Write options