From: gdd Date: Wed, 15 Jun 2011 13:19:24 +0000 (+0000) Subject: rnc: Added a control in order to prevent the Shape driver from building invalid edges... X-Git-Tag: V6_3_1~10 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6243f56466dd19bfdd45d13ed02c6e856824d09c;p=modules%2Fgeom.git rnc: Added a control in order to prevent the Shape driver from building invalid edges (edges without C1 continuity) --- diff --git a/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx b/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx index 5d6d2c89b..f254c2a0c 100644 --- a/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx @@ -789,7 +789,10 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(TFunction_Logbook& log) const concatcurve->SetValue(concatcurve->Lower(), Concat.BSplineCurve()); } - + // rnc : prevents the driver from building an edge without C1 continuity + if (concatcurve->Value(concatcurve->Lower())->Continuity()==GeomAbs_C0){ + Standard_ConstructionError::Raise("Construction aborted : The given Wire has sharp bends between some Edges, no valid Edge can be built"); + } ResEdge = BRepLib_MakeEdge(concatcurve->Value(concatcurve->Lower()), FirstVertex, LastVertex); }