From b966b4bbffb6e73ce1ab208fdb50b56b3c4e6611 Mon Sep 17 00:00:00 2001 From: ws_plaxis <ws@plaxis.com> Date: Mon, 6 Nov 2017 16:52:10 +0100 Subject: [PATCH] It might happen that in the first round (when i is zero), d < lc * .3 and so v0 is still the begin point of the edge. If then v0->getParameter(0, t0); is called, it will always fill in t0 and return false (which is not caught here). When the edge has bounds which do not start at 0, the value of t0 is not correct. This issue is now fixed by projecting the node back on the edge if the node is on a point instead of the edge. --- Mesh/meshGEdge.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Mesh/meshGEdge.cpp b/Mesh/meshGEdge.cpp index d333e2a286..73f586b577 100644 --- a/Mesh/meshGEdge.cpp +++ b/Mesh/meshGEdge.cpp @@ -405,7 +405,15 @@ static void filterPoints(GEdge*ge, int nMinimumPoints) v->getParameter(0,t); if (i != 0){ double t0; - v0->getParameter(0,t0); + if (v0->onWhat()->dim() == 0) + { + // Vertex is begin point + t0 = ge->parFromPoint(SPoint3(v0->x(), v0->y(), v0->z())); + } + else + { + v0->getParameter(0, t0); + } t=0.5*(t+t0); } double lc = F_LcB(ge, t); -- GitLab