normpath.py 文件源码

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

项目:OpenRAM 作者: mguthaus 项目源码 文件源码
def _tangent(self, params, length_pt):
        """return tangent vector of path at params

        If length_pt in pts is not None, the tangent vector will be scaled to
        the desired length.
        """

        result = [None] * len(params)
        tangenttemplate = path.line_pt(0, 0, length_pt, 0).normpath()
        for normsubpathindex, (indices, params) in self._distributeparams(params).items():
            for index, atrafo in zip(indices, self.normsubpaths[normsubpathindex].trafo(params)):
                if atrafo is invalid:
                    result[index] = invalid
                else:
                    result[index] = tangenttemplate.transformed(atrafo)
        return result
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号