]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
sketch.selectFace() returns list of selections.
authorspo <sergey.pokhodenko@opencascade.com>
Fri, 30 Oct 2015 08:07:36 +0000 (11:07 +0300)
committerspo <sergey.pokhodenko@opencascade.com>
Fri, 30 Oct 2015 13:42:52 +0000 (16:42 +0300)
src/PythonAPI/model/sketcher/sketch.py

index c865651c24e70211740ec9d3063d341f76f587bb..a5ff8977704421d628145578c4c50eb7a3d7a2ca 100644 (file)
@@ -274,21 +274,23 @@ class Sketch(Interface):
     #-------------------------------------------------------------
 
     def selectFace(self, *args):
-        """Select the geometrical entities of this Sketch on which 
+        """Select the geometrical entities of this Sketch on which
         the result Face must be built.
-        
-        When no entity is given, the face is based on all existing 
+
+        When no entity is given, the face is based on all existing
         geometry of this Sketch.
         """
         if len(args) == 0:
-            self._selection = modelAPI_ResultConstruction( 
-                self._feature.firstResult()).shape()
+            self._selection = modelAPI_ResultConstruction(
+                self._feature.firstResult()
+                ).shape()
         elif len(args) == 1:
             self._selection = args[0].shape()
-            return Selection(self.result(), self.buildShape())
         else:
             raise Exception("not yet implemented")
-        return self
+        # TODO: simple version now, should be a list of selected faces
+        return [Selection(self.result(), self.buildShape())]
+#         return self
 
     def buildShape(self):
         """Build the result Shape of this Sketch according to the