]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
rnc: Added a control in order to prevent the Shape driver from building invalid edges...
authorgdd <gdd>
Wed, 15 Jun 2011 13:19:24 +0000 (13:19 +0000)
committergdd <gdd>
Wed, 15 Jun 2011 13:19:24 +0000 (13:19 +0000)
src/GEOMImpl/GEOMImpl_ShapeDriver.cxx

index 5d6d2c89b9fc2ac593a36d6ed74d195155e9b589..f254c2a0c6ef8e5940923bd97e27fc262cc64b96 100644 (file)
@@ -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);
       }