+ // fix edges order
+ Handle(ShapeFix_Wire) aFW = new ShapeFix_Wire;
+ aFW->Load(aWire);
+ aFW->FixReorder();
+
+ if (aFW->StatusReorder(ShapeExtend_FAIL1)) {
+ Standard_ConstructionError::Raise("Wire construction failed: several loops detected");
+ } else if (aFW->StatusReorder(ShapeExtend_FAIL)) {
+ Standard_ConstructionError::Raise("Wire construction failed");
+ } else if (aFW->StatusReorder(ShapeExtend_DONE2)) {
+ Standard_ConstructionError::Raise("Wire construction failed: some gaps detected");
+ } else {
+ }
+ aShape = aFW->WireAPIMake();