]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Modified test of wire closeness
authorrnc <rnc@opencascade.com>
Fri, 2 Mar 2012 10:00:38 +0000 (10:00 +0000)
committerrnc <rnc@opencascade.com>
Fri, 2 Mar 2012 10:00:38 +0000 (10:00 +0000)
src/GEOMImpl/GEOMImpl_PrismDriver.cxx

index 6387f7df903ee2d36dd3b687bad5bfa66320b38e..f6c2b5a538c71627ed0c7892bd38352cd9c86428 100644 (file)
@@ -229,6 +229,11 @@ Standard_Integer GEOMImpl_PrismDriver::Execute(TFunction_Logbook& log) const
       Standard_ConstructionError::Raise("The input sketch is neither a wire nor an edge");
     }
     
+    TopoDS_Vertex aV1, aV2;
+    TopExp::Vertices(aWire, aV1, aV2);
+    if ( !aV1.IsNull() && !aV2.IsNull() && aV1.IsSame(aV2) )
+      aWire.Closed( true );
+    
     if (!aWire.Closed())
       Standard_ConstructionError::Raise("The wire has to be closed");