From a6dec91641cd76e044b5145726f413e4940b1ad7 Mon Sep 17 00:00:00 2001 From: NATHALIE GORE Date: Fri, 15 Nov 2019 10:10:11 +0100 Subject: [PATCH] It worksgit add src/FiltersPlugin/FiltersPlugin_SameNormalFaces.pygit add src/FiltersPlugin/FiltersPlugin_SameNormalFaces.py --- src/FiltersPlugin/FiltersPlugin_SameNormalFaces.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/FiltersPlugin/FiltersPlugin_SameNormalFaces.py b/src/FiltersPlugin/FiltersPlugin_SameNormalFaces.py index ec151fa59..856d578cc 100644 --- a/src/FiltersPlugin/FiltersPlugin_SameNormalFaces.py +++ b/src/FiltersPlugin/FiltersPlugin_SameNormalFaces.py @@ -58,12 +58,14 @@ class FiltersPlugin_SameNormalFaces(ModelAPI_Filter): self.myCached[selectedShape] = [] selectedFace = GeomAPI_Face(selectedShape) selectedPlane = selectedFace.getPlane() + selectedNormal = selectedPlane.direction() Face = GeomAPI_Face(theShape) if not Face.isPlanar(): - return False + return self.myCached[selectedShape] Plane = Face.getPlane() - if selectedPlane.intersect(Plane) is None: + Normal = Plane.direction() + if selectedPlane.intersect(Plane) is None and selectedNormal.angle(Normal) < math.pi/360: self.myCached[selectedShape].append(theShape) return theShape in self.myCached[selectedShape] -- 2.39.2