#!/bin/sh cd ${0%/*} || exit 1 # run from this directory # Source tutorial run functions . $WM_PROJECT_DIR/bin/tools/RunFunctions # Remove any small triangles (edges < 1e-4, sliver with Q < 1e-6) from surface # (cvMesh will try to conform to every feature). runApplication surfaceClean \ constant/triSurface/coneAndSphere.obj \ 1e-4 1e-6 \ constant/triSurface/coneAndSphere_clean.obj mv log.surfaceClean log.surfaceClean.coneAndSphere # Orient so point to be meshed is inside surface surfaceOrient \ constant/triSurface/coneAndSphere_clean.obj \ -inside '(0 -0.5 0)' \ constant/triSurface/coneAndSphere_clean_orient.obj \ > log.surfaceOrient.coneAndSphere 2>&1 # Same for outside runApplication surfaceClean \ constant/triSurface/domain.stl \ 1e-4 1e-6 \ constant/triSurface/domain_clean.stl mv log.surfaceClean log.surfaceClean.domain surfaceOrient \ constant/triSurface/domain_clean.stl \ -inside '(0 -0.5 0)' \ constant/triSurface/domain_clean_orient.stl > log.surfaceOrient.domain 2>&1 runApplication surfaceFeatureExtract \ constant/triSurface/coneAndSphere_clean_orient.obj \ coneAndSphere -includedAngle 125 mv log.surfaceFeatureExtract log.surfaceFeatureExtract.coneAndSphere_clean unset FOAM_SIGFPE runApplication surfaceFeatureExtract \ constant/triSurface/domain_clean_orient.stl \ domain -includedAngle 125 mv log.surfaceFeatureExtract log.surfaceFeatureExtract.domain # Generate aligned points (in constant/internalDelaunayVertices) and a # mesh from that. runApplication cvMesh # Generate some sets for a bit of mesh inspection runApplication topoSet -constant -time 0:100 # ----------------------------------------------------------------- end-of-file