diff --git a/appveyor.yml b/appveyor.yml index b090aeea0..d943306dc 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -46,6 +46,7 @@ deploy_script: on_success: - ps: on_failure: - - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) +- ps: +# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) on_finish: - ps: diff --git a/xs/src/libslic3r/Point.hpp b/xs/src/libslic3r/Point.hpp index 4ffe1ddfc..d52e31aaf 100644 --- a/xs/src/libslic3r/Point.hpp +++ b/xs/src/libslic3r/Point.hpp @@ -35,7 +35,9 @@ class Point coord_t y; constexpr Point(coord_t _x = 0, coord_t _y = 0): x(_x), y(_y) {}; constexpr Point(int _x, int _y): x(_x), y(_y) {}; + #ifndef _WIN32 constexpr Point(long long _x, long long _y): x(_x), y(_y) {}; // for Clipper + #endif Point(double x, double y); static constexpr Point new_scale(coordf_t x, coordf_t y) { return Point(scale_(x), scale_(y)); @@ -184,9 +186,10 @@ scale(const std::vector&in ) { #include #include namespace boost { namespace polygon { +#ifndef _WIN32 template <> struct geometry_concept { typedef coordinate_concept type; }; - +#endif /* Boost.Polygon already defines a specialization for coordinate_traits as of 1.60: https://github.com/boostorg/polygon/commit/0ac7230dd1f8f34cb12b86c8bb121ae86d3d9b97 */ #if BOOST_VERSION < 106000 diff --git a/xs/src/libslic3r/libslic3r.h b/xs/src/libslic3r/libslic3r.h index 892330e62..da6aaa7ce 100644 --- a/xs/src/libslic3r/libslic3r.h +++ b/xs/src/libslic3r/libslic3r.h @@ -9,6 +9,7 @@ #include #include #include +#include /* Implementation of CONFESS("foo"): */ #ifdef _MSC_VER @@ -47,8 +48,13 @@ constexpr auto SLIC3R_VERSION = "1.3.1-dev"; #define BUILD_COMMIT VER_(SLIC3R_BUILD_COMMIT) #endif +#ifdef _WIN32 +typedef int64_t coord_t; +typedef double coordf_t; +#else typedef long coord_t; typedef double coordf_t; +#endif // Scaling factor for a conversion from coord_t to coordf_t: 10e-6 // This scaling generates a following fixed point representation with for a 32bit integer: diff --git a/xs/xsp/Point.xsp b/xs/xsp/Point.xsp index 60a4864e3..f66c835ae 100644 --- a/xs/xsp/Point.xsp +++ b/xs/xsp/Point.xsp @@ -2,13 +2,14 @@ %{ #include +#include "libslic3r/libslic3r.h" #include "libslic3r/Point.hpp" #include "libslic3r/Polygon.hpp" #include "libslic3r/Polyline.hpp" %} %name{Slic3r::Point} class Point { - Point(long _x = 0, long _y = 0); + Point(coord_t _x = 0, coord_t _y = 0); ~Point(); Clone clone() %code{% RETVAL=THIS; %};