This repository has been archived on 2022-02-01. You can view files and clone it, but cannot push or open issues or pull requests.
openfoam_project/openfoam/run/stl.py

13 lines
348 B
Python

import shutil
import logging
log = logging.getLogger('stl')
def copy_stl(stl, case):
stl_dir = case.joinpath('constant', 'triSurface')
if stl_dir.exists():
log.info(f'Deleting stl directory ({stl_dir})')
shutil.rmtree(stl_dir)
log.info(f'Copying stl directory ({stl} -> {stl_dir})')
shutil.copytree(stl, stl_dir)