1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-15 03:05:41 +02:00

use built-in angle

This commit is contained in:
Justin Lin
2019-06-11 09:26:26 +08:00
parent a56d443686
commit 799790932e
2 changed files with 3 additions and 2 deletions

View File

@@ -12,8 +12,8 @@ include <__private__/__frags.scad>;
include <__private__/__ra_to_xy.scad>;
module ring_extrude(shape_pts, radius, angle = 360, twist = 0, scale = 1.0, triangles = "SOLID") {
if(angle == 360 && twist == 0 && scale == 1.0) {
rotate_extrude()
if(twist == 0 && scale == 1.0) {
rotate_extrude(angle = angle)
translate([radius, 0, 0])
polygon(shape_pts);
} else {

View File

@@ -95,6 +95,7 @@ module test_ring_extrude_not_closed() {
[-2, -10]
];
ring_extrude(shape_pts, radius = 50, angle = 180);
ring_extrude(shape_pts, radius = 50, angle = 180, scale = 2);
}