FreeCAD二次开发-Gui.Selection.getSelectionEx() 遍历选中的对象

时间:2020-03-31 22:45:42   收藏:0   阅读:133
import Part
Part.show(Part.makeBox(100,100,100))
Gui.SendMsgToActiveView("ViewFit")

length = 0.0
for o in Gui.Selection.getSelectionEx():
    for s in o.SubObjects:
        length += s.Length
print "Length of the selected edges:" ,length

Caesar卢尚宇
2020年3月31日

技术分享图片

 技术分享图片

原文:https://www.cnblogs.com/nxopen2018/p/12609132.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!