From: NATHALIE GORE Date: Fri, 15 Nov 2019 09:10:11 +0000 (+0100) Subject: It worksgit add src/FiltersPlugin/FiltersPlugin_SameNormalFaces.pygit add src/Filters... X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a6dec91641cd76e044b5145726f413e4940b1ad7;p=modules%2Fshaper.git It worksgit add src/FiltersPlugin/FiltersPlugin_SameNormalFaces.pygit add src/FiltersPlugin/FiltersPlugin_SameNormalFaces.py --- 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]