fixes
build and deploy Speckle functions / publish-automate-function-version (push) Has been cancelled
build and deploy Speckle functions / publish-automate-function-version (push) Has been cancelled
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
"dockerFile": "../Dockerfile",
|
||||
|
||||
// Use 'postCreateCommand' to run commands after the container is created.
|
||||
// "postCreateCommand": "poetry install --no-root",
|
||||
"postCreateCommand": "poetry install --no-root",
|
||||
|
||||
// Configure tool-specific properties.
|
||||
"customizations": {
|
||||
|
||||
@@ -4,8 +4,6 @@ dist/
|
||||
*.egg-info/
|
||||
.cache/
|
||||
*.log
|
||||
.ruff_cache/
|
||||
.venv/
|
||||
.env/
|
||||
.git/
|
||||
Dockerfile copy*
|
||||
Regular → Executable
@@ -247,3 +247,5 @@ COPY . /home/speckle
|
||||
# Using poetry, we generate a list of requirements, save them to requirements.txt, and then use pip to install them
|
||||
RUN poetry export --format requirements.txt --output /home/speckle/requirements.txt --without-hashes && \
|
||||
pip install --requirement /home/speckle/requirements.txt
|
||||
|
||||
RUN poetry install --no-root
|
||||
+2
-2
@@ -46,7 +46,7 @@ def detect_clashes_old(
|
||||
continue
|
||||
|
||||
intersection = pymesh.boolean(
|
||||
latest_pymesh, operation="intersection"
|
||||
latest_pymesh, ref_pymesh, operation="intersection"
|
||||
)
|
||||
|
||||
if (
|
||||
@@ -82,7 +82,7 @@ def check_for_clash(
|
||||
if not ref_pymesh or not latest_pymesh:
|
||||
continue
|
||||
|
||||
intersection = pymesh.boolean(latest_pymesh, operation="intersection")
|
||||
intersection = pymesh.boolean(latest_pymesh, ref_pymesh, operation="intersection")
|
||||
if intersection and intersection.volume > 0:
|
||||
severity = intersection.volume / min(
|
||||
ref_pymesh.volume, latest_pymesh.volume
|
||||
|
||||
@@ -36,8 +36,6 @@ class FunctionInputs(AutomateBase):
|
||||
title="Static Model Name",
|
||||
description="Name of the static structural model.",
|
||||
)
|
||||
|
||||
|
||||
tolerance: float = Field(
|
||||
default=25.0,
|
||||
title="Tolerance",
|
||||
@@ -129,17 +127,12 @@ def automate_function(
|
||||
speckle_to_element(obj) for obj in latest_displayable_objects
|
||||
]
|
||||
|
||||
# using trimesh library process all these meshes in the form of A vs B
|
||||
# and get the clashes
|
||||
tolerance = function_inputs.tolerance
|
||||
|
||||
clashes = detect_and_report_clashes(
|
||||
reference_mesh_elements, latest_mesh_elements, tolerance, automate_context
|
||||
)
|
||||
|
||||
# all object count
|
||||
# all reference objects count
|
||||
# all latest objects count
|
||||
|
||||
percentage_reference_objects_clashing = (
|
||||
len(set([ref_id for ref_id, latest_id, severity in clashes]))
|
||||
/ len(reference_mesh_elements)
|
||||
|
||||
Generated
+15
-1
@@ -796,6 +796,20 @@ tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""}
|
||||
[package.extras]
|
||||
testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"]
|
||||
|
||||
[[package]]
|
||||
name = "python-dotenv"
|
||||
version = "1.0.0"
|
||||
description = "Read key-value pairs from a .env file and set them as environment variables"
|
||||
optional = false
|
||||
python-versions = ">=3.8"
|
||||
files = [
|
||||
{file = "python-dotenv-1.0.0.tar.gz", hash = "sha256:a8df96034aae6d2d50a4ebe8216326c61c3eb64836776504fcca410e5937a3ba"},
|
||||
{file = "python_dotenv-1.0.0-py3-none-any.whl", hash = "sha256:f5971a9226b701070a4bf2c38c89e5a3f0d64de8debda981d1db98583009122a"},
|
||||
]
|
||||
|
||||
[package.extras]
|
||||
cli = ["click (>=5.0)"]
|
||||
|
||||
[[package]]
|
||||
name = "requests"
|
||||
version = "2.31.0"
|
||||
@@ -1274,4 +1288,4 @@ multidict = ">=4.0"
|
||||
[metadata]
|
||||
lock-version = "2.0"
|
||||
python-versions = "^3.10"
|
||||
content-hash = "3abedc1c21df21ba5ab28f1ea6dc49c8a84c768e0f8f155e5c619ca3fd023765"
|
||||
content-hash = "e4e56818583a9f0fad2adbfbc4dcb2ebaa1fc8f917004477f0e1574237b7850a"
|
||||
|
||||
@@ -15,6 +15,7 @@ black = "^23.3.0"
|
||||
mypy = "^1.3.0"
|
||||
ruff = "^0.0.271"
|
||||
pytest = "^7.4.2"
|
||||
python-dotenv = "^1.0.0"
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core"]
|
||||
|
||||
Reference in New Issue
Block a user