surfaceTransformPoints: Generalised to apply a sequence of transformations

The transformation sequence is specified like a substitution string used by

Description
    Transform (translate, rotate, scale) a surface.

    The rollPitchYaw option takes three angles (degrees):
    - roll (rotation about x) followed by
    - pitch (rotation about y) followed by
    - yaw (rotation about z)

    The yawPitchRoll does yaw followed by pitch followed by roll.

Usage
    \b surfaceTransformPoints "\<transformations\>" \<input\> \<output\>

    Example usage:
        surfaceTransformPoints \
            "translate=(-0.586 0 -0.156), \
            rollPitchYaw=(0 -3.485 0), \
            translate=(0.586 0 0.156)" \
            constant/geometry/w3_orig.stl constant/geometry/w3.stl
This commit is contained in:
Henry Weller
2021-03-28 13:36:50 +01:00
parent 516ee1675e
commit 45dca30c51
3 changed files with 83 additions and 124 deletions

View File

@ -4,12 +4,11 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
runApplication surfaceTransformPoints -translate '(-0.586 0 -0.156)' \
constant/geometry/w3_orig.stl constant/geometry/w3.stl
runApplication -a surfaceTransformPoints -rollPitchYaw '(0 -3.485 0)' \
constant/geometry/w3.stl constant/geometry/w3.stl
runApplication -a surfaceTransformPoints -translate '(0.586 0 0.156)' \
constant/geometry/w3.stl constant/geometry/w3.stl
runApplication surfaceTransformPoints \
"translate=(-0.586 0 -0.156), \
rollPitchYaw=(0 -3.485 0), \
translate=(0.586 0 0.156)" \
constant/geometry/w3_orig.stl constant/geometry/w3.stl
runApplication surfaceFeatures

View File

@ -4,12 +4,11 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
runApplication surfaceTransformPoints -translate '(-0.586 0 -0.156)' \
constant/geometry/w3_orig.stl constant/geometry/w3.stl
runApplication -a surfaceTransformPoints -rollPitchYaw '(0 -3.485 0)' \
constant/geometry/w3.stl constant/geometry/w3.stl
runApplication -a surfaceTransformPoints -translate '(0.586 0 0.156)' \
constant/geometry/w3.stl constant/geometry/w3.stl
runApplication surfaceTransformPoints \
"translate=(-0.586 0 -0.156), \
rollPitchYaw=(0 -3.485 0), \
translate=(0.586 0 0.156)" \
constant/geometry/w3_orig.stl constant/geometry/w3.stl
runApplication surfaceFeatures