Hi everyone,
I want to verify if a quadrilateral is a rectangle or not.
I thought may be about the angles ( if one of them is different from 0.5*Pi )
Thank you

Probably a million ways to do this; here is but one. BTW, I didnâ€™t use `Equal` to test for equality of areas because of floating point errors, a common complaint on this forum.

is rectangle.gh (9.9 KB)

1 Like

I think the first thing you need to check is if itâ€™s planar or not.

thank you it works correctly

It will not work in some special casesâ€¦

is rectangle_2.gh (11.9 KB)

" Nothing will ever be attempted if all possible objections must first be overcome." - Samuel Johnson

I assumed that @Maya_Lily knew what kind of shapes she was working with, but hereâ€™s something to address the degenerate quad case.

is rectangle_3.gh (12.0 KB)

In general case, an arbitrary curve is rectangle if:

• is closed curve
• is planar curve
• is polyline
• all angles at discontinuity equal to Pi/2

Is_Rectangle_v1.gh (20.2 KB)

my question was just for quadrilaterals, but I have more shapes (rectangle, rectangle+arc, rectangle+2 arcs, segment++arc, cercle, ellipse and â€śotherâ€ť)
Like in the file below

base_identification.gh (16.6 KB)

some basic type of curvesâ€¦

CurveType_v2.gh (7.6 KB)

itâ€™s ok for circle and elipse. But for unknown i want to identify them more in my case i Have : â€śrectangleâ€ť, â€śsegment+arcâ€ť; â€śrectangle+arcâ€ť; â€śrectangle+2 arcsâ€ť and â€śotherâ€ť
So in total I have 7 types

Why didnâ€™t you asked for this in the beginning? People could save time if you canâ€™t even need their solutions to your initial question.

I said that the solution of @akilli is ok for me and I thank him a lot for that , so I added his solution to my original workâ€¦ but when people continue trying, I mentioned that my purpose is not to evaluate all the shapes in the world just the seven types related my workâ€¦ I didnâ€™t want to ask about everything to donâ€™t think that I need someone to work in my place, it was just a question about somenthing specific that I can reshape according to my needâ€¦
So Iâ€™m not loosing people their time, if itâ€™s true Iâ€™m sorry @tim.stark