App/Toponaming: import SubObjectT dependencies for SubShapeBinder

* Added SubObjectT methods normalize(), normalized(), hasSubObject() and hasSubElement()
 * Updated DocumentObject::getSubObjectList()
 * Applied modifications to make the code compile
This commit is contained in:
Zheng, Lei
2024-04-06 09:59:23 +02:00
committed by Chris Hennes
parent db22476450
commit 138417c2a2
4 changed files with 188 additions and 5 deletions

View File

@@ -377,8 +377,18 @@ public:
virtual DocumentObject *getSubObject(const char *subname, PyObject **pyObj=nullptr,
Base::Matrix4D *mat=nullptr, bool transform=true, int depth=0) const;
/// Return a list of objects referenced by a given subname including this object
std::vector<DocumentObject*> getSubObjectList(const char *subname) const;
/** Return a list of objects referenced by a given subname including this object
* @param subname: the sub name path
* @param subsizes: optional sub name sizes for each returned object, that is,
* ret[i] = getSubObject(std::string(subname, subsizes[i]).c_str());
* @param flatten: whether to flatten the object hierarchies that belong to
* the same geo feature group, e.g. (Part.Fusion.Box -> Part.Box)
*
* @return Return a list of object along the path.
*/
std::vector<DocumentObject*> getSubObjectList(const char *subname,
std::vector<int> *subsizes = nullptr,
bool flatten = false) const;
/// reason of calling getSubObjects()
enum GSReason {