Ellipse_fitting_by_Biarc_curves.py 文件源码

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

项目:dxf2gcode 作者: cnc-club 项目源码 文件源码
def make_ellipse_biarc_plot(self,ellipse):
        self.plot1 = self.figure.add_subplot(111)
        self.plot1.set_title("Ellipse, BIARC Fitting Algorithms: ")

        arrow_len=4
        arrow_width=arrow_len*0.05


        self.plot1.hold(True)
        for PtsVec in ellipse.PtsVec:
            (PtsVec[0].x)
            (PtsVec[0].y)
            self.plot1.plot([PtsVec[0].x],[PtsVec[0].y],'xr')

            self.plot1.arrow(PtsVec[0].x,PtsVec[0].y,\
                             cos(PtsVec[1])*arrow_len,\
                             sin(PtsVec[1])*arrow_len,\
                             width=arrow_width)        

        for geo in ellipse.geo:
            geo.plot2plot(self.plot1)
        self.plot1.axis('scaled')     
        self.canvas.show()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号