mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-09 08:16:50 +02:00
refactor deps
This commit is contained in:
@@ -8,6 +8,8 @@
|
|||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
use <line2d.scad>;
|
||||||
|
|
||||||
module polyline2d(points, width, startingStyle = "CAP_SQUARE", endingStyle = "CAP_SQUARE") {
|
module polyline2d(points, width, startingStyle = "CAP_SQUARE", endingStyle = "CAP_SQUARE") {
|
||||||
leng_pts = len(points);
|
leng_pts = len(points);
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
include <unittest.scad>;
|
use <unittest.scad>;
|
||||||
include <line2d.scad>;
|
use <polyline2d.scad>;
|
||||||
|
|
||||||
module test_polyline2d() {
|
module test_polyline2d() {
|
||||||
|
|
||||||
@@ -55,8 +55,6 @@ module test_polyline2d() {
|
|||||||
module test_polyline2d_cap_square() {
|
module test_polyline2d_cap_square() {
|
||||||
echo("==== test_polyline2d_cap_square ====");
|
echo("==== test_polyline2d_cap_square ====");
|
||||||
|
|
||||||
include <polyline2d.scad>;
|
|
||||||
|
|
||||||
module test_polyline2d_line_segment(index, point1, point2, width, p1Style, p2Style) {
|
module test_polyline2d_line_segment(index, point1, point2, width, p1Style, p2Style) {
|
||||||
|
|
||||||
assertCorrectSegment(index, point1, point2, width);
|
assertCorrectSegment(index, point1, point2, width);
|
||||||
@@ -69,52 +67,8 @@ module test_polyline2d() {
|
|||||||
polyline2d(points = points, width = line_width);
|
polyline2d(points = points, width = line_width);
|
||||||
}
|
}
|
||||||
|
|
||||||
module test_polyline2d_cap_end_round() {
|
|
||||||
echo("==== test_polyline2d_cap_end_round ====");
|
|
||||||
|
|
||||||
include <polyline2d.scad>;
|
|
||||||
|
|
||||||
module test_polyline2d_line_segment(index, point1, point2, width, p1Style, p2Style) {
|
|
||||||
|
|
||||||
assertCorrectSegment(index, point1, point2, width);
|
|
||||||
assertCorrectCaps(
|
|
||||||
"CAP_SQUARE", "CAP_ROUND",
|
|
||||||
index, p1Style, p2Style
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
polyline2d(
|
|
||||||
points = points,
|
|
||||||
width = line_width,
|
|
||||||
endingStyle = "CAP_ROUND"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
module test_polyline2d_cap_round() {
|
|
||||||
echo("==== test_polyline2d_cap_round ====");
|
|
||||||
|
|
||||||
include <polyline2d.scad>;
|
|
||||||
|
|
||||||
module test_polyline2d_line_segment(index, point1, point2, width, p1Style, p2Style) {
|
|
||||||
|
|
||||||
assertCorrectSegment(index, point1, point2, width);
|
|
||||||
assertCorrectCaps(
|
|
||||||
"CAP_ROUND", "CAP_ROUND",
|
|
||||||
index, p1Style, p2Style
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
polyline2d(
|
|
||||||
points = points,
|
|
||||||
width = line_width,
|
|
||||||
startingStyle = "CAP_ROUND",
|
|
||||||
endingStyle = "CAP_ROUND"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
test_polyline2d_cap_square();
|
test_polyline2d_cap_square();
|
||||||
test_polyline2d_cap_end_round();
|
|
||||||
test_polyline2d_cap_round();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
test_polyline2d();
|
test_polyline2d();
|
Reference in New Issue
Block a user