From 02c41e5888e5dee601d1eea4e8dab3d9c4535a87 Mon Sep 17 00:00:00 2001 From: Aditya Joshi Date: Fri, 9 Aug 2024 16:43:14 -0400 Subject: [PATCH 1/2] Fix logic checking periodic model faces --- ma/maSnap.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ma/maSnap.cc b/ma/maSnap.cc index 195dca005..73217e73b 100644 --- a/ma/maSnap.cc +++ b/ma/maSnap.cc @@ -477,8 +477,10 @@ static void interpolateParametricCoordinatesOnRegularFace( { double range[2]; int dim = m->getModelType(g); + bool gface_isPeriodic = 0; for (int d=0; d < dim; ++d) { bool isPeriodic = m->getPeriodicRange(g,d,range); + if ((dim == 2) && (isPeriodic > 0)) gface_isPeriodic = 1; p[d] = interpolateParametricCoordinate(t,a[d],b[d],range,isPeriodic, 0); } @@ -494,6 +496,8 @@ static void interpolateParametricCoordinatesOnRegularFace( // this need to be done for faces, only if (dim != 2) return; + if (!gface_isPeriodic) + return; Vector x; bool ok; From 2e031e00036b4423240b66ef359dd2354ac7e4b7 Mon Sep 17 00:00:00 2001 From: Aditya Joshi Date: Fri, 9 Aug 2024 16:49:23 -0400 Subject: [PATCH 2/2] spell check --- ma/maSnap.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ma/maSnap.cc b/ma/maSnap.cc index 73217e73b..d75426e8d 100644 --- a/ma/maSnap.cc +++ b/ma/maSnap.cc @@ -486,7 +486,7 @@ static void interpolateParametricCoordinatesOnRegularFace( /* check if the new point is inside the model. * otherwise re-run the above loop with last option - * in "interpolateParametricCoordinae" being 1. + * in "interpolateParametricCoordinate" being 1. * Notes * 1) we are assuming manifold surfaces * 2) we only check for faces that are periodic