diff --git a/src/offset.cc b/src/offset.cc index 0ad06d08..c604ad64 100644 --- a/src/offset.cc +++ b/src/offset.cc @@ -74,7 +74,7 @@ AbstractNode *OffsetModule::instantiate(const Context *ctx, const ModuleInstanti Value join_type = c.lookup_variable("join_type", true); if (join_type.type() == Value::STRING) { std::string jt = join_type.toString(); - if (std::string("square") == jt) { + if (std::string("bevel") == jt) { node->join_type = ClipperLib::jtSquare; } else if (std::string("round") == jt) { node->join_type = ClipperLib::jtRound; @@ -103,7 +103,7 @@ std::string OffsetNode::toString() const << "(delta = " << std::dec << this->delta << ", join_type = " << (this->join_type == ClipperLib::jtSquare - ? "square" + ? "bevel" : this->join_type == ClipperLib::jtRound ? "round" : "miter") diff --git a/testdata/scad/features/offset-tests.scad b/testdata/scad/features/offset-tests.scad index af6655fc..9e55d584 100644 --- a/testdata/scad/features/offset-tests.scad +++ b/testdata/scad/features/offset-tests.scad @@ -23,8 +23,8 @@ offset(delta = 1, join_type = "miter") shape2(1, 2); offset(delta = -1, join_type = "miter", miter_limit = 10) shape2(2, 2); offset(delta = 1, join_type = "miter", miter_limit = 10) shape2(3, 2); -offset(delta = -1, join_type = "square", miter_limit = 10) shape2(2, -1); -offset(delta = 1, join_type = "square", miter_limit = 10) shape2(3, -1); +offset(delta = -1, join_type = "bevel") shape2(2, -1); +offset(delta = 1, join_type = "bevel") shape2(3, -1); offset(delta = -5, join_type = "round") shape1(-1, 1); shape1(0, 1);