From 8bbe8e5dd9a7abc50df4eb726bab218c65e6b2a9 Mon Sep 17 00:00:00 2001 From: "Zheng, Lei" Date: Tue, 4 Dec 2018 13:58:25 +0800 Subject: [PATCH] Constraint: allow multiple elements from the same part Fixes #150 --- constraint.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/constraint.py b/constraint.py index 907aa0c..339f2ab 100644 --- a/constraint.py +++ b/constraint.py @@ -1056,10 +1056,16 @@ class BaseMulti(Base): for e in obj.Proxy.getElements(): info = e.Proxy.getInfo() - if info.Part in parts: - logger.warn('{} skip duplicate parts {}', - cstrName(obj),info.PartName) - continue + + ################################################################ + # Note: Multiple elements from the same part makes sense in, e.g. + # PointsOnCircle + ################################################################ + # if info.Part in parts: + # logger.warn('{} skip duplicate parts {}', + # cstrName(obj),info.PartName) + # continue + parts.add(info.Part) if solver.isFixedPart(info.Part): if ref: