CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [surface handling] surfaceFeatureExtract fails to generate .eMesh file from .stl file (https://www.cfd-online.com/Forums/openfoam-meshing/205659-surfacefeatureextract-fails-generate-emesh-file-stl-file.html)

buckleup August 22, 2018 15:21

surfaceFeatureExtract fails to generate .eMesh file from .stl file
 
5 Attachment(s)
Hi All,

I'm having trouble generating an eMesh file from a specific CAD file in .stl format using surfaceFeatureExtract in OpenFOAM v1612.

The surfaceFeatureExtractDict (see attached file) contains the following lines to extract edge features from CAD geometry described in file ‘front-wheel-r500-2.stl’ (file is too large to upload):

Code:

front-wheel-r500-2.stl
{
    // 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  150;
    }

    subsetFeatures
    {
        // Keep nonManifold edges (edges with >2 connected faces)
        nonManifoldEdges      no;

        // Keep open edges (edges with 1 connected face)
        openEdges      yes;
    }

    // Write options

    // Write features to obj format for postprocessing
    writeObj yes;
}

Upon execution of surfaceFeatureExtract, an empty edge mesh file is generated containing only the OF header (see attached file ‘front-wheel-r500-2.eMesh’). The output below from the log file also shows that Initial and Final feature sets are empty (see attached file ‘surfaceFeatureExtract.log.201808221812.r500-2’)

Code:

Surface            : "front-wheel-r500-2.stl"


Feature line extraction is only valid on closed manifold surfaces.
Statistics:
Triangles    : 9344
Vertices    : 4672
Bounding Box : (0.2426566929 -0.2872481942 -0.01187231019) (0.9176033139 0.3872481883 0.01187231019)


Constructing feature set from included angle 150
Selecting edges purely based on geometric tests: no
Removing all non-manifold edges (edges with > 2 connected faces) unless they cross multiple regions

Initial feature set:
    feature points : 0
    feature edges  : 0
    of which
        region edges  : 0
        external edges : 0
        internal edges : 0


Final feature set:
    points : 0
    of which
        convex            : 0
        concave            : 0
        mixed              : 0
        non-feature        : 0
    edges  : 0
    of which
        external edges    : 0
        internal edges    : 0
        flat edges        : 0
        open edges        : 0
        multiply connected : 0

Writing extendedFeatureEdgeMesh to "/home/lowmach1/production_runs/20180820-001/constant/extendedFeatureEdgeMesh/front-wheel-r500-2.extendedFeatureEdgeMesh"

Writing extendedEdgeMesh components to "/home/lowmach1/production_runs/20180820-001/constant/extendedFeatureEdgeMesh/front-wheel-r500-2"
Writing 0 convex feature points to "/home/lowmach1/production_runs/20180820-001/constant/extendedFeatureEdgeMesh/front-wheel-r500-2_convexFeaturePts.obj"
Writing 0 concave feature points to "/home/lowmach1/production_runs/20180820-001/constant/extendedFeatureEdgeMesh/front-wheel-r500-2_concaveFeaturePts.obj"
Writing 0 mixed feature points to "/home/lowmach1/production_runs/20180820-001/constant/extendedFeatureEdgeMesh/front-wheel-r500-2_mixedFeaturePts.obj"
Writing 0 mixed feature point structure to "/home/lowmach1/production_runs/20180820-001/constant/extendedFeatureEdgeMesh/front-wheel-r500-2_mixedFeaturePtsStructure.obj"
Writing 0 external edges to "/home/lowmach1/production_runs/20180820-001/constant/extendedFeatureEdgeMesh/front-wheel-r500-2_externalEdges.obj"
Writing 0 internal edges to "/home/lowmach1/production_runs/20180820-001/constant/extendedFeatureEdgeMesh/front-wheel-r500-2_internalEdges.obj"
Writing 0 flat edges to "/home/lowmach1/production_runs/20180820-001/constant/extendedFeatureEdgeMesh/front-wheel-r500-2_flatEdges.obj"
Writing 0 open edges to "/home/lowmach1/production_runs/20180820-001/constant/extendedFeatureEdgeMesh/front-wheel-r500-2_openEdges.obj"
Writing 0 multiple edges to "/home/lowmach1/production_runs/20180820-001/constant/extendedFeatureEdgeMesh/front-wheel-r500-2_multipleEdges.obj"
Writing 0 region edges to "/home/lowmach1/production_runs/20180820-001/constant/extendedFeatureEdgeMesh/front-wheel-r500-2_regionEdges.obj"
Writing 0 edge directions to "/home/lowmach1/production_runs/20180820-001/constant/extendedFeatureEdgeMesh/front-wheel-r500-2_edgeDirections.obj"

Writing featureEdgeMesh to "/home/lowmach1/production_runs/20180820-001/constant/triSurface/front-wheel-r500-2.eMesh"

I can successfully generate an eMesh file if I replace ‘front-wheel-r500-2.stl’ with ‘front-wheel-hedJet6.stl’ (see attached files: ‘front-wheel-hedJet6.stl’, ‘front-wheel-hedJet6.eMesh’, and 'surfaceFeatureExtract.log.201808221849.hedJet6'). The geometries represented by the files ‘front-wheel-r500-2.stl’ and ‘front-wheel-hedJet6.stl’ are very similar; both bicycle wheels, but each with a different rim.

The .stl files are generated from CAD files of .x_b format using SolidWorks. I have tried generating .stl using various optional settings in SolidWorks, but still no success.

Any suggestions to help diagnose this problem would be much appreciated.

Thanks,

Howard

senthilathiban August 24, 2018 09:44

sometimes there may be error due to stl file.. Try with an ASCII version of stl file. And also u need a closed geometry.


All times are GMT -4. The time now is 10:04.