Add fixes suggested by @bgbsww

This commit is contained in:
shai
2024-07-04 19:53:09 +03:00
parent df002c1c7d
commit 2d1edacaa9
2 changed files with 5 additions and 4 deletions

View File

@@ -817,7 +817,7 @@ infos contains additional info on the solutions. It is a list of tuples:
Returns a SubElement
getElement(elementName, [silent = False]) -> Face | Edge | Vertex
elementName: SubElement name - i.e. 'Edge1', 'Face3' etc.
Accepts TNP names as well
Accepts TNP mitigation mapped names as well
silent: True to suppress the exception throw if the shape isn't found.
</UserDocu>
</Documentation>

View File

@@ -1467,13 +1467,14 @@ class TestTopologicalNamingProblem(unittest.TestCase):
pad.Length = 1
# Act
self.Doc.recompute()
if body.Shape.ElementMapVersion == "": # Should be '4' as of Mar 2023.
if pad.Shape.ElementMapVersion == "": # Should be '4' as of Mar 2023.
return
map = pad.Shape.ElementMap
# Assert
self.assertGreater(pad.Shape.ElementMapSize,0)
for tnpName in map.keys():
element1 = body.Shape.getElement(tnpName)
element2 = body.Shape.getElement(map[tnpName])
element1 = pad.Shape.getElement(tnpName)
element2 = pad.Shape.getElement(map[tnpName])
self.assertTrue(element1.isSame(element2))
def testFileSaveRestore(self):