From: rnc Date: Fri, 2 Mar 2012 10:00:38 +0000 (+0000) Subject: Modified test of wire closeness X-Git-Tag: V6_5_0a1~52 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f9d4ef6d5305ce5455a4e24272d110fe31f997f5;p=modules%2Fgeom.git Modified test of wire closeness --- diff --git a/src/GEOMImpl/GEOMImpl_PrismDriver.cxx b/src/GEOMImpl/GEOMImpl_PrismDriver.cxx index 6387f7df9..f6c2b5a53 100644 --- a/src/GEOMImpl/GEOMImpl_PrismDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_PrismDriver.cxx @@ -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");