From 8d8ce8add685940d382778ebd9406980cd10764c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Sch=C3=B6berl?= Date: Fri, 16 Sep 2016 15:32:19 +0200 Subject: [PATCH] closesurfacefix --- libsrc/csg/identify.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/libsrc/csg/identify.cpp b/libsrc/csg/identify.cpp index df45773e..ca2d13e6 100644 --- a/libsrc/csg/identify.cpp +++ b/libsrc/csg/identify.cpp @@ -1079,6 +1079,7 @@ void CloseSurfaceIdentification :: IdentifyFaces (class Mesh & mesh) for (int i = 1; i <= mesh.GetNFD(); i++) { + auto & fdi = mesh.GetFaceDescriptor(i); int surfi = mesh.GetFaceDescriptor(i).SurfNr(); if (s1rep != surfi) continue; @@ -1090,12 +1091,21 @@ void CloseSurfaceIdentification :: IdentifyFaces (class Mesh & mesh) for (int j = 1; j <= mesh.GetNFD(); j++) { + auto & fdj = mesh.GetFaceDescriptor(j); int surfj = mesh.GetFaceDescriptor(j).SurfNr(); if (surfi == surfj) continue; if (s2rep != surfj) continue; - + bool have_common = false; + if (fdi.DomainIn() != 0) + if (fdi.DomainIn() == fdj.DomainIn() || fdi.DomainIn() == fdj.DomainOut()) + have_common = true; + if (fdi.DomainOut() != 0) + if (fdi.DomainOut() == fdj.DomainIn() || fdi.DomainOut() == fdj.DomainOut()) + have_common = true; + if (!have_common) continue; + int idok = 1; for (side = 1; side <= 2 && idok; side++)