diffCheckOrg / diffCheck

diffCheck is a CAD-integrated tool for evaluating digital timber fabrication processes.
https://diffcheckorg.github.io/diffCheck/
GNU General Public License v3.0
3 stars 2 forks source link

Joint Segmentator Doesn't Calculate correctly the total amount of joints #120

Open eleniv3d opened 1 week ago

eleniv3d commented 1 week ago

assembly For this assembly, it was trying to find 4 joints. Switching from i_assembly.total_number_joints to len(i_assembly._all_joints) did the trick

Screenshot 2024-09-23 111627

9and3 commented 1 week ago

Hello @eleniv3d , I belive that you might running on a branch not updated with the current main. In the main the DFAssembly.total_number_joints does not exists:

https://github.com/diffCheckOrg/diffCheck/blob/f205939f1e1a7cb68b271744f789605c1a0d274f/src/gh/diffCheck/diffCheck/df_geometries.py#L403-L423

Nevertheless, the way you are doing it is the correct one.

eleniv3d commented 1 week ago

I believe it is like that on the main :) @9and3

https://github.com/diffCheckOrg/diffCheck/blob/main/src/gh/components/DF_joint_segmentator/code.py

9and3 commented 1 week ago

Apologies @eleniv3d I didn't get you are referring to the DFJointSegmentator. Acutally we do have a property in DFAssembly (my bad sorry again):

@property
    def total_number_joints(self):
        return max([joint.id for joint in self.all_joints]) + 1

In your scenario how many joints do you obtain (wrongly)?

9and3 commented 1 week ago

we discussed with @DamienGilliard , he's a bit busy at the moment but since it's touching the segmentation Python component he will take care of solving this. Thanks for bringing this up @eleniv3d 👐

9and3 commented 6 days ago

@DamienGilliard / @eleniv3d , do you know the status on this one?

DamienGilliard commented 6 days ago

@9and3 , @eleniv3d , it is still on my desk. The workaround of Eleni works fine I believe, but this must be fixed. I have planned to work on diffcheck this afternoon, I'll try to get it fixed then.

9and3 commented 6 days ago

Great, let me know, you can link this issue to the PR you are opening so we know is tracked ! 👐