mirror of https://github.com/vitalif/openscad
Rename join_type "square" to the more commonly used "bevel".
parent
5d8507f725
commit
71f6abda24
|
@ -74,7 +74,7 @@ AbstractNode *OffsetModule::instantiate(const Context *ctx, const ModuleInstanti
|
||||||
Value join_type = c.lookup_variable("join_type", true);
|
Value join_type = c.lookup_variable("join_type", true);
|
||||||
if (join_type.type() == Value::STRING) {
|
if (join_type.type() == Value::STRING) {
|
||||||
std::string jt = join_type.toString();
|
std::string jt = join_type.toString();
|
||||||
if (std::string("square") == jt) {
|
if (std::string("bevel") == jt) {
|
||||||
node->join_type = ClipperLib::jtSquare;
|
node->join_type = ClipperLib::jtSquare;
|
||||||
} else if (std::string("round") == jt) {
|
} else if (std::string("round") == jt) {
|
||||||
node->join_type = ClipperLib::jtRound;
|
node->join_type = ClipperLib::jtRound;
|
||||||
|
@ -103,7 +103,7 @@ std::string OffsetNode::toString() const
|
||||||
<< "(delta = " << std::dec << this->delta
|
<< "(delta = " << std::dec << this->delta
|
||||||
<< ", join_type = "
|
<< ", join_type = "
|
||||||
<< (this->join_type == ClipperLib::jtSquare
|
<< (this->join_type == ClipperLib::jtSquare
|
||||||
? "square"
|
? "bevel"
|
||||||
: this->join_type == ClipperLib::jtRound
|
: this->join_type == ClipperLib::jtRound
|
||||||
? "round"
|
? "round"
|
||||||
: "miter")
|
: "miter")
|
||||||
|
|
|
@ -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(2, 2);
|
||||||
offset(delta = 1, join_type = "miter", miter_limit = 10) shape2(3, 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 = "bevel") shape2(2, -1);
|
||||||
offset(delta = 1, join_type = "square", miter_limit = 10) shape2(3, -1);
|
offset(delta = 1, join_type = "bevel") shape2(3, -1);
|
||||||
|
|
||||||
offset(delta = -5, join_type = "round") shape1(-1, 1);
|
offset(delta = -5, join_type = "round") shape1(-1, 1);
|
||||||
shape1(0, 1);
|
shape1(0, 1);
|
||||||
|
|
Loading…
Reference in New Issue