Hello,
The Threshold Selector gives an error due to division by zero. I see that the “totalArea” in the code is the issue (line 185). Can this be fixed by creating an if-statement which set the totalEnergy to sum(shadeNetFinal) if totalArea is 0?
From the code:
#Calculate the total area and the energy saved by the new mesh. if _inputMesh.Faces.Count == len(_analysisResult): totalArea = sum(areaList) totalEnergyList = [] for count, area in enumerate(areaList): totalEnergyList.append(shadeNetFinal[count]*area) totalEnergy = sum(totalEnergyList) else: totalArea = rc.Geometry.AreaMassProperties.Compute(newMesh).Area totalEnergy = (sum(shadeNetFinal)/len(shadeNetFinal))*totalArea return totalEnergy, totalArea, newMesh, joinedCrv
Best regards