Hi,
My purpose is to classify the shapes I have into 7 types:
Rectangle+arc
Rectangle +2 arcs
Segment + arc
Cercle
Ellipse
Rectangle
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
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 …
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)^^
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
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.
Ok I didn’t answer to your question and give you another way of doing. The good solution is the one you master, so for you it is yours with Tim modification .
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
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 …that’s why I thought about the comparaison between the 2 short segments and the 2 long ones… thank you so much @laurent_delrieu