Fixed sws_ola
This commit is contained in:
parent
ba675fb763
commit
a335f2f5ce
19 changed files with 311413 additions and 33 deletions
|
|
@ -20,8 +20,9 @@ log.info("Starting sws -> olaFlow converter")
|
|||
config = configparser.ConfigParser()
|
||||
config.read("config.ini")
|
||||
|
||||
bathy = np.loadtxt(config.get("bathy", "bathy"))
|
||||
poro = bathy + np.loadtxt(config.get("bathy", "hstru"))
|
||||
bathy = np.loadtxt(config.get("bathy", "bathy"))[::-1]
|
||||
hstru = np.loadtxt(config.get("bathy", "hstru"))[::-1]
|
||||
poro = bathy + np.where(hstru == 0, -5, hstru)
|
||||
|
||||
out = pathlib.Path(config.get("bathy", "out"))
|
||||
out.mkdir(exist_ok=True)
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ def stl_from_1d(data, output, scale=[1, 1, 1], translate=[0, 0, 0]):
|
|||
np.savetxt(tmpdir.joinpath("data.dat"), np.stack((data, data)))
|
||||
with open(tmpdir.joinpath("scad"), "wt") as scad:
|
||||
scad.write(
|
||||
f"mirror([1, 0, 0])"
|
||||
f"translate({translate})"
|
||||
f"scale({scale})"
|
||||
f"""surface("data.dat");"""
|
||||
|
|
|
|||
Reference in a new issue