//==================================================================================================
bool GeomAPI_Wire::isRectangle(std::list<GeomPointPtr>& thePoints) const
{
+ thePoints.clear();
+
const TopoDS_Wire& aWire = TopoDS::Wire(impl<TopoDS_Shape>());
const Handle(Standard_Type)& aLineType = STANDARD_TYPE(Geom_Line);
gp_Pnt aStart = aC3D->Value(aT1);
gp_Pnt aEnd = aC3D->Value(aT2);
+ if (aStart.Distance(aEnd) <= Precision::Confusion())
+ return false;
+
// check the edge is orthogonal to the previous
gp_XYZ aCurDir = (aEnd.XYZ() - aStart.XYZ()).Normalized();
if (aPrevDir.Dot(aCurDir) < Precision::Confusion())