Toponaming: Refactor refine to its own FeatureRefine class

This commit is contained in:
bgbsww
2024-07-30 08:34:34 -04:00
parent 4fbc81f10a
commit 2a19d8f6fb
15 changed files with 185 additions and 110 deletions

View File

@@ -785,6 +785,7 @@ class TestTopologicalNamingProblem(unittest.TestCase):
body = self.Doc.addObject("PartDesign::Body", "Body")
box = self.Doc.addObject("PartDesign::AdditiveBox", "Box")
body.addObject(box)
self.Doc.recompute()
sketch = self.Doc.addObject("Sketcher::SketchObject", "Sketch")
sketch.AttachmentSupport = (box, "Face6")
sketch.MapMode = "FlatFace"
@@ -803,10 +804,9 @@ class TestTopologicalNamingProblem(unittest.TestCase):
self.assertEqual(body.Shape.childShapes()[0].ElementMapSize, 32)
self.assertEqual(body.Shape.ElementMapSize, 32)
self.assertEqual(sketch.Shape.ElementMapSize, 2)
self.assertEqual(hole.Shape.ElementMapSize, 32)
# self.assertNotEqual(hole.Shape.ElementReverseMap['Vertex1'],"Vertex1") # NewName, not OldName
self.assertNotEqual(body.Shape.ElementReverseMap['Vertex1'],"Vertex1") # NewName, not OldName
self.assertEqual(
self.countFacesEdgesVertexes(hole.Shape.ElementReverseMap), (7, 15, 10)
self.countFacesEdgesVertexes(body.Shape.ElementReverseMap), (7, 15, 10)
)
volume = 1000 - 10 * math.pi * 3 * 3
self.assertAlmostEqual(hole.Shape.Volume, volume)