SFC_Objects.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:beremiz 作者: nucleron 项目源码 文件源码
def AddBranch(self):
        if self.Type in [SELECTION_DIVERGENCE, SIMULTANEOUS_DIVERGENCE]:
            maxx = 0
            for output in self.Outputs:
                pos = output.GetRelPosition()
                maxx = max(maxx, pos.x)
            connector = Connector(self, "", None, wx.Point(maxx + SFC_DEFAULT_SEQUENCE_INTERVAL, self.Size[1]), SOUTH, onlyone=True)
            self.Outputs.append(connector)
            self.MoveConnector(connector, 0)
        elif self.Type in [SELECTION_CONVERGENCE, SIMULTANEOUS_CONVERGENCE]:
            maxx = 0
            for input in self.Inputs:
                pos = input.GetRelPosition()
                maxx = max(maxx, pos.x)
            connector = Connector(self, "", None, wx.Point(maxx + SFC_DEFAULT_SEQUENCE_INTERVAL, 0), NORTH, onlyone=True)
            self.Inputs.append(connector)
            self.MoveConnector(connector, SFC_DEFAULT_SEQUENCE_INTERVAL)

    # Remove a branch from the divergence
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号