Skip to content

Commit

Permalink
Add warning when user sets a tag instead of a distinct geometry path (#…
Browse files Browse the repository at this point in the history
…119)

* Add warning when user sets a tag instead of a distinct geometry path

* Move warning message to RetrieveSpacesBySpecifier and RetrieveSurfacesBySpecifier

* Get rid of unnecessary include

* Move check to better place
  • Loading branch information
richeldichel authored Oct 15, 2024
1 parent 29e80ba commit c57c9bf
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions KGeoBag/Source/Core/Source/KGInterface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,10 @@ void KGInterface::RetrieveSurfacesByPath(vector<KGSurface*>& anAccumulator, KGSp

if (tNestPos == string::npos) {
if (tHead.find_first_of(sTag) == 0) {
if (aNode == fRoot){
coremsg(eWarning) << "Path definition for surfaces just contains a tag, which can make it ambiguous: <" << aPath << ">. Please specify a distinct geometry path!" << eom;
}

string tTag;
int tRecursion;

Expand Down Expand Up @@ -310,6 +314,10 @@ void KGInterface::RetrieveSpacesByPath(vector<KGSpace*>& anAccumulator, KGSpace*

if (tNestPos == string::npos) {
if (tHead.find_first_of(sTag) == 0) {
if (aNode == fRoot){
coremsg(eWarning) << "Path definition for spaces just contains a tag, which can make it ambiguous: <" << aPath << ">. Please specify a distinct geometry path!" << eom;
}

string tTag;
int tRecursion;

Expand Down

0 comments on commit c57c9bf

Please sign in to comment.