Skip to content

Commit a928f89

Browse files
committed
FIX: catching non-planar faces
1 parent f32b840 commit a928f89

File tree

4 files changed

+997
-257
lines changed

4 files changed

+997
-257
lines changed

deps/eigen

Submodule eigen updated from 9099c5e to b5feca5

src/gh/diffCheck/diffCheck/df_joint_detector.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
import diffCheck.df_util
99
import diffCheck.df_transformations
1010

11+
from Grasshopper.Kernel import GH_RuntimeMessageLevel as RML
12+
1113

1214
@dataclass
1315
class JointDetector:
@@ -153,10 +155,11 @@ def run(self) :
153155
if f_b is not None:
154156
if f_b.IsSolid:
155157
self._cuts.append(f_b)
156-
for f_b in non_flat_faces_b:
157-
if f_b is not None:
158-
if f_b.IsSolid:
159-
self._holes.append(f_b)
158+
if non_flat_faces_b is not None and len(non_flat_faces_b) > 0:
159+
for f_b in non_flat_faces_b:
160+
if f_b is not None:
161+
if f_b.IsSolid:
162+
self._holes.append(f_b)
160163

161164
############################################################################
162165
# 3. Sort faces from joints and faces from sides
@@ -195,4 +198,7 @@ def run(self) :
195198
if not is_joint:
196199
self._faces.append([f, None])
197200

201+
if self._faces is None or len(self._faces) == 0:
202+
ghenv.Component.AddRuntimeMessage(RML.Error, "No faces found after joint detection.")
203+
198204
return self._faces

src/gh/diffCheck/diffCheck/diffCheck_app.py renamed to src/gh/diffCheck/diffCheck_app.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,8 @@
99
import diffCheck
1010
import diffCheck.df_geometries
1111

12-
import sys
13-
import importlib
14-
for key in list(sys.modules.keys()):
15-
if "diffCheck" in key:
16-
importlib.reload(sys.modules[key])
12+
print(diffCheck.__version__)
13+
1714

1815
if __name__ == "__main__":
1916
"""
@@ -22,6 +19,7 @@
2219
:param i_export_dir: directory to export the xml
2320
:param i_dump: whether to dump the xml
2421
"""
22+
# data_faces = diffCheck.df_joint_detector.JointDetector(i_breps[0]).run()
2523
# beams
2624
beams = []
2725
for brep in i_breps:

0 commit comments

Comments
 (0)