From: spo Date: Fri, 30 Oct 2015 14:31:52 +0000 (+0300) Subject: Remove _selection member from Sketch. X-Git-Tag: V_2.1.0~206^2~26 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=456b8bb1b32c8c388b16d02ac9d7e1905f36b038;p=modules%2Fshaper.git Remove _selection member from Sketch. --- diff --git a/src/PythonAPI/model/sketcher/sketch.py b/src/PythonAPI/model/sketcher/sketch.py index 58b582d4d..a47759071 100644 --- a/src/PythonAPI/model/sketcher/sketch.py +++ b/src/PythonAPI/model/sketcher/sketch.py @@ -54,9 +54,6 @@ class Sketch(Interface): assert(self._norm) assert(self._external) - # Entities used for building the result shape - self._selection = None - if not args: return @@ -310,17 +307,17 @@ class Sketch(Interface): geometry of this Sketch. """ if len(args) == 0: - self._selection = modelAPI_ResultConstruction( + wire = modelAPI_ResultConstruction( self._feature.firstResult() ).shape() elif len(args) == 1: - self._selection = args[0].shape() + wire = args[0].shape() else: raise Exception("not yet implemented") # TODO: simple version now, should be a list of selected faces - return [Selection(self.result(), self.buildShape())] + return [Selection(self.result(), self.buildShape(wire))] - def buildShape(self): + def buildShape(self, wire): """Build the result Shape of this Sketch according to the selected geometrical entities.""" o = self._origin.pnt() @@ -329,7 +326,7 @@ class Sketch(Interface): # The faces are kept otherwise they are destroyed at exit faces = ShapeList() - GeomAlgoAPI_SketchBuilder.createFaces(o, dx, n, self._selection, faces) + GeomAlgoAPI_SketchBuilder.createFaces(o, dx, n, wire, faces) # TODO: Deal with several faces return faces[0]