]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
It worksgit add src/FiltersPlugin/FiltersPlugin_SameNormalFaces.pygit add src/Filters...
authorNATHALIE GORE <ng13417n@dsp0897499.atlas.edf.fr>
Fri, 15 Nov 2019 09:10:11 +0000 (10:10 +0100)
committerNATHALIE GORE <ng13417n@dsp0897499.atlas.edf.fr>
Fri, 15 Nov 2019 09:10:11 +0000 (10:10 +0100)
src/FiltersPlugin/FiltersPlugin_SameNormalFaces.py

index ec151fa598cee8a3f72575f140e5f8a802a9b8f0..856d578cc43756655782d859215b2afc634a7413 100644 (file)
@@ -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]