def CalculatePlaneThickness(self, planesDict):
"""Calculates the plane thickness for each structure."""
planes = []
# Iterate over each plane in the structure
for z in iterkeys(planesDict):
planes.append(float(z))
planes.sort()
# Determine the thickness
thickness = 10000
for n in range(0, len(planes)):
if (n > 0):
newThickness = planes[n] - planes[n-1]
if (newThickness < thickness):
thickness = newThickness
# If the thickness was not detected, set it to 0
if (thickness == 10000):
thickness = 0
return thickness
评论列表
文章目录