From 80897b1d74af8f6e49c71dc1644c59f0675b3c8a Mon Sep 17 00:00:00 2001 From: spo Date: Thu, 17 Dec 2015 14:04:27 +0300 Subject: [PATCH] [PythonAPI] Add setExternal() to line feature. --- src/PythonAPI/model/sketcher/line.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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() -- 2.39.2