diff --git a/Gui/DataView/GeoMapper.cpp b/Gui/DataView/GeoMapper.cpp index 3336daf2283122f7abce7e431d6ecf3e37a914b7..0360f6389ee811cba07f74682c3a5cc7a6c922d8 100644 --- a/Gui/DataView/GeoMapper.cpp +++ b/Gui/DataView/GeoMapper.cpp @@ -206,6 +206,7 @@ void GeoMapper::advancedMapOnMesh(const MeshLib::Mesh* mesh, const std::string & (*new_lines)[i]->update(pnt_id_map); this->_geo_objects.addPolylineVec(new_lines, new_geo_name); + // map new geometry incl. additional point using the normal mapping method this->_geo_name = new_geo_name; this->mapOnMesh(mesh); } diff --git a/Gui/DataView/GeoMapper.h b/Gui/DataView/GeoMapper.h index e76a87ab6b56834625f4397fc0a39273ed3e9f85..8db7c663af8c5732b0fa97a4f7b9257de2b54859 100644 --- a/Gui/DataView/GeoMapper.h +++ b/Gui/DataView/GeoMapper.h @@ -48,16 +48,27 @@ public: private: // Manages the mapping geometric data (points, stations, boreholes) on a raster or mesh. void mapData(); + // Returns a grid containing all mesh surface points with elevation=0 GeoLib::Grid<GeoLib::PointWithID>* getFlatGrid(MeshLib::Mesh const*const mesh, std::vector<GeoLib::PointWithID*> sfc_pnts) const; + // Returns the elevation at Point (x,y) based on a mesh. This uses collision detection for triangles and nearest neighbor for quads. + // NOTE: This medhod only returns correct values if the node numbering of the elements is correct! double getMeshElevation(double x, double y, double min_val, double max_val) const; + // Returns the elevation at Point (x,y) based on a raster float getDemElevation(double x, double y) const; + // Calculates the intersection of two lines embedded in the xy-plane GeoLib::Point* calcIntersection(GeoLib::Point const*const p1, GeoLib::Point const*const p2, GeoLib::Point const*const q1, GeoLib::Point const*const q2) const; + + // Returns the position of a point within a line-segment unsigned getPointPosInLine(GeoLib::Polyline const*const line, unsigned start, unsigned end, GeoLib::Point const*const point, double eps) const; + + // Returns the maximum segment length in a polyline vector double GeoMapper::getMaxSegmentLength(const std::vector<GeoLib::Polyline*> &lines) const; + + // Returns if a point p is within a bounding box defined by a and b bool isPntInBoundingBox(double ax, double ay, double bx, double by, double px, double py) const; GeoLib::GEOObjects& _geo_objects;