From: spo Date: Thu, 17 Dec 2015 11:04:27 +0000 (+0300) Subject: [PythonAPI] Add setExternal() to line feature. X-Git-Tag: V_2.1.0~162^2~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=80897b1d74af8f6e49c71dc1644c59f0675b3c8a;p=modules%2Fshaper.git [PythonAPI] Add setExternal() to line feature. --- diff --git a/src/PythonAPI/model/sketcher/line.py b/src/PythonAPI/model/sketcher/line.py index 93f354ba0..215eeba80 100644 --- a/src/PythonAPI/model/sketcher/line.py +++ b/src/PythonAPI/model/sketcher/line.py @@ -17,6 +17,7 @@ class Line(Entity): self._end_point = geomDataAPI_Point2D( self._feature.data().attribute("EndPoint") ) + self._external = self._feature.selection("External") # If no arguments are given the attributes of the feature # are'nt initialized @@ -45,7 +46,7 @@ class Line(Entity): self.setEndPoint(p2.x(), p2.y()) def __createByName(self, name): - self._feature.data().selection("External").selectSubShape("EDGE", name) + self.setExternal(name) ####### # @@ -69,5 +70,9 @@ class Line(Entity): def endPointData(self): return self._end_point + def setExternal(self, name): + """Set external edge""" + self._external.selectSubShape("EDGE", name) + def result(self): return self._feature.firstResult()