Skip to content

Commit

Permalink
Remove motion control point numbering syntax for shapes
Browse files Browse the repository at this point in the history
  • Loading branch information
rtownson committed Jun 24, 2024
1 parent 242ca7c commit 97152f4
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions HEN_HOUSE/egs++/shapes/egs_dynamic_shape/egs_dynamic_shape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,22 @@ extern "C" {
int err;
int icpts=1;
itos << icpts;
string sstring = "control point " + itos.str();
string inputTag = "control point";
string inputTag_backCompat = "control point " + itos.str();
EGS_Input *currentInput;
int rotsize=0;

// Control points read one by one from motion block in dynamic geometry definition, and saved as a vector to points
while (!(err = dyninp->getInput(sstring,point))) {
while (true) {
currentInput = dyninp->takeInputItem(inputTag);
if(!currentInput || currentInput->getInput(inputTag, point)) {
currentInput = dyninp->takeInputItem(inputTag_backCompat);
if(!currentInput || currentInput->getInput(inputTag_backCompat, point)) {
delete currentInput;
break;
}
}
delete currentInput;

// Checking the size to make sure it is a valid control point input
if (point.size()!=6 && point.size()!=7) {
Expand Down Expand Up @@ -157,7 +168,7 @@ extern "C" {
icpts++;
itos.str("");
itos << icpts;
sstring = "control point " + itos.str();// Define next control point i string for getInput in while condition
inputTag_backCompat = "control point " + itos.str();// Define next control point i string for getInput in while condition
}
}
}
Expand Down

0 comments on commit 97152f4

Please sign in to comment.