X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=blobdiff_plain;f=src%2FShapeFix%2FShapeFix_SplitTool.cxx;h=5ed2b0ef2758232155f93472d4ae41b9865ca66e;hb=c471a1ba1828fc172c85abb255372cddedfcdf7b;hpb=16a1f2653700911a553ab4c4b9b0e833b8b32496 diff --git a/src/ShapeFix/ShapeFix_SplitTool.cxx b/src/ShapeFix/ShapeFix_SplitTool.cxx index 6da9203fa8..5ed2b0ef27 100644 --- a/src/ShapeFix/ShapeFix_SplitTool.cxx +++ b/src/ShapeFix/ShapeFix_SplitTool.cxx @@ -32,6 +32,7 @@ #include #include #include +#include //======================================================================= @@ -238,8 +239,29 @@ Standard_Boolean ShapeFix_SplitTool::CutEdge(const TopoDS_Edge &edge, if( Abs(Abs(a-b)-aRange) < Precision::PConfusion() ) return Standard_False; if( aRange<10.*Precision::PConfusion() ) return Standard_False; + Handle(Geom_Curve) c = BRep_Tool::Curve(edge, a, b); + ShapeAnalysis_Curve sac; + a = Min(pend,cut); + b = Max(pend,cut); + Standard_Real na = a, nb = b; + BRep_Builder B; - B.Range( edge, Min(pend,cut), Max(pend,cut) ); + if (!BRep_Tool::Degenerated(edge) && !c.IsNull() && sac.ValidateRange(c, na, nb, Precision::PConfusion()) && (na != a || nb != b) ) + { + B.Range( edge, na, nb, Standard_True ); + ShapeAnalysis_Edge sae; + if(sae.HasPCurve(edge,face)) + { + B.SameRange(edge,Standard_False); + } + + ShapeFix_Edge sfe; + sfe.FixSameParameter(edge); + } + else + { + B.Range( edge, a, b, Standard_False ); + } return Standard_True; }