From a83d441f791a67bff518135bd0073e6ef5a9a520 Mon Sep 17 00:00:00 2001 From: DeepSOIC Date: Fri, 19 Aug 2016 14:37:05 +0300 Subject: [PATCH] [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. --- lattice2Downgrade.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lattice2Downgrade.py b/lattice2Downgrade.py index 39dd41a..9fa616c 100644 --- a/lattice2Downgrade.py +++ b/lattice2Downgrade.py @@ -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)