Update ArchRoof.py

A relative profile can now be used if it references itself. This fixes a compatibility issue with the V0.18 version of ArchRoof, where the first profile initially always references itself.
This commit is contained in:
Roy-043
2021-01-20 19:17:30 +01:00
committed by GitHub
parent 67f6353046
commit b31667dbc7

View File

@@ -438,8 +438,9 @@ class _Roof(ArchComponent.Component):
rel = profilCurr["idrel"]
if i != rel and 0 <= rel < numEdges:
profilRel = self.profilsDico[rel]
# do not use data from the relative profile if it in turn references a relative profile:
if 0 <= profilRel["idrel"] < numEdges:
# do not use data from the relative profile if it in turn references a relative profile
# other than itself:
if 0 <= profilRel["idrel"] < numEdges and rel != profilRel["idrel"]:
hgt = self.calcHeight(i)
profilCurr["height"] = hgt
elif ang == 0.0 and run == 0.0: