Optimize circle gaps detection
This commit is contained in:
25
main.py
25
main.py
@@ -1,6 +1,6 @@
|
||||
import random
|
||||
|
||||
from gdpc import Editor
|
||||
from gdpc import Editor, Block
|
||||
|
||||
from House import *
|
||||
from networks.geometry.Point3D import Point3D
|
||||
@@ -11,13 +11,28 @@ from world_maker.Skeleton import Skeleton, simplify_coordinates
|
||||
from world_maker.terraforming import remove_trees, smooth_terrain
|
||||
from world_maker.world_maker import world_maker
|
||||
from networks.geometry.Point3D import Point3D
|
||||
from networks.geometry.Point3D import Point3D
|
||||
from networks.geometry.Point2D import Point2D
|
||||
from networks.geometry.Circle import Circle
|
||||
|
||||
|
||||
def main():
|
||||
y = 105
|
||||
Road([Point3D(3903, 137+y, -142), Point3D(3948, 111+y, -148),
|
||||
Point3D(3967, 112+y, -116), Point3D(4011, 112+y, -99)], 25)
|
||||
y = 30
|
||||
# Road([Point3D(4183, 100+y, -66), Point3D(4206, 102+y, -88), Point3D(4260, 112+y, -80),
|
||||
# Point3D(4267, 104+y, -108), Point3D(4230, 102+y, -129), Point3D(4220, 112+y, -213), Point3D(4121, 167+y, -249), Point3D(4052, 129+y, -179)], 25)
|
||||
|
||||
editor = Editor(buffering=True)
|
||||
c, g = Circle(Point2D(4422, -213)).circle_thick_by_line(10, 20)
|
||||
for i in range(len(g)):
|
||||
for j in range(len(g[i])):
|
||||
editor.placeBlock(Point3D.insert_3d(
|
||||
[g[i][j]], 'y', [103])[0].coordinates, Block("stone"))
|
||||
for i in range(len(c)):
|
||||
for j in range(len(c[i])):
|
||||
editor.placeBlock(Point3D.insert_3d(
|
||||
[c[i][j]], 'y', [103])[0].coordinates, Block("white_concrete"))
|
||||
|
||||
# Road([Point3D(4398, 87, -136), Point3D(4394, 101, -200), Point3D(4385, 112, -282), Point3D(4324,
|
||||
# 119, -302), Point3D(4304, 120, -249)], 9)
|
||||
# rectangle_house_mountain, rectangle_building, skeleton_highway, skeleton_mountain, road_grid = world_maker()
|
||||
|
||||
# editor = Editor(buffering=True)
|
||||
|
||||
Reference in New Issue
Block a user