facedraw.py 文件源码

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

项目:freecad-nurbs 作者: microelly2 项目源码 文件源码
def createnewwire(widget):
    '''new wire for next drawing'''

    ef=widget.ef

    w=App.ActiveDocument.addObject("Part::Feature","A Drawing on " + ef.objname + ": "+ ef.subelement +"#")
    w.Shape=Part.Shape()
    wam=App.ActiveDocument.addObject("Part::Feature","YY Drawing on " + ef.objname + ": "+ ef.subelement +"#")
    wam.Shape=Part.Shape()

    if 10:
        c=PySide.QtGui.QColorDialog.getColor(QtGui.QColor(random.randint(10,255),random.randint(10,255),random.randint(10,255)))
        w.ViewObject.LineColor=(1.0/255*c.red(),1.0/255*c.green(),1.0/255*c.blue())
        w.ViewObject.PointColor=(1.0/255*c.red(),1.0/255*c.green(),1.0/255*c.blue())
    else:
        w.ViewObject.LineColor=(random.random(),random.random(),random.random())

    ef.wire=w
    ef.wirem=wam
    ef.pts=[]



## dialog fpr facedrwaing options
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号