Skip to content

Commit f75adb4

Browse files
WIP: empty code.py function
1 parent 7eb9f3a commit f75adb4

File tree

1 file changed

+3
-30
lines changed
  • src/gh/components/DF_joint_segmentator

1 file changed

+3
-30
lines changed

src/gh/components/DF_joint_segmentator/code.py

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,8 @@
44
from diffCheck import df_cvt_bindings as df_cvt
55
import diffCheck.df_util
66

7-
def main(pointCloud, breps):
8-
df_scan = df_cvt.cvt_rhcloud_2_dfcloud(pointCloud)
9-
meshes = []
10-
for i in range(breps.BranchCount):
11-
brep_faces = breps.Branch(i)
12-
mesh_faces = []
13-
for brep_face in brep_faces:
14-
mesh_face = Rhino.Geometry.Mesh.CreateFromBrep(brep_face)[0]
15-
mesh_face.Faces.ConvertQuadsToTriangles()
16-
mesh_faces.append(df_cvt.cvt_rhmesh_2_dfmesh(mesh_face))
17-
meshes.append(mesh_faces)
18-
associated_segments = []
19-
20-
# normal segmentation
21-
segments = diffcheck_bindings.dfb_segmentation.DFSegmentation.segment_by_normal(df_scan, 2, 50, True, 20, 10, False)
22-
23-
# for visualisation purposes
24-
rh_segments = []
25-
for segment in segments:
26-
rh_segments.append(df_cvt.cvt_dfcloud_2_rhcloud(segment))
27-
28-
association_results = []
29-
# associate clusters to pieces
30-
for piece in meshes:
31-
associated_segments = diffcheck_bindings.dfb_segmentation.DFSegmentation.associate_clusters(piece, segments)
32-
diffcheck_bindings.dfb_segmentation.DFSegmentation.clean_unassociated_clusters(segments, associated_segments, piece)
33-
association_results.append(associated_segments)
34-
35-
return association_results
7+
def main():
8+
passS
369

3710
if __name__ == "__main__":
38-
a = main(pointCloud, breps)
11+
a = main()

0 commit comments

Comments
 (0)