Cleaned up Path op utilities
This commit is contained in:
@@ -50,20 +50,21 @@ class _CollisionSim:
|
||||
obj.Proxy = self
|
||||
|
||||
def execute(self, fp):
|
||||
"'''Do something when doing a recomputation, this method is mandatory'''"
|
||||
pass
|
||||
'''Do something when doing a recomputation, this method is mandatory'''
|
||||
print('_CollisionSim', fp)
|
||||
|
||||
|
||||
class _ViewProviderCollisionSim:
|
||||
def __init__(self, vobj):
|
||||
self.Object = vobj.Object
|
||||
vobj.Proxy = self
|
||||
vobj.addProperty("App::PropertyLink", "Original", "reference", QtCore.QT_TRANSLATE_NOOP("App::Property", "The base object this collision refers to"))
|
||||
|
||||
def attach(self, vobj):
|
||||
self.Object = vobj.Object
|
||||
return
|
||||
|
||||
def setEdit(self, vobj, mode=0):
|
||||
# pylint: disable=unused-argument
|
||||
return True
|
||||
|
||||
def getIcon(self):
|
||||
@@ -73,9 +74,11 @@ class _ViewProviderCollisionSim:
|
||||
return None
|
||||
|
||||
def __setstate__(self, state):
|
||||
# pylint: disable=unused-argument
|
||||
return None
|
||||
|
||||
def onDelete(self, feature, subelements):
|
||||
# pylint: disable=unused-argument
|
||||
feature.Original.ViewObject.Visibility = True
|
||||
return True
|
||||
|
||||
@@ -101,9 +104,9 @@ def getCollisionObject(baseobject, simobject):
|
||||
colorassignment = []
|
||||
gougedShape = baseobject.Shape.cut(simobject)
|
||||
|
||||
for idx, i in enumerate(gougedShape.Faces):
|
||||
for i in gougedShape.Faces:
|
||||
match = False
|
||||
for jdx, j in enumerate(cVol.Faces):
|
||||
for j in cVol.Faces:
|
||||
if __compareBBSpace(i.BoundBox, j.BoundBox):
|
||||
match = True
|
||||
if match is True:
|
||||
|
||||
Reference in New Issue
Block a user