Add orthogonal and parallel

This commit is contained in:
2024-04-20 20:34:53 +02:00
parent 0e5e6a9313
commit d218a67f42
4 changed files with 64 additions and 16 deletions

18
main.py
View File

@@ -1,5 +1,6 @@
from gdpc import Editor, Block, geometry
import networks.curve as curve
import networks.Curve as curve
import networks.Segment as segment
import numpy as np
editor = Editor(buffering=True)
@@ -13,10 +14,13 @@ editor = Editor(buffering=True)
# # Build a cube
# geometry.placeCuboid(editor, (458, 92, 488), (468, 99, 471), Block("oak_planks"))
curve = curve.Curve([(396, 132, 740), (435, 138, 730),
(443, 161, 758), (417, 73, 729)])
curve.compute_curve()
# curve = curve.Curve([(396, 132, 740), (435, 138, 730),
# (443, 161, 758), (417, 73, 729)])
# curve.compute_curve()
for point in curve.computed_points:
print(point)
editor.placeBlock(point, Block("stone"))
# for point in curve.computed_points:
# print(point)
# editor.placeBlock(point, Block("stone"))
print(segment.parrallel(((0, 0, 0), (0, 0, 10)), 10))
print(segment.orthogonal((0, 0, 0), (1, 0, 0), 10))