PedestrianDynamics / jupedsim

JuPedSim is an open source pedestrian dynamics simulator
http://jupedsim.org
Other
39 stars 27 forks source link

Demo 07 crashes with geometry correction #722

Closed schroedtert closed 4 years ago

schroedtert commented 4 years ago

When trying to run demos/07_big_room/big_room_ini.xml the following error occurs:

[2020-03-23 10:31:50.128] [info] Init Geometry
[2020-03-23 10:31:50.128] [info] Starting geometry::helper::correct to fix the geometry ...
[2020-03-23 10:31:50.130] [info] File saved to /home/tobiass/jupedsim/jpscore/demos/07_big_room/results/correct_big_room_geo.xml
[2020-03-23 10:31:50.130] [info] Geometry was fixed, new file is stored in: /home/tobiass/jupedsim/jpscore/demos/07_big_room/results/correct_big_room_geo.xml.
[2020-03-23 10:31:50.130] [error] NormalSubRoom::ConvertLineToPoly(): SubRoom 2 Room 0, polygon not closed (19.2699, 45.165) != (73.27, 3.775), distance = 68.03780493233155
[2020-03-23 10:31:50.130] [error] Could not initialize the geometry!

Process finished with exit code 1

When commenting out the correction in Building.cpp:292ff everything works perfektly.

//    try {
//        geometry::helper::CorrectInputGeometry(*this);
//    } catch(const std::exception & e) {
//        LOG_ERROR("Exception in Building::correct: {}", e.what());
//        return false;
//    }
schroedtert commented 4 years ago

Not an issue of correctGeometry, coordinates had mistakes. Fixed with #757