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
评论列表
文章目录