From: spo Date: Fri, 30 Oct 2015 08:07:36 +0000 (+0300) Subject: sketch.selectFace() returns list of selections. X-Git-Tag: V_2.1.0~206^2~41 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3a6e4475d90a0a88b4dc339ecaaa47bfcc7b2086;p=modules%2Fshaper.git sketch.selectFace() returns list of selections. --- diff --git a/src/PythonAPI/model/sketcher/sketch.py b/src/PythonAPI/model/sketcher/sketch.py index c865651c2..a5ff89777 100644 --- a/src/PythonAPI/model/sketcher/sketch.py +++ b/src/PythonAPI/model/sketcher/sketch.py @@ -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