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

14 lines
348 B
Python
Raw Normal View History

2022-01-26 18:06:08 +01:00
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)