Skip to content

Commit

Permalink
Merge branch 'hotfix/0.4.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
ipadjen committed Jul 12, 2023
2 parents e4d6651 + 67684bb commit 75bf733
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
- name: Install dependencies
run: |
brew update
brew upgrade || true
brew install cmake boost cgal eigen libomp gdal
- name: Build
run: |
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## [0.4.2] - 2023-07-12
### Fixed
- Problematic compilation in debug mode

## [0.4.1] - 2023-06-05
### Fixed
- STL export bugfix
Expand Down
14 changes: 8 additions & 6 deletions src/PolyFeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include <CGAL/min_quadrilateral_2.h>
#include <CGAL/natural_neighbor_coordinates_2.h>
#ifndef NDEBUG
#include <CGAL/Barycentric_coordinates_2/Triangle_coordinates_2.h>
#include <CGAL/Barycentric_coordinates_2/triangle_coordinates_2.h>
#endif

PolyFeature::PolyFeature()
Expand Down Expand Up @@ -165,7 +165,6 @@ void PolyFeature::calc_footprint_elevation_nni(const DT& dt) {

#ifndef NDEBUG
void PolyFeature::calc_footprint_elevation_linear(const DT& dt) {
typedef CGAL::Barycentric_coordinates::Triangle_coordinates_2<iProjection_traits> Triangle_coordinates;
DT::Face_handle fh = nullptr;
for (auto& ring : _poly.rings()) {
std::vector<double> ringHeights;
Expand All @@ -180,11 +179,14 @@ void PolyFeature::calc_footprint_elevation_linear(const DT& dt) {
return;
}

Triangle_coordinates triangle_coordinates(fh->vertex(0)->point(),
fh->vertex(1)->point(),
fh->vertex(2)->point());
std::vector<double> coords;
triangle_coordinates(pt, std::back_inserter(coords));
CGAL::Barycentric_coordinates::triangle_coordinates_2(
Point_2(fh->vertex(0)->point().x(), fh->vertex(0)->point().y()),
Point_2(fh->vertex(1)->point().x(), fh->vertex(1)->point().y()),
Point_2(fh->vertex(2)->point().x(), fh->vertex(2)->point().y()),
Point_2(pt.x(), pt.y()),
std::back_inserter(coords)
);

double h = 0;
for (int i = 0; i < 3; ++i) {
Expand Down
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

#include <boost/algorithm/string/predicate.hpp>

std::string CITY4CFD_VERSION = "0.4.1";
std::string CITY4CFD_VERSION = "0.4.2";

void printWelcome() {
auto logo{
Expand Down

0 comments on commit 75bf733

Please sign in to comment.