[Breaking] Downgrade: Fix disconnected wires on OCC7

Because multiFuse no longer connects wires in OCC7, OpenWires resulted
in disconnected wires (compound of edges).

To fix, the method of connecting was changed. This probably changes the
indexing of the edges within wires, so the change can potentially break
old projects.
This commit is contained in:
DeepSOIC 2016-08-19 14:37:05 +03:00
parent 3e08e54c74
commit a83d441f79

View File

@ -91,11 +91,8 @@ class _latticeDowngrade:
for shell in shells:
openEdges = shell.getFreeEdges().childShapes()
if len(openEdges) > 1: # edges need to be fused into wires
wires = openEdges[0].multiFuse(openEdges[1:])
if wires.ShapeType == 'Compound':
wires = wires.childShapes()
else:
wires = [wires]
clusters = Part.getSortedClusters(openEdges)
wires = [Part.Wire(cluster) for cluster in clusters]
else:
wires = openEdges
openWires.extend(wires)