Skip to content

Commit

Permalink
FIX: catching non-planar faces
Browse files Browse the repository at this point in the history
  • Loading branch information
9and3 committed Apr 17, 2024
1 parent f32b840 commit a928f89
Show file tree
Hide file tree
Showing 4 changed files with 997 additions and 257 deletions.
2 changes: 1 addition & 1 deletion deps/eigen
Submodule eigen updated from 9099c5 to b5feca
14 changes: 10 additions & 4 deletions src/gh/diffCheck/diffCheck/df_joint_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import diffCheck.df_util
import diffCheck.df_transformations

from Grasshopper.Kernel import GH_RuntimeMessageLevel as RML


@dataclass
class JointDetector:
Expand Down Expand Up @@ -153,10 +155,11 @@ def run(self) :
if f_b is not None:
if f_b.IsSolid:
self._cuts.append(f_b)
for f_b in non_flat_faces_b:
if f_b is not None:
if f_b.IsSolid:
self._holes.append(f_b)
if non_flat_faces_b is not None and len(non_flat_faces_b) > 0:
for f_b in non_flat_faces_b:
if f_b is not None:
if f_b.IsSolid:
self._holes.append(f_b)

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

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

return self._faces
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,8 @@
import diffCheck
import diffCheck.df_geometries

import sys
import importlib
for key in list(sys.modules.keys()):
if "diffCheck" in key:
importlib.reload(sys.modules[key])
print(diffCheck.__version__)


if __name__ == "__main__":
"""
Expand All @@ -22,6 +19,7 @@
:param i_export_dir: directory to export the xml
:param i_dump: whether to dump the xml
"""
# data_faces = diffCheck.df_joint_detector.JointDetector(i_breps[0]).run()
# beams
beams = []
for brep in i_breps:
Expand Down
Loading

0 comments on commit a928f89

Please sign in to comment.