2045 return rect |
2045 return rect |
2046 |
2046 |
2047 def Clone(self, parent, connectors = {}, dx = 0, dy = 0): |
2047 def Clone(self, parent, connectors = {}, dx = 0, dy = 0): |
2048 start_connector = connectors.get(self.StartConnected, None) |
2048 start_connector = connectors.get(self.StartConnected, None) |
2049 end_connector = connectors.get(self.EndConnected, None) |
2049 end_connector = connectors.get(self.EndConnected, None) |
2050 print self.StartConnected, "=>", start_connector, ",", self.EndConnected, "=>", end_connector |
|
2051 if start_connector is not None and end_connector is not None: |
2050 if start_connector is not None and end_connector is not None: |
2052 wire = Wire(parent) |
2051 wire = Wire(parent) |
2053 wire.SetPoints([(point.x + dx, point.y + dy) for point in self.Points]) |
2052 wire.SetPoints([(point.x + dx, point.y + dy) for point in self.Points]) |
2054 start_connector.Connect((wire, 0), False) |
2053 start_connector.Connect((wire, 0), False) |
2055 end_connector.Connect((wire, -1), False) |
2054 end_connector.Connect((wire, -1), False) |