From: abk Date: Tue, 30 Jun 2015 14:47:08 +0000 (+0300) Subject: The algorithm to split any curve by any point was fixed to rightly split the curve... X-Git-Tag: v1.4.2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5b15d755cb103502d624a92cae45ad69c1240b18;p=modules%2Fhydro.git The algorithm to split any curve by any point was fixed to rightly split the curve in non vertex point if the curve is closed. --- diff --git a/src/HYDROData/HYDROData_PolylineOperator.cxx b/src/HYDROData/HYDROData_PolylineOperator.cxx index 81ca954e..92c766c3 100644 --- a/src/HYDROData/HYDROData_PolylineOperator.cxx +++ b/src/HYDROData/HYDROData_PolylineOperator.cxx @@ -275,14 +275,16 @@ static void SplitCurveByPoint( TopoDS_Edge aFE = TopoDS::Edge(aEdge.Oriented(TopAbs_FORWARD)); ShapeAnalysis_TransferParametersProj aSATPP(aFE, TopoDS_Face()); aSATPP.SetMaxTolerance(Precision::Confusion()); - TopoDS_Vertex aSplitV; + TopoDS_Vertex aSplitV1, aSplitV2; BRep_Builder().MakeVertex( - aSplitV, aCurve.Value(theParameter), Precision::Confusion()); + aSplitV1, aCurve.Value(theParameter), Precision::Confusion()); + BRep_Builder().MakeVertex( + aSplitV2, aCurve.Value(theParameter), Precision::Confusion()); TopoDS_Edge aEParts[] = { ShapeBuild_Edge().CopyReplaceVertices(aFE, TopoDS_Vertex(), - TopoDS::Vertex(aSplitV.Oriented(TopAbs_REVERSED))), - ShapeBuild_Edge().CopyReplaceVertices(aFE, aSplitV, TopoDS_Vertex())}; + TopoDS::Vertex(aSplitV1.Oriented(TopAbs_REVERSED))), + ShapeBuild_Edge().CopyReplaceVertices(aFE, aSplitV2, TopoDS_Vertex())}; ShapeBuild_Edge().CopyPCurves(aEParts[0], aFE); ShapeBuild_Edge().CopyPCurves(aEParts[1], aFE); BRep_Builder().SameRange(aEParts[0], Standard_False);