Constraint: allow multiple elements from the same part

Fixes #150
This commit is contained in:
Zheng, Lei 2018-12-04 13:58:25 +08:00
parent 2f54b91224
commit 8bbe8e5dd9

View File

@ -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: