Part: CountSubShapesRecursive should be a TopoShape static function
- Dominant language
- C++
- Stars
- 33.6k
- Forks
- 6k
- Avg merge
- 3d 15h
- Merged PRs (30d)
- 196
Description
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Problem description
At least in Part/Gui/Command - possibly in other places there is the need to count subshapes in a compound TopoDS_Shape (recursively! not just top level)
this has previously been implemented multiple times leading to code duplication - see #17468
This issue is open to mark the need to abstract this function and provide a feature as outlined by @wwmayer in https://github.com/FreeCAD/FreeCAD/pull/17469#discussion_r1816524908
then find any place in the code that counts subshapes and use it.
should probably be able to accept both TopoDS_Shape and TopoShapes (but that's trivial)
### Full version info
```shell
main
```
### Subproject(s) affected?
Part
### Anything else?
_No response_
### Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Contributor guide
Assessment
This issue has not been assessed yet.