From 2010121f2e9af050b7376594f04278fb7b4ce4a9 Mon Sep 17 00:00:00 2001 From: DeepSOIC Date: Tue, 3 Nov 2015 14:46:13 +0300 Subject: [PATCH] Polar and Lin Arrays: show warning if element of lattice is used as axis --- latticeLinearArray.py | 3 +++ latticePolarArray.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/latticeLinearArray.py b/latticeLinearArray.py index 4a20b8a..fb41d0d 100644 --- a/latticeLinearArray.py +++ b/latticeLinearArray.py @@ -108,6 +108,9 @@ class LinearArray(latticeBaseFeature.LatticeFeature): # Apply links if obj.Link: + if latticeBaseFeature.isObjectLattice(obj.AxisLink): + latticeExecuter.warning(obj,"For polar array, axis link is expected to be a regular shape. Lattice objct was supplied instead, it's going to be treated as a generic shape.") + #resolve the link if len(obj.LinkSubelement) > 0: linkedShape = obj.Link.Shape.getElement(obj.LinkSubelement) diff --git a/latticePolarArray.py b/latticePolarArray.py index bc0a359..303512a 100644 --- a/latticePolarArray.py +++ b/latticePolarArray.py @@ -124,6 +124,9 @@ class PolarArray(latticeBaseFeature.LatticeFeature): # Apply links if obj.AxisLink: + if latticeBaseFeature.isObjectLattice(obj.AxisLink): + latticeExecuter.warning(obj,"For polar array, axis link is expected to be a regular shape. Lattice objct was supplied instead, it's going to be treated as a generic shape.") + #resolve the link if len(obj.AxisLinkSubelement) > 0: linkedShape = obj.AxisLink.Shape.getElement(obj.AxisLinkSubelement)