return matrix

This commit is contained in:
KatKatKateryna
2024-02-12 10:28:49 +00:00
parent 9609f1595f
commit 945041e42e
4 changed files with 5 additions and 6 deletions
-1
View File
@@ -2,7 +2,6 @@
1. From the [latest release](https://github.com/specklesystems/speckle-arcgis/releases) download the whl file and the source code zip, unzip and locate the subfolder "speckle_arcgis_installer" on your machine and place whl file in it.
2. Clone the default ArcGIS Pro conda environment (or set the one you use, except the default one) and restart ArcGIS Pro
- for 2.9.0: Project-> Python-> Manage Environments-> Clone Default
- for 3.0.0: Project-> Package Manager-> Active Environment (Environment Manager)-> Clone arcgispro-py3
3. Adjust the path to your new environment python executable (variable "pythonPath" in "speckle_arcgis_installer/toolbox_install_manual.py")
4. Enter the location of 'toolbox_install_manual.py' in the following command and run this command in ArcGIS Python console (View -> Python Window)
@@ -148,7 +148,7 @@ def deconstructSpeckleMesh(mesh: Mesh, dataStorage):
pt_coords = [
mesh.vertices[index_vertices],
mesh.vertices[index_vertices + 1],
scale * mesh.vertices[index_vertices + 2],
mesh.vertices[index_vertices + 2],
]
pt_coords_new = apply_pt_transform_matrix(pt_coords, dataStorage)
face.append([scale * coord for coord in pt_coords_new])
@@ -154,8 +154,8 @@ def apply_pt_transform_matrix(pt_coords: List, dataStorage) -> List:
b = np.matrix(pt_coords + [1])
# print(b)
# print(dataStorage.matrix)
# res = b * dataStorage.matrix
# x, y, z = res.item(0), res.item(1), res.item(2)
res = b * dataStorage.matrix
x, y, z = res.item(0), res.item(1), res.item(2)
return [x, y, z]
except Exception as e:
pass
@@ -1261,7 +1261,7 @@ def addBimMainThread(obj: Tuple):
)
del cur
print("create layer:")
# print("create layer:")
vl = MakeFeatureLayer(
str(f_class), "x" + str(random.randint(100000, 500000))
).getOutput(0)
@@ -1279,7 +1279,7 @@ def addBimMainThread(obj: Tuple):
# print(l.longName)
if l.longName == newGroupName.replace(SYMBOL, "\\") + newName:
vl2 = l
print(l.longName)
# print(l.longName)
break
# print(vl2)