Skip to content

Commit 4032ed4

Browse files
committed
Made FPCOPPOLY optional for type-3 force platforms
1 parent 8bcd232 commit 4032ed4

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/modules/ForcePlatforms.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,12 @@ void ezc3d::Modules::ForcePlatform::extractType(
157157

158158
}
159159
else if (_type == 3){
160-
const auto& copPoly = c3d.parameters().group("FORCE_PLATFORM").parameter("FPCOPPOLY").valuesAsDouble();
161-
if (copPoly.size() != 0){
162-
_type3copPoly = std::vector<double>(copPoly.begin() + idx * 12, copPoly.begin() + (idx + 1) * 12);
163-
} else {
164-
_type3copPoly = std::vector<double>(12);
160+
_type3copPoly = std::vector<double>(12);
161+
if (c3d.parameters().group("FORCE_PLATFORM").isParameter("FPCOPPOLY")){
162+
const auto& copPoly = c3d.parameters().group("FORCE_PLATFORM").parameter("FPCOPPOLY").valuesAsDouble();
163+
if (copPoly.size() != 0){
164+
_type3copPoly = std::vector<double>(copPoly.begin() + idx * 12, copPoly.begin() + (idx + 1) * 12);
165+
}
165166
}
166167
}
167168
else if (_type == 5){

0 commit comments

Comments
 (0)