Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f765ebd6bb |
+1
-4
@@ -1,10 +1,7 @@
|
||||
from concurrent.futures import ProcessPoolExecutor, as_completed
|
||||
from typing import List, Tuple, Any, Optional
|
||||
|
||||
try:
|
||||
import pymesh
|
||||
except ImportError:
|
||||
pymesh = None # Or handle it in another appropriate way
|
||||
import pymesh
|
||||
|
||||
from speckle_automate import AutomationContext
|
||||
|
||||
|
||||
+13
-5
@@ -1,13 +1,21 @@
|
||||
from typing import Union, Type
|
||||
from typing import Union, Type, TYPE_CHECKING
|
||||
|
||||
|
||||
import pymesh
|
||||
|
||||
try:
|
||||
import pymesh
|
||||
except ImportError:
|
||||
pymesh = None
|
||||
|
||||
import trimesh
|
||||
|
||||
|
||||
class MockPyMesh:
|
||||
def __init__(self, vertices, faces):
|
||||
self.vertices = vertices or []
|
||||
self.faces = faces or []
|
||||
|
||||
def boolean(self, other, operation):
|
||||
return MockPyMesh([], [])
|
||||
|
||||
|
||||
def trimesh_to_pymesh(mesh: trimesh.Trimesh) -> pymesh.Mesh:
|
||||
"""
|
||||
Convert a Trimesh object to a Pymesh object.
|
||||
|
||||
Generated
-1266
File diff suppressed because it is too large
Load Diff
@@ -9,6 +9,7 @@ readme = "README.md"
|
||||
python = "^3.10"
|
||||
specklepy = "2.17.11"
|
||||
trimesh = "^4.0.4"
|
||||
pymesh = {git = "https://github.com/PyMesh/PyMesh.git"}
|
||||
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
black = "^23.3.0"
|
||||
|
||||
Reference in New Issue
Block a user