Thank you for your answer, I was losing hope !
You give me a good line of research, I had not noticed that the unwanted items were located on the extensions of segments.
Unfortunately, my final object will not only have 3 segments, I do not know yet how to get out. Perhaps, I may do this by writing a function to determine if an item is on a segment.
Thanks for your help !