Problem of vizualisation

My purpose is to classify the shapes I have into 7 types:

  1. Rectangle+arc
  2. Rectangle +2 arcs
  3. Segment + arc
  4. Cercle
  5. Ellipse
  6. Rectangle
  7. Autre (the rest of the shapes are autre (other) the shapes différent from rectangle are considered autre also ( other))
    I did the work but the problem is still in the “rectangle” and “other” it vizualise it twice, certainly I made a mistake but I didn’t know where and I couldn’t solve it :frowning:

Autre and (20.2 KB)

Hello, bonjour
here is a simple way to deal with your problem. I hope I understood. Your rectangle seems to be “quadrilateres” but by the way if you plug the output of explode into a text box you get a text box with the name of the curve. I replace the text by a number. These number are summed and the result of each sum is a characteristic of a shape. For example of 1000 it is an Ellipse …

Autre and (17.7 KB)

A version even more simple and more robust (other curves types = 10000) with sets components

Autre and (17.2 KB)

1 Like

hi, it seems efficient but the trapeze it’s a quadrilateral not a rectangle, so in my study I classify it in “Autre” (Other) ( my work at first classify them “rectangle”, so I made the solution longer in order to solve the problem, that’s why I have the problem of 2 text instead of one)^^

Not on my pc now but the solution could to first classify curve as rectangle or not. I think there was a topic on this subject.

Ok, but my solution is not wrong I think I want juste to revise it my only problem is how to delete the two texts when it’s a rectangle, and the word rectangle when it’s trapeze and keep autre… I don’t know if you see what I mean :slight_smile:

In the second instance, you dispatch the rectangles again, but still use the old ones for text tag. => doubled text. And because you use the geometry and not the center as location for the text, it was in the bottom edge.

Autre and (23.7 KB)

1 Like

Ok I didn’t answer to your question :sweat_smile: and give you another way of doing. The good solution is the one you master, so for you it is yours with Tim modification :grinning: .

Just if question come back and for others, it is possible to plug a rectangle component and then tocompare the length if length are the same the original shape has great probability to be a rectangle. Not 100 % but it works here. You could use equality with Tolerance from Pufferfish or legacy component

1 Like

I really appreciate your solution, the point that I’m looking for is to distinguish between rectangles and other quadrelaterals ( trapeze here) because the shapes I’m working on are not million ones, juste some :smiley: …that’s why I thought about the comparaison between the 2 short segments and the 2 long ones… :slight_smile: thank you so much @laurent_delrieu

1 Like

Thank you :slight_smile: