Toponaming: Fix transformed; abstract index element name generation

This commit is contained in:
bgbsww
2024-08-09 22:04:05 -04:00
parent 99b753b006
commit 25ba8ab223
7 changed files with 107 additions and 32 deletions

View File

@@ -265,10 +265,7 @@ void TopoCrossSection::sliceNonSolid(int idx,
BRepAlgoAPI_Section cs(shape.getShape(), gp_Pln(a, b, c, -d));
if (cs.IsDone()) {
std::string prefix(op);
if (idx > 1) {
prefix += '_';
prefix += std::to_string(idx);
}
prefix += Data::indexSuffix(idx,Data::ELEMENT_MAP_INDEX2);
auto res = TopoShape()
.makeElementShape(cs, shape, prefix.c_str())
.makeElementWires()
@@ -297,10 +294,7 @@ void TopoCrossSection::sliceSolid(int idx,
BRepPrimAPI_MakeHalfSpace mkSolid(TopoDS::Face(face.getShape()), refPoint);
TopoShape solid(idx);
std::string prefix(op);
if (idx > 1) {
prefix += '_';
prefix += std::to_string(idx);
}
prefix += Data::indexSuffix(idx,Data::ELEMENT_MAP_INDEX2);
solid.makeElementShape(mkSolid, face, prefix.c_str());
BRepAlgoAPI_Cut mkCut(shape.getShape(), solid.getShape());