CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums

Utility 01 - buildRegionSTL

Register Blogs Community New Posts Updated Threads Search

Rate this Entry

Utility 01 - buildRegionSTL

Posted July 21, 2018 at 10:52 by student666
Updated September 22, 2018 at 13:53 by student666

Following code has to be copied into your ./bashrc on linux system to merge toghether several STL files saved into cad/stl folder.


For more details, have a look to this screen cast
https://www.youtube.com/watch?v=CZvU...OvvbOv&index=1



thanks Tobi

Code:
function buildRegionSTL() {
    if [ -d "cad/stl" ]
    then
        if [ "$#" -ne 1 ]
        then
        mkdir -p constant/triSurface
        cd cad/stl
        for i in $(ls *.stl)
        do
            sed -e 1c"solid ${i%.*}" $i -i
        done
        rm ../../constant/triSurface/regionSTL.stl -f 
        cat * > ../../constant/triSurface/regionSTL.stl
        cd ../../
        
    fi
    else 
    echo "folder cad/stl does not exist"
fi
}
Posted in Pre-processing
Views 1168 Comments 0 Edit Tags Email Blog Entry
« Prev     Main     Next »
Total Comments 0

Comments

 

All times are GMT -4. The time now is 22:25.