From e2cb6505ebaaf48cd783fe590117ff98695a46c9 Mon Sep 17 00:00:00 2001 From: oguzhankoral Date: Mon, 30 Oct 2023 15:18:32 +0300 Subject: [PATCH] Add legend point to vtk_to_speckle --- main.py | 3 ++- poetry.lock | 8 ++++---- pyproject.toml | 2 +- tests/test_function.py | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/main.py b/main.py index 3bf8cfc..e07f57d 100644 --- a/main.py +++ b/main.py @@ -5,6 +5,7 @@ import os import subprocess +from archaea.geometry.vector3d import Vector3d from archaea.geometry.mesh import Mesh from archaea_simulation.simulation_objects.domain import Domain from archaea_simulation.speckle.vtk_to_speckle import vtk_to_speckle @@ -139,7 +140,7 @@ def automate_function( vtk_file = os.path.join(case_folder, 'postProcessing', 'cutPlaneSurface', '400', 'U_cutPlane.vtk') - result_mesh = vtk_to_speckle(vtk_file) + result_mesh = vtk_to_speckle(vtk_file, domain.center.move(Vector3d(domain.x / 2, -domain.y / 2, 0))) result = Base() result.data = [result_mesh] diff --git a/poetry.lock b/poetry.lock index 6413871..d174376 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1441,13 +1441,13 @@ files = [ [[package]] name = "specklepy" -version = "2.17.8" +version = "2.17.9" description = "The Python SDK for Speckle 2.0" optional = false python-versions = ">=3.8.0,<4.0" files = [ - {file = "specklepy-2.17.8-py3-none-any.whl", hash = "sha256:76494676bd3bafc2e222d4c3b0f22a2316781f9c9ac200067fb5fe4d1de3e2c7"}, - {file = "specklepy-2.17.8.tar.gz", hash = "sha256:9e066b67c0edc478c4f2d949e7662f7535a058189d9fb8d6eabad550c0b88c04"}, + {file = "specklepy-2.17.9-py3-none-any.whl", hash = "sha256:d3223e69197b07b28b469d29a2a5baf832a3dea6c3b493d7c20b692da57685e6"}, + {file = "specklepy-2.17.9.tar.gz", hash = "sha256:e0b7d7f46c7a65145f8b8b3bb5c9d5a4f97591db786a68e2c53351c026b92030"}, ] [package.dependencies] @@ -1867,4 +1867,4 @@ multidict = ">=4.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "4261d221953c8791636c93698ba53d39135afb3e0f44e063b35fb95987caf73a" +content-hash = "9c983f1d1ba49b11c8e6a57055b3ad5297bad649faa0b9d063a08078ffc4e489" diff --git a/pyproject.toml b/pyproject.toml index 98a8ed6..2c29c7c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ packages = [{include = "src/speckle_automate_py"}] [tool.poetry.dependencies] python = "^3.10" -specklepy = "2.17.8" +specklepy = "2.17.9" archaea-simulation = "1.1.26" [tool.poetry.group.dev.dependencies] diff --git a/tests/test_function.py b/tests/test_function.py index 6e867a3..b8d3df5 100644 --- a/tests/test_function.py +++ b/tests/test_function.py @@ -142,7 +142,7 @@ def test_function_run(automation_run_data: AutomationRunData, speckle_token: str automate_sdk = run_function( AutomationContext.initialize(automation_run_data, speckle_token), automate_function, - FunctionInputs(wind_speed=10, wind_direction=45), + FunctionInputs(wind_speed=10, wind_direction=45, number_of_cpus=6), ) assert automate_sdk.run_status == AutomationStatus.FAILED