From 9eb9a589344fddb7aa0ab271e4b5a6a06f9a60eb Mon Sep 17 00:00:00 2001 From: Roy-043 <70520633+Roy-043@users.noreply.github.com> Date: Wed, 23 Jun 2021 11:11:15 +0200 Subject: [PATCH] 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. --- src/Mod/Draft/draftobjects/draftlink.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Mod/Draft/draftobjects/draftlink.py b/src/Mod/Draft/draftobjects/draftlink.py index dfaa0d4dc4..5437a67dbf 100644 --- a/src/Mod/Draft/draftobjects/draftlink.py +++ b/src/Mod/Draft/draftobjects/draftlink.py @@ -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)