diff --git a/Applications/DataExplorer/VtkVis/VtkCompositeNodeSelectionFilter.cpp b/Applications/DataExplorer/VtkVis/VtkCompositeNodeSelectionFilter.cpp index 587c7fe9132aff977e2ab260088d195f3a3ce93b..6c81672e844b168e9ab6a8ff1cc69be82849f69b 100644 --- a/Applications/DataExplorer/VtkVis/VtkCompositeNodeSelectionFilter.cpp +++ b/Applications/DataExplorer/VtkVis/VtkCompositeNodeSelectionFilter.cpp @@ -65,9 +65,9 @@ void VtkCompositeNodeSelectionFilter::setSelectionArray(const std::vector<unsign for (unsigned i=0; i<point_indeces.size(); ++i) { double * coords = static_cast<vtkDataSetAlgorithm*>(_inputAlgorithm)->GetOutput()->GetPoint(point_indeces[i]); - GeoLib::Point* p (new GeoLib::Point(coords)); + GeoLib::Point* p (new GeoLib::Point(coords[0], coords[1], coords[2])); _selection.push_back(p); } - init(); + init(); } diff --git a/Applications/Utils/MeshEdit/CreateBoundaryConditionsAlongPolylines.cpp b/Applications/Utils/MeshEdit/CreateBoundaryConditionsAlongPolylines.cpp index 6743315623edeebdead27239dad89ccf9624930c..08ccb0cd3a110c4c6100f5a020ac3ac107055dc4 100644 --- a/Applications/Utils/MeshEdit/CreateBoundaryConditionsAlongPolylines.cpp +++ b/Applications/Utils/MeshEdit/CreateBoundaryConditionsAlongPolylines.cpp @@ -51,7 +51,7 @@ void convertMeshNodesToGeometry(std::vector<MeshLib::Node*> const& nodes, new std::map<std::string, std::size_t>); std::size_t cnt(0); for (std::size_t id: node_ids) { - pnts->push_back(new GeoLib::Point(nodes[id]->getCoords())); + pnts->push_back(new GeoLib::Point(*(nodes[id]), nodes[id]->getID())); pnt_names->insert(std::pair<std::string, std::size_t>( geo_name+"-PNT-"+std::to_string(cnt), cnt)); cnt++; diff --git a/Applications/Utils/MeshEdit/ResetPropertiesInPolygonalRegion.cpp b/Applications/Utils/MeshEdit/ResetPropertiesInPolygonalRegion.cpp index aa0da9be98c1b35d65ef10bb9924a1074a1441dc..e39fb434d6a165374357bf76dd884d66baaa3f7d 100644 --- a/Applications/Utils/MeshEdit/ResetPropertiesInPolygonalRegion.cpp +++ b/Applications/Utils/MeshEdit/ResetPropertiesInPolygonalRegion.cpp @@ -47,7 +47,7 @@ std::vector<bool> markNodesOutSideOfPolygon( // 1 copy all mesh nodes to GeoLib::Points std::vector<GeoLib::Point*> rotated_nodes; for (std::size_t j(0); j < nodes.size(); j++) - rotated_nodes.push_back(new GeoLib::Point(nodes[j]->getCoords())); + rotated_nodes.push_back(new GeoLib::Point(*nodes[j], nodes[j]->getID())); // 2 rotate the Points MathLib::DenseMatrix<double> rot_mat(3,3); GeoLib::computeRotationMatrixToXY(normal, rot_mat); diff --git a/FileIO/GmshIO/GMSHAdaptiveMeshDensity.cpp b/FileIO/GmshIO/GMSHAdaptiveMeshDensity.cpp index 9bde52b2f4036a6b82a835fb79757130b7f7f8be..40fb83994c4648e92cd65a4ba31008877f5bf9f1 100644 --- a/FileIO/GmshIO/GMSHAdaptiveMeshDensity.cpp +++ b/FileIO/GmshIO/GMSHAdaptiveMeshDensity.cpp @@ -52,7 +52,7 @@ void GMSHAdaptiveMeshDensity::init(std::vector<GeoLib::Point const*> const& pnts // *** QuadTree - determining bounding box DBUG("GMSHAdaptiveMeshDensity::init(): computing axis aligned bounding box (2D) for quadtree."); - GeoLib::Point min(pnts[0]->getCoords()), max(pnts[0]->getCoords()); + GeoLib::Point min(*pnts[0]), max(*pnts[0]); std::size_t n_pnts(pnts.size()); for (std::size_t k(1); k<n_pnts; k++) { for (std::size_t j(0); j < 2; j++) diff --git a/FileIO/TetGenInterface.cpp b/FileIO/TetGenInterface.cpp index 7f8f3a318dc3afed9d1eccddd0937f5880c3bfa0..5506d9c8e9b542abf27482c0c1b18aa318d5a6e3 100644 --- a/FileIO/TetGenInterface.cpp +++ b/FileIO/TetGenInterface.cpp @@ -70,7 +70,7 @@ bool TetGenInterface::readTetGenGeometry (std::string const& geo_fname, points->reserve(nNodes); for (std::size_t k(0); k<nNodes; ++k) { - points->push_back(new GeoLib::Point(nodes[k]->getCoords())); + points->push_back(new GeoLib::Point(*(nodes[k]), nodes[k]->getID())); delete nodes[k]; } std::string geo_name (BaseLib::extractBaseNameWithoutExtension(geo_fname)); diff --git a/GeoLib/Polygon.cpp b/GeoLib/Polygon.cpp index 77467cdb79c9c4adc1f384afafc2b2545828df99..8af1b1abcce2d440ad5a53ca042186db79508264 100644 --- a/GeoLib/Polygon.cpp +++ b/GeoLib/Polygon.cpp @@ -479,7 +479,7 @@ GeoLib::Polygon* createPolygonFromCircle (GeoLib::Point const& middle_pnt, doubl double angle (2.0 * M_PI / resolution); for (std::size_t k(0); k < resolution; k++) { - GeoLib::Point* pnt (new GeoLib::Point(middle_pnt.getCoords())); + GeoLib::Point* pnt(new GeoLib::Point(middle_pnt)); (*pnt)[0] += radius * cos (k * angle); (*pnt)[1] += radius * sin (k * angle); pnts.push_back (pnt); diff --git a/GeoLib/Station.cpp b/GeoLib/Station.cpp index 87660f029c7e54f38e3159a7d80c6a825e555e49..e88c3229efa57b92539d530e9d7d62c5e413df62 100644 --- a/GeoLib/Station.cpp +++ b/GeoLib/Station.cpp @@ -40,7 +40,7 @@ Station::Station(Point* coords, std::string name) : {} Station::Station(Station const& src) : - Point(src.getCoords()), _name(src._name), _type(src._type), + Point(src), _name(src._name), _type(src._type), _station_value(src._station_value), _sensor_data(nullptr) {} diff --git a/MeshLib/convertMeshToGeo.cpp b/MeshLib/convertMeshToGeo.cpp index 0a3b78bf1966101730a669b009e1c28bf8d0bbe0..3049fcccde8649a04a4542cfe58e06f5f34da03c 100644 --- a/MeshLib/convertMeshToGeo.cpp +++ b/MeshLib/convertMeshToGeo.cpp @@ -41,7 +41,7 @@ bool convertMeshToGeo(const MeshLib::Mesh &mesh, GeoLib::GEOObjects &geo_objects const std::vector<MeshLib::Node*> &nodes = mesh.getNodes(); for (unsigned i=0; i<nNodes; ++i) - (*points)[i] = new GeoLib::Point(nodes[i]->getCoords()); + (*points)[i] = new GeoLib::Point(*nodes[i], nodes[i]->getID()); std::string mesh_name (mesh.getName()); geo_objects.addPointVec(points, mesh_name, nullptr, eps);