MBDyn new joints, sine, cosine
This commit is contained in:
@@ -16,31 +16,15 @@ void MbD::MBDynBody::initialize()
|
||||
void MbD::MBDynBody::parseMBDyn(std::string line)
|
||||
{
|
||||
bodyString = line;
|
||||
size_t previousPos = 0;
|
||||
auto pos = line.find(":");
|
||||
auto front = line.substr(previousPos, pos - previousPos);
|
||||
assert(front.find("body") != std::string::npos);
|
||||
auto arguments = std::vector<std::string>();
|
||||
std::string argument;
|
||||
while (true) {
|
||||
previousPos = pos;
|
||||
pos = line.find(",", pos + 1);
|
||||
if (pos != std::string::npos) {
|
||||
argument = line.substr(previousPos + 1, pos - previousPos - 1);
|
||||
arguments.push_back(argument);
|
||||
}
|
||||
else {
|
||||
argument = line.substr(previousPos + 1);
|
||||
arguments.push_back(argument);
|
||||
break;
|
||||
}
|
||||
}
|
||||
auto iss = std::istringstream(arguments.at(0));
|
||||
iss >> name;
|
||||
arguments.erase(arguments.begin());
|
||||
iss = std::istringstream(arguments.at(0));
|
||||
iss >> nodeName;
|
||||
arguments.erase(arguments.begin());
|
||||
arguments = collectArgumentsFor("body", line);
|
||||
name = readStringOffTop(arguments);
|
||||
nodeName = readStringOffTop(arguments);
|
||||
//auto iss = std::istringstream(arguments.at(0));
|
||||
//iss >> name;
|
||||
//arguments.erase(arguments.begin());
|
||||
//iss = std::istringstream(arguments.at(0));
|
||||
//iss >> nodeName;
|
||||
//arguments.erase(arguments.begin());
|
||||
readMass(arguments);
|
||||
rPcmP = readPosition(arguments);
|
||||
readInertiaMatrix(arguments);
|
||||
|
||||
Reference in New Issue
Block a user