Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
eleniv3d opened this issue Sep 23, 2024 · 7 comments
Open
Assignees
Labels
bug Something isn't working grasshopper PythonAPI

Comments

@eleniv3d
Copy link
Collaborator

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 9and3 added bug Something isn't working grasshopper PythonAPI labels Sep 24, 2024
@9and3
Copy link
Contributor

9and3 commented Sep 24, 2024

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:

class DFAssembly:
"""
This class represents an assembly of beams
"""
beams: typing.List[DFBeam]
name: str
def __post_init__(self):
self.beams = self.beams
for idx, beam in enumerate(self.beams):
beam._index_assembly = idx
self.__uuid = uuid.uuid4().int
self.name = self.name or "Unnamed Assembly"
self._all_jointfaces: typing.List[DFFace] = []
self._all_sidefaces: typing.List[DFFace] = []
self._all_vertices: typing.List[DFVertex] = []
self._all_joints: typing.List[DFJoint] = []

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

@eleniv3d
Copy link
Collaborator Author

eleniv3d commented Sep 24, 2024

@9and3
Copy link
Contributor

9and3 commented Sep 24, 2024

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
Copy link
Contributor

9and3 commented Sep 25, 2024

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
Copy link
Contributor

9and3 commented Sep 30, 2024

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

@DamienGilliard
Copy link
Collaborator

@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
Copy link
Contributor

9and3 commented Sep 30, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working grasshopper PythonAPI
Projects
None yet
Development

No branches or pull requests

3 participants