Fix editing of single rebar object

Problem:
Unable to set OffsetStart value to greater than (size of structure
object along direction of expansion of rebars)/2 for single rebar object

Solution:
Drop check if(OffsetStart + OffsetEnd > size), when there is only one
rebar object.
This commit is contained in:
SurajDadral
2019-09-23 15:47:32 +05:30
committed by Yorik van Havre
parent c77937e6c5
commit 544e85ff3f

View File

@@ -355,8 +355,9 @@ class _Rebar(ArchComponent.Component):
if obj.CustomSpacing:
spacinglist = strprocessOfCustomSpacing(obj.CustomSpacing)
influenceArea = sum(spacinglist) - spacinglist[0] / 2 - spacinglist[-1] / 2
if (obj.OffsetStart.Value + obj.OffsetEnd.Value) > size:
return
if obj.Amount != 1:
if (obj.OffsetStart.Value + obj.OffsetEnd.Value) > size:
return
# all tests ok!
if hasattr(obj, "Length"):
length = getLengthOfRebar(obj)