Toponaming/Part: Initialize the hasher so that it operates

This commit is contained in:
bgbsww
2024-04-13 19:50:20 -04:00
committed by Chris Hennes
parent 5ae6b8acf6
commit 9ebb23f234
3 changed files with 23 additions and 38 deletions

View File

@@ -158,6 +158,9 @@ Data::ElementMapPtr TopoShape::resetElementMap(Data::ElementMapPtr elementMap)
_cache->subLocation.Identity();
_subLocation.Identity();
_parentCache.reset();
if ( ! elementMap->hasher && Hasher ) {
elementMap->hasher = Hasher;
}
}
return Data::ComplexGeoData::resetElementMap(elementMap);
}

View File

@@ -417,6 +417,11 @@ class TestTopologicalNamingProblem(unittest.TestCase):
# Assert
self.assertEqual(len(body.Shape.childShapes()), 1)
self.assertEqual(body.Shape.childShapes()[0].ElementMapSize, 26)
self.assertEqual(body.Shape.ElementMapSize,30)
self.assertEqual(sketch.Shape.ElementMapSize,12)
self.assertEqual(pad.Shape.ElementMapSize,30)
self.assertEqual(pad.Shape.childShapes()[0].ElementMapSize,30)
# Todo: Assert that the names in the ElementMap are good; in particular that they are hashed with a # starting
def testPartDesignElementMapRevolution(self):
# Arrange