Skip to content

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

Open

Description

@eleniv3d

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

Activity

  1. 9and3 commented on Sep 24, 2024

    @9and3
    Contributor

    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.

  2. eleniv3d commented on Sep 24, 2024

    @eleniv3d
    CollaboratorAuthor
  3. 9and3 commented on Sep 24, 2024

    @9and3
    Contributor

    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)?

  4. 9and3 commented on Sep 25, 2024

    @9and3
    Contributor

    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 👐

  5. 9and3 commented on Sep 30, 2024

    @9and3
    Contributor

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

  6. DamienGilliard commented on Sep 30, 2024

    @DamienGilliard
    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.

  7. 9and3 commented on Sep 30, 2024

    @9and3
    Contributor

    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

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions