Part/Toponaming: Linter cleanup of makeElementWires

This commit is contained in:
Chris Hennes
2024-01-15 16:35:24 -06:00
parent 77c68ecb93
commit f66a4e57d2
3 changed files with 80 additions and 57 deletions

View File

@@ -161,4 +161,20 @@ TEST_F(TopoShapeExpansionTest, makeElementCompoundTwoCubes)
// 26 subshapes each
}
TEST_F(TopoShapeExpansionTest, makeElementWiresCombinesAdjacent)
{
// Arrange
auto edge1 = BRepBuilderAPI_MakeEdge(gp_Pnt(0.0, 0.0, 0.0), gp_Pnt(1.0, 0.0, 0.0)).Edge();
auto edge2 = BRepBuilderAPI_MakeEdge(gp_Pnt(1.0, 0.0, 0.0), gp_Pnt(2.0, 0.0, 0.0)).Edge();
Part::TopoShape topoShape;
std::vector<Part::TopoShape> shapes {edge1, edge2};
// Act
topoShape.makeElementWires(shapes);
// Assert
auto elementMap = topoShape.getElementMap();
EXPECT_EQ(6, elementMap.size());
}
// NOLINTEND(readability-magic-numbers,cppcoreguidelines-avoid-magic-numbers)