stud

study spacejunk
Log | Files | Refs | LICENSE

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

formatting

Diffstat:
MKarto/assignment4/KTZ004_2019_04_brez.dwg | 0
MKarto/assignment4/measure.py | 21+++++++++++----------
2 files changed, 11 insertions(+), 10 deletions(-)

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 @@ -26,15 +26,11 @@ class Vertex: self.ang = angle self.dirang = dirang self.coords = coords - def __str__(self): - return "%2d: len:%7.3f acadang:%9.4f acadcoords:(%.3f,%.3f)" % \ - (self.point, self.len, - (90 - self.dirang), self.coords.acadx, self.coords.acady) -A= Dec('6.094') -B= Dec('-2.923') -C= Dec('-13.462') -N= Dec('9.512') +A = Dec('6.094') +B = Dec('-2.923') +C = Dec('-13.462') +N = Dec('9.512') # Directional coords + angle X11 = Dec('6091968.055') @@ -105,8 +101,13 @@ if __name__ == '__main__': print("angle sum %.4f, theoretical angle sum %d" % \ (angle_sum, theoretical_angle_sum)) - for v in vertices: - print(v) + for i, v in enumerate(vertices): + nxt = vertices[0 if i == len(vertices) - 1 else i+1] + + pts = "%d-%d" % (v.point, nxt.point) + draw = "@%.3f<%.4f" % (v.len, 90 - v.dirang) + print("%5s: %19s acadcoords:(%.3f,%.3f)" % \ + (pts, draw, v.coords.acadx, v.coords.acady)) print(""" Kelio A-03 plotis = 17.401 + A = %.3f""" % KA03_plotis + """