Fix errors approximations in arc circle introducing gaps between ars in roads
This commit is contained in:
101
main.py
101
main.py
@@ -35,48 +35,48 @@ def main():
|
||||
# editor.placeBlock(
|
||||
# (c[1][i][j].x, 110, c[1][i][j].y), Block("red_concrete"))
|
||||
|
||||
def place_segment(segment):
|
||||
segment.segment_thick(30, LINE_THICKNESS_MODE.MIDDLE)
|
||||
for i in range(len(segment.points_thick_by_line)):
|
||||
kk = i % 7
|
||||
match kk:
|
||||
case 0:
|
||||
blob = 'pink_concrete'
|
||||
case 1:
|
||||
blob = 'red_concrete'
|
||||
case 2:
|
||||
blob = 'orange_concrete'
|
||||
case 3:
|
||||
blob = 'yellow_concrete'
|
||||
case 4:
|
||||
blob = 'green_concrete'
|
||||
case 5:
|
||||
blob = 'blue_concrete'
|
||||
case 6:
|
||||
blob = 'purple_concrete'
|
||||
for j in range(len(segment.points_thick_by_line[i])):
|
||||
editor.placeBlock(Point3D.insert_3d(
|
||||
[segment.points_thick_by_line[i][j]], 'y', [134])[0].coordinates, Block(blob))
|
||||
for i in range(len(segment.gaps)):
|
||||
kk = i % 7
|
||||
match kk:
|
||||
case 0:
|
||||
blob = 'pink_concrete'
|
||||
case 1:
|
||||
blob = 'red_concrete'
|
||||
case 2:
|
||||
blob = 'orange_concrete'
|
||||
case 3:
|
||||
blob = 'yellow_concrete'
|
||||
case 4:
|
||||
blob = 'green_concrete'
|
||||
case 5:
|
||||
blob = 'blue_concrete'
|
||||
case 6:
|
||||
blob = 'purple_concrete'
|
||||
for j in range(len(segment.gaps[i])):
|
||||
editor.placeBlock(Point3D.insert_3d(
|
||||
[segment.gaps[i][j]], 'y', [135])[0].coordinates, Block(blob))
|
||||
# def place_segment(segment):
|
||||
# segment.segment_thick(30, LINE_THICKNESS_MODE.MIDDLE)
|
||||
# for i in range(len(segment.points_thick_by_line)):
|
||||
# kk = i % 7
|
||||
# match kk:
|
||||
# case 0:
|
||||
# blob = 'pink_concrete'
|
||||
# case 1:
|
||||
# blob = 'red_concrete'
|
||||
# case 2:
|
||||
# blob = 'orange_concrete'
|
||||
# case 3:
|
||||
# blob = 'yellow_concrete'
|
||||
# case 4:
|
||||
# blob = 'green_concrete'
|
||||
# case 5:
|
||||
# blob = 'blue_concrete'
|
||||
# case 6:
|
||||
# blob = 'purple_concrete'
|
||||
# for j in range(len(segment.points_thick_by_line[i])):
|
||||
# editor.placeBlock(Point3D.insert_3d(
|
||||
# [segment.points_thick_by_line[i][j]], 'y', [134])[0].coordinates, Block(blob))
|
||||
# for i in range(len(segment.gaps)):
|
||||
# kk = i % 7
|
||||
# match kk:
|
||||
# case 0:
|
||||
# blob = 'pink_concrete'
|
||||
# case 1:
|
||||
# blob = 'red_concrete'
|
||||
# case 2:
|
||||
# blob = 'orange_concrete'
|
||||
# case 3:
|
||||
# blob = 'yellow_concrete'
|
||||
# case 4:
|
||||
# blob = 'green_concrete'
|
||||
# case 5:
|
||||
# blob = 'blue_concrete'
|
||||
# case 6:
|
||||
# blob = 'purple_concrete'
|
||||
# for j in range(len(segment.gaps[i])):
|
||||
# editor.placeBlock(Point3D.insert_3d(
|
||||
# [segment.gaps[i][j]], 'y', [135])[0].coordinates, Block(blob))
|
||||
|
||||
# place_segment(Segment2D(Point2D(147, -616), Point2D(132, -554)))
|
||||
# # place_segment(Segment2D(Point2D(147, -616), Point2D(117, -563)))
|
||||
@@ -87,32 +87,29 @@ def main():
|
||||
# # place_segment(Segment2D(Point2D(147, -616), Point2D(195, -665)))
|
||||
# # place_segment(Segment2D(Point2D(147, -616), Point2D(204, -622)))
|
||||
# # place_segment(Segment2D(Point2D(147, -616), Point2D(178, -575)))
|
||||
|
||||
x = 200
|
||||
|
||||
# place_segment(Segment2D(Point2D(0+x, 0), Point2D(50+x, 0)))
|
||||
# place_segment(Segment2D(Point2D(0+x, 0), Point2D(50+x, 25)))
|
||||
# place_segment(Segment2D(Point2D(0+x, 0), Point2D(50+x, 50)))
|
||||
place_segment(Segment2D(Point2D(0+x, 0), Point2D(25+x, 50)))
|
||||
# place_segment(Segment2D(Point2D(0+x, 0), Point2D(25+x, 50)))
|
||||
# place_segment(Segment2D(Point2D(0+x, 0), Point2D(0+x, 50)))
|
||||
place_segment(Segment2D(Point2D(0+x, 0), Point2D(-25+x, 50)))
|
||||
# place_segment(Segment2D(Point2D(0+x, 0), Point2D(-25+x, 50)))
|
||||
# place_segment(Segment2D(Point2D(0+x, 0), Point2D(-50+x, 50)))
|
||||
# place_segment(Segment2D(Point2D(0+x, 0), Point2D(-50+x, 25)))
|
||||
# place_segment(Segment2D(Point2D(0+x, 0), Point2D(-50+x, 0)))
|
||||
# place_segment(Segment2D(Point2D(0+x, 0), Point2D(-50+x, -25)))
|
||||
# place_segment(Segment2D(Point2D(0+x, 0), Point2D(-50+x, -50)))
|
||||
place_segment(Segment2D(Point2D(0+x, 0), Point2D(-25+x, -50)))
|
||||
# place_segment(Segment2D(Point2D(0+x, 0), Point2D(-25+x, -50)))
|
||||
# place_segment(Segment2D(Point2D(0+x, 0), Point2D(0+x, -50)))
|
||||
place_segment(Segment2D(Point2D(0+x, 0), Point2D(25+x, -50)))
|
||||
# place_segment(Segment2D(Point2D(0+x, 0), Point2D(25+x, -50)))
|
||||
# place_segment(Segment2D(Point2D(0+x, 0), Point2D(50+x, -50)))
|
||||
|
||||
# place_segment(Segment2D(Point2D(147, -616), Point2D(201, -595)))
|
||||
# place_segment(Segment2D(Point2D(147, -616), Point2D(233, -605)))
|
||||
|
||||
y = 105
|
||||
y = 120
|
||||
|
||||
# Road([Point3D(121, 108+y, -68), Point3D(163, 108+y, -95), Point3D(173, 108+y, -169), Point3D(188, 108+y, -174), Point3D(229,
|
||||
# 108+y, -217), Point3D(190, 95+y, -270), Point3D(198, 95+y, -297), Point3D(237, 95+y, -287), Point3D(283, 95+y, -328)], 15)
|
||||
Road([Point3D(121, 108+y, -68), Point3D(163, 108+y, -95), Point3D(173, 108+y, -169), Point3D(188, 108+y, -174), Point3D(229,
|
||||
108+y, -217), Point3D(190, 95+y, -270), Point3D(198, 95+y, -297), Point3D(237, 95+y, -287), Point3D(283, 95+y, -328)], 15)
|
||||
|
||||
# Road([Point3D(464, 85+10, -225), Point3D(408, 105+10, -224),
|
||||
# Point3D(368, 104+10, -249), Point3D(368, 85+10, -296), Point3D(457, 79+10, -292)], 15)
|
||||
|
||||
Reference in New Issue
Block a user