Support larger printer sizes by using 64-bit.

SuperSlicer is referenced for some changes.

Co-authored-by: Merill <merill@free.fr>
This commit is contained in:
SoftFever 2024-05-10 23:42:28 +08:00
parent 5bceebdd9d
commit 9b2c2bff1d
87 changed files with 380 additions and 362 deletions

View file

@ -76,9 +76,9 @@ void Point::rotate(double angle, const Point &center)
*/
double Point::ccw(const Point &p1, const Point &p2) const
{
static_assert(sizeof(coord_t) == 4, "Point::ccw() requires a 32 bit coord_t");
return cross2((p2 - p1).cast<int64_t>(), (*this - p1).cast<int64_t>());
// return cross2((p2 - p1).cast<double>(), (*this - p1).cast<double>());
// static_assert(sizeof(coord_t) == 4, "Point::ccw() requires a 32 bit coord_t");
// return cross2((p2 - p1).cast<int64_t>(), (*this - p1).cast<int64_t>());
return cross2((p2 - p1).cast<double>(), (*this - p1).cast<double>());
}
double Point::ccw(const Line &line) const