| 737 | } |
| 738 | |
| 739 | void ShapeClassifier::registerShape(ORIGIN org, IShapeNameAccessor* nameAccessor, const TopoDS_Shape& originalShape, const TopoDS_Shape& newShape, int counter) |
| 740 | { |
| 741 | |
| 742 | std::string original_name = nameAccessor->getShapeName(originalShape); |
| 743 | |
| 744 | std::stringstream s; |
| 745 | |
| 746 | std::string op; |
| 747 | switch (org) { |
| 748 | case GENERATED: |
| 749 | op = "g"; |
| 750 | break; |
| 751 | case MODIFIED: |
| 752 | op = "m"; |
| 753 | break; |
| 754 | case IDENTICAL: |
| 755 | break; |
| 756 | } |
| 757 | |
| 758 | s << op; |
| 759 | bool wantSep = false; |
| 760 | if (nameAccessor->operand() >= 0) { |
| 761 | wantSep = true; |
| 762 | s << nameAccessor->operand(); |
| 763 | } |
| 764 | if (wantSep) { |
| 765 | s << ":"; |
| 766 | } |
| 767 | s << original_name; |
| 768 | if (counter >= 0) { |
| 769 | s << ":" << counter; |
| 770 | } |
| 771 | s << std::ends; |
| 772 | |
| 773 | std::string newName = s.str(); |
| 774 | |
| 775 | m_processedSubShapes.Add(newShape); |
| 776 | m_nameSetter->setShapeName(newShape, newName.c_str()); |
| 777 | |
| 778 | } |
| 779 | |
| 780 | class BRepAlgoAPI_BooleanOperation_Adaptor : public IShapeClassifierTool |
| 781 | { |
nothing calls this directly
no test coverage detected