added lint for doors
small obj-pool fix
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "Floorplan.h"
|
||||
#include "../../geo/BBox2.h"
|
||||
#include "../../wifi/estimate/ray3/ModelFactory.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
@@ -84,7 +85,7 @@ namespace Floorplan {
|
||||
|
||||
// check obstacles
|
||||
for (const FloorObstacle* obs : floor->obstacles) {
|
||||
checkObstacle(res, floor, obs);
|
||||
checkObstacle(res, map, floor, obs);
|
||||
}
|
||||
|
||||
// check fingerprints
|
||||
@@ -127,7 +128,7 @@ namespace Floorplan {
|
||||
}
|
||||
|
||||
/** check walls, doors, ... */
|
||||
static void checkObstacle(Issues& res, const Floor* floor, const FloorObstacle* fo) {
|
||||
static void checkObstacle(Issues& res, const IndoorMap* map, const Floor* floor, const FloorObstacle* fo) {
|
||||
|
||||
// line? -> check
|
||||
const FloorObstacleLine* line = dynamic_cast<const FloorObstacleLine*>(fo);
|
||||
@@ -145,6 +146,14 @@ namespace Floorplan {
|
||||
if (len_m < 0.40) {
|
||||
res.push_back(Issue(Type::ERR, floor, "' door is too narrow: " + std::to_string(len_m) + " meter from " + door->from.asString() + " to " + door->to.asString()));
|
||||
}
|
||||
|
||||
try {
|
||||
Ray3D::ModelFactory fac(map);
|
||||
fac.getDoorAbove(floor, door);
|
||||
} catch (Exception e) {
|
||||
res.push_back(Issue(Type::ERR, floor, std::string(e.what()) + "[from" + door->from.asString() + " to " + door->to.asString() + "]"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// pillar? -> check
|
||||
|
||||
Reference in New Issue
Block a user