Draft: Fix Draft_PointArray and Draft_TwistedArray Count problems

Draft_PointArray and Draft_TwistedArray have Count problems:
1. Draft_PointArray: Count is always zero.
2. Draft_PathTwistedArray: Number of items is Count+1.
3. Draft_PathTwistedLinkArray: Count is increased whenever object is recomputed.

Also the first item in a twisted array should be unrotated.
This commit is contained in:
Roy-043
2021-06-23 11:11:15 +02:00
committed by GitHub
parent 32953590df
commit 9eb9a58934

View File

@@ -175,6 +175,8 @@ class DraftLink(DraftObject):
obj.PlacementList = pls
obj.setPropertyStatus('PlacementList', 'Immutable')
obj.Count = len(pls)
elif hasattr(obj, 'Count') and obj.Count != len(pls): # required for regular pointarrays
obj.Count = len(pls)
if obj.Base:
shape = getattr(obj.Base, 'Shape', None)