From 7f084a3737933d1b062e5d9a1491b334e9d7df4f Mon Sep 17 00:00:00 2001 From: wmayer Date: Wed, 7 Mar 2018 15:49:06 +0100 Subject: [PATCH] fix incorrect usage of Adaptor3d_IsoCurve --- src/Mod/Fem/App/FemConstraint.cpp | 46 +++++++++++++++---------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/src/Mod/Fem/App/FemConstraint.cpp b/src/Mod/Fem/App/FemConstraint.cpp index 60109a6053..15d47db1ab 100644 --- a/src/Mod/Fem/App/FemConstraint.cpp +++ b/src/Mod/Fem/App/FemConstraint.cpp @@ -242,27 +242,7 @@ bool Constraint::getPoints(std::vector &points, std::vectorValue(ufp, vfp); - gp_Pnt p2 = hsurf->Value(ulp, vfp); - l = p1.Distance(p2); - } - - try { - isoc.Load(GeomAbs_IsoU, vlp); - lv = (l + GCPnts_AbscissaPoint::Length(isoc, Precision::Confusion()))/2.0; - } - catch (const Standard_Failure&) { - gp_Pnt p1 = hsurf->Value(ufp, vlp); - gp_Pnt p2 = hsurf->Value(ulp, vlp); - lv = (l + p1.Distance(p2))/2.0; - } - - try { - isoc.Load(GeomAbs_IsoV, ufp); + isoc.Load(GeomAbs_IsoU, ufp); l = GCPnts_AbscissaPoint::Length(isoc, Precision::Confusion()); } catch (const Standard_Failure&) { @@ -272,12 +252,32 @@ bool Constraint::getPoints(std::vector &points, std::vectorValue(ulp, vfp); gp_Pnt p2 = hsurf->Value(ulp, vlp); + lv = (l + p1.Distance(p2))/2.0; + } + + try { + isoc.Load(GeomAbs_IsoV, vfp); + l = GCPnts_AbscissaPoint::Length(isoc, Precision::Confusion()); + } + catch (const Standard_Failure&) { + gp_Pnt p1 = hsurf->Value(ufp, vfp); + gp_Pnt p2 = hsurf->Value(ulp, vfp); + l = p1.Distance(p2); + } + + try { + isoc.Load(GeomAbs_IsoV, vlp); + lu = (l + GCPnts_AbscissaPoint::Length(isoc, Precision::Confusion()))/2.0; + } + catch (const Standard_Failure&) { + gp_Pnt p1 = hsurf->Value(ufp, vlp); + gp_Pnt p2 = hsurf->Value(ulp, vlp); lu = (l + p1.Distance(p2))/2.0; }