Toponaming: Cleanups

This commit is contained in:
bgbsww
2024-06-27 18:21:00 -04:00
committed by Chris Hennes
parent 7a4bc95d47
commit a674729dd3
4 changed files with 0 additions and 74 deletions

View File

@@ -119,22 +119,6 @@ App::DocumentObject* Body::getPrevSolidFeature(App::DocumentObject *start)
start = Tip.getValue();
}
//
// #ifdef FC_USE_TNP_FIX
// int index;
// if (!start || !start->getNameInDocument()
// // || start->isDerivedFrom(PartDesign::Extrusion::getClassTypeId())
// || start->isDerivedFrom(PartDesign::Solid::getClassTypeId())
// || !this->Group.find(start->getNameInDocument(), &index)) { // No Tip
// return nullptr;
// }
// const auto & objs = this->Group.getValues();
// for (--index; index>=0; --index) {
// if (isSolidFeature(objs[index]))
// return objs[index];
// }
//
// #else
if (!start) { // No Tip
return nullptr;
}
@@ -153,7 +137,6 @@ App::DocumentObject* Body::getPrevSolidFeature(App::DocumentObject *start)
if (rvIt != features.rend()) { // the solid found in model list
return *rvIt;
}
// #endif
return nullptr;
}
@@ -163,20 +146,6 @@ App::DocumentObject* Body::getNextSolidFeature(App::DocumentObject *start)
start = Tip.getValue();
}
// #ifdef FC_USE_TNP_FIX
// int index;
// if (!start || !start->getNameInDocument()
// || !this->Group.find(start->getNameInDocument(), &index)) { // No Tip
// return nullptr;
// }
//
// const auto & objs = this->Group.getValues();
// int count = this->Group.getSize();
// for (++index; index<count; ++index) {
// if (isSolidFeature(objs[index]))
// return objs[index];
// }
// #else
if (!start || !hasObject(start)) { // no or faulty tip
return nullptr;
}
@@ -198,7 +167,6 @@ App::DocumentObject* Body::getNextSolidFeature(App::DocumentObject *start)
if (rvIt != features.end()) { // the solid found in model list
return *rvIt;
}
// #endif
return nullptr;
}
@@ -537,29 +505,6 @@ std::vector<std::string> Body::getSubObjects(int reason) const {
App::DocumentObject *Body::getSubObject(const char *subname,
PyObject **pyObj, Base::Matrix4D *pmat, bool transform, int depth) const
{
// while(subname && *subname=='.') ++subname; // skip leading .
//
// // PartDesign::Feature now support grouping sibling features, and the user
// // is free to expand/collapse at any time. To not disrupt subname path
// // because of this, the body will peek the next two sub-objects reference,
// // and skip the first sub-object if possible.
// if(subname) {
// const char * firstDot = strchr(subname,'.');
// if (firstDot) {
// const char * secondDot = strchr(firstDot+1, '.');
// if (secondDot) {
// auto firstObj = Group.find(std::string(subname, firstDot).c_str());
// if (!firstObj || firstObj->isDerivedFrom(PartDesign::Feature::getClassTypeId())) {
// auto secondObj = Group.find(std::string(firstDot+1, secondDot).c_str());
// if (secondObj) {
// // we support only one level of sibling grouping, so no
// // recursive call to our own getSubObject()
// return Part::BodyBase::getSubObject(firstDot+1,pyObj,pmat,transform,depth+1);
// }
// }
// }
// }
// }
#if 1
return Part::BodyBase::getSubObject(subname,pyObj,pmat,transform,depth);
#else