Toponaming: Fix transformed; abstract index element name generation
This commit is contained in:
@@ -91,4 +91,16 @@ bool Data::hasMissingElement(const char *subname) {
|
||||
|
||||
const char *Data::hasMappedElementName(const char *subname) {
|
||||
return isMappedElement(findElementName(subname));
|
||||
}
|
||||
}
|
||||
|
||||
// Currently used by CrossSection.cpp and FeatureTransformed.cpp with different label types
|
||||
// with a default of "I" and "_" used by CrossSection.
|
||||
const std::string Data::indexSuffix(int index, const char *label)
|
||||
{
|
||||
if ( index < 2 ) { // Don't add a suffix for item #1, begin appending at 2
|
||||
return {""};
|
||||
}
|
||||
std::string name(label);
|
||||
name += std::to_string(index);
|
||||
return name;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user