From 25dc6665b06887f7dd9a19d5d920520028eabd83 Mon Sep 17 00:00:00 2001 From: Xeon0X Date: Sun, 21 Apr 2024 18:37:11 +0200 Subject: [PATCH] Test --- main.py | 22 +++++++++++----------- networks/Curve.py | 5 ----- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/main.py b/main.py index 4510b56..c67b6d9 100644 --- a/main.py +++ b/main.py @@ -27,18 +27,18 @@ editor = Editor(buffering=True) # print(segment.orthogonal((0, 0, 0), (1, 0, 0), 10)) # print(curve.curvature(np.array(([0, 0, 0], [0, 1, 1], [1, 0, 1])))) -for i in range(10): - curve_points = curve.curve( - [(317, 90, 686), (291, 95, 686), (271, 100, 705), (250, 95, 715), (234, 90, 692), (220, 146, 607), (185, 158, 598), (146, 90, 596), (142, 70, 674)], resolution=160) - offset = curve.offset(curve_points, i) +i = 10 +curve_points = curve.curve( + [(317, 90, 686), (291, 95, 686), (271, 100, 705), (250, 95, 715), (234, 90, 692), (220, 146, 607), (185, 158, 598), (146, 90, 596), (142, 70, 674)], resolution=40) +offset = curve.offset(curve_points, i) - for coordinate in offset: - editor.placeBlock(coordinate, Block("blue_concrete")) +for coordinate in offset: + editor.placeBlock(coordinate, Block("blue_concrete")) - offset = curve.offset(curve_points, -i) +offset = curve.offset(curve_points, -i) - for coordinate in offset: - editor.placeBlock(coordinate, Block("red_concrete")) +for coordinate in offset: + editor.placeBlock(coordinate, Block("red_concrete")) - for coordinate in curve_points: - editor.placeBlock(coordinate, Block("white_concrete")) +for coordinate in curve_points: + editor.placeBlock(coordinate, Block("white_concrete")) diff --git a/networks/Curve.py b/networks/Curve.py index 23ecec5..fd04968 100644 --- a/networks/Curve.py +++ b/networks/Curve.py @@ -92,8 +92,3 @@ def offset(curve, distance): combined_curve.append(np.round(offset_segments[-1][1]).tolist()) return combined_curve - - # for i in range(1, len(offset_curve)-1): - # pass - -# TODO : Curve Offset