stud

study spacejunk
Log | Files | Refs | LICENSE

commit f3cfc7f31488e4f6dfa619f3570ddfd86cd97367 (tree)
parent e29f86312b9d61b3f206e22d4207a0fad641ad4c
Author: Motiejus Jakštys <desired.mta@gmail.com>
Date:   Tue, 26 Nov 2019 12:50:59 +0200

add the final vertex

Diffstat:
MKarto/assignment4/KTZ004_2019_04_brez.dwg | 0
MKarto/assignment4/measure.py | 4+++-
2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/Karto/assignment4/KTZ004_2019_04_brez.dwg b/Karto/assignment4/KTZ004_2019_04_brez.dwg Binary files differ. diff --git a/Karto/assignment4/measure.py b/Karto/assignment4/measure.py @@ -64,6 +64,8 @@ vertices = [ Vertex(1, Dec('151.531'), guess('101-20-01')), Vertex(4, Dec('179.336'), guess('150-15-41')), ] +# adding the 11'th vertex to the end to see if the coordinates match +vertices.append(Vertex(11, Dec('164.126'), guess('103-03-03'))) angle_sum = Dec(0) for v in vertices: @@ -102,7 +104,7 @@ if __name__ == '__main__': (angle_sum, theoretical_angle_sum)) for i, v in enumerate(vertices): - nxt = vertices[0 if i == len(vertices) - 1 else i+1] + nxt = vertices[1 if i == len(vertices) - 1 else i+1] pts = "%d-%d" % (v.point, nxt.point) draw = "@%.3f<%.4f" % (v.len, 90 - v.dirang)