mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-07-30 05:51:59 +08:00
parent
a2d24fece7
commit
e81e19cbc1
@ -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:
|
||||
|
@ -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<Pointf>&in ) {
|
||||
#include <boost/version.hpp>
|
||||
#include <boost/polygon/polygon.hpp>
|
||||
namespace boost { namespace polygon {
|
||||
#ifndef _WIN32
|
||||
template <>
|
||||
struct geometry_concept<coord_t> { typedef coordinate_concept type; };
|
||||
|
||||
#endif
|
||||
/* Boost.Polygon already defines a specialization for coordinate_traits<long> as of 1.60:
|
||||
https://github.com/boostorg/polygon/commit/0ac7230dd1f8f34cb12b86c8bb121ae86d3d9b97 */
|
||||
#if BOOST_VERSION < 106000
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
#include <boost/thread.hpp>
|
||||
#include <cstdint>
|
||||
|
||||
/* 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:
|
||||
|
@ -2,13 +2,14 @@
|
||||
|
||||
%{
|
||||
#include <xsinit.h>
|
||||
#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<Point> clone()
|
||||
%code{% RETVAL=THIS; %};
|
||||
|
Loading…
x
Reference in New Issue
Block a user