Skip to content

Commit ad3a8cb

Browse files
committed
WIP-FIX. got rid of pycache in gitignore
1 parent 4d7e015 commit ad3a8cb

File tree

8 files changed

+17
-4
lines changed

8 files changed

+17
-4
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ temp/
8585
## Python
8686
#######################################
8787
# Byte-compiled / optimized / DLL files
88-
__pycache__/
88+
**/__pycache__/
8989
*.py[cod]
9090
*$py.class
9191

-324 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-3.16 KB
Binary file not shown.

src/gh/diffCheck/diffCheck/df_joint_detector.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,27 @@ def _compute_mass_center(self, b_face: rg.BrepFace) -> rg.Point3d:
4343

4444
def run(self) :
4545
"""
46-
Run the joint detector
46+
Run the joint detector. We use a dictionary to store the faces of the cuts based wethear they are cuts or holes.
47+
- for cuts: If it is a cut we return the face, and the id of the joint the faces belongs to.
48+
- for sides: If it is a face from the sides, we return the face and None.
49+
4750
:return: a list of faces from joins and faces
4851
"""
52+
############################################################################
53+
# [*] If the timber has 6 faces, it is a box, return the faces
54+
############################################################################
55+
if len(self.brep.Faces) == 6:
56+
pass
57+
# get the two smallest faces as the cuts
58+
59+
4960
############################################################################
5061
# 1. Bring to XY, mamke AABB and get negative boolean difference
5162
############################################################################
5263
# bring to plane xy
5364
x_form = diffCheck.df_transformations.pln_2_pln_world_transform(self.brep)
65+
if x_form is None:
66+
return None
5467

5568
# reverse the transformation
5669
x_form_back = diffCheck.df_transformations.get_inverse_transformation(x_form)

src/gh/diffCheck/diffCheck/df_transformations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ def _get_lowest_brep_vertex(brep) -> Rhino.Geometry.Point3d:
8282

8383
# get the plane of the biggest face
8484
if biggest_face.TryGetPlane()[0] is False:
85-
log.error("Could not find plane for longest edge. Exiting...")
86-
return
85+
raise ValueError("The face is not planar")
86+
return None
8787
plane_src = biggest_face.TryGetPlane()[1]
8888
plane_tgt = Rhino.Geometry.Plane.WorldXY
8989

0 commit comments

Comments
 (0)