Skip to content
Snippets Groups Projects

Fix / extend interface connections especially wrt face-face connections

Merged mehtank requested to merge mehtank/rocolib:facemates into main
Compare and
5 files
+ 18
11
Compare changes
  • Side-by-side
  • Inline
Files
5
@@ -273,10 +273,10 @@ class Component(Parameterized):
fromPort = self.getInterfaces(*fromInterface)
toPort = self.getInterfaces(*toInterface)
if fromPort.canMate(toPort):
if fromPort.canMate(toPort) or toPort.canMate(fromPort):
self.connections.setdefault(name, [fromInterface, toInterface, kwargs])
else:
raise AttributeError(f"{fromInterface} cannot connect to {toInterface} according to getMate")
raise AttributeError(f"{fromInterface} ({fromPort} : {type(fromPort)}) cannot connect to {toInterface} ({toPort} : {type(toPort)}) according to getMate")
def delConnection(self, name):
self.connections.pop(name)