mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-08 07:46:39 +02:00
support JOIN_MITER
This commit is contained in:
@@ -65,15 +65,19 @@ module polyline2d(points, width, startingStyle = "CAP_SQUARE", endingStyle = "CA
|
|||||||
if(joinStyle == "JOIN_ROUND") {
|
if(joinStyle == "JOIN_ROUND") {
|
||||||
translate(p2)
|
translate(p2)
|
||||||
rotate(ra)
|
rotate(ra)
|
||||||
pie(
|
pie(
|
||||||
radius = radius,
|
radius = radius,
|
||||||
angle = [0, a],
|
angle = [0, a],
|
||||||
$fn = $fn * 360 / a
|
$fn = $fn * 360 / a
|
||||||
);
|
);
|
||||||
|
} else if(joinStyle == "JOIN_MITER") {
|
||||||
|
translate(p2)
|
||||||
|
rotate(ra)
|
||||||
|
polygon([[0, 0], [radius, 0], [radius, radius * tan(a / 2)], [radius * cos(a), radius * sin(a)]]);
|
||||||
} else { // "JOIN_BEVEL"
|
} else { // "JOIN_BEVEL"
|
||||||
translate(p2)
|
translate(p2)
|
||||||
rotate(ra)
|
rotate(ra)
|
||||||
polygon([[0, 0], [radius, 0], [radius * cos(a), radius * sin(a)]]);
|
polygon([[0, 0], [radius, 0], [radius * cos(a), radius * sin(a)]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
joins(line, radius, i_end, i + 1);
|
joins(line, radius, i_end, i + 1);
|
||||||
|
Reference in New Issue
Block a user