44 lines
1.4 KiB
Bash
Executable File
44 lines
1.4 KiB
Bash
Executable File
#!/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
|
|
runApplication surfaceOrient \
|
|
constant/triSurface/coneAndSphere_clean.obj \
|
|
-inside '(0 -0.5 0)' \
|
|
constant/triSurface/coneAndSphere_clean_orient.obj
|
|
mv log.surfaceOrient log.surfaceOrient.coneAndSphere
|
|
|
|
# Same for outside
|
|
runApplication surfaceClean \
|
|
constant/triSurface/domain.stl \
|
|
1e-4 1e-6 \
|
|
constant/triSurface/domain_clean.stl
|
|
mv log.surfaceClean log.surfaceClean.domain
|
|
runApplication surfaceOrient \
|
|
constant/triSurface/domain_clean.stl \
|
|
-inside '(0 -0.5 0)' \
|
|
constant/triSurface/domain_clean_orient.stl
|
|
mv log.surfaceOrient log.surfaceOrient.domain
|
|
|
|
unset FOAM_SIGFPE
|
|
runApplication surfaceFeatureExtract
|
|
|
|
# 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
|