more drawing
This commit is contained in:
parent
3f18644fb7
commit
5c610d6609
@ -17,7 +17,7 @@ print("""=== Apskaiciuoti liniju stiliu kurimo parametrai (0.001 tikslumu) ===
|
||||
Plotis L1 (duotas)
|
||||
%.3f""" % L1 + """
|
||||
Visas kelio A-03 plotis
|
||||
*******
|
||||
%.3f""" % L1 + """
|
||||
Koeficientas L1 plocio atidejimui (+/-0.001)
|
||||
*******
|
||||
=== Kelias A-05 ===
|
||||
|
@ -1,24 +1,16 @@
|
||||
#!/usr/bin/env python3
|
||||
import matplotlib.pyplot as plt
|
||||
from shapely.geometry import LineString
|
||||
from math import sqrt
|
||||
|
||||
def heptagon(linelen, slant):
|
||||
inner_angle = 180*5/7
|
||||
pts = [(0, 0)]
|
||||
dx = linelen * sin(
|
||||
for _ in range(7):
|
||||
|
||||
def plot_line(ax, ob):
|
||||
x, y = ob.xy
|
||||
ax.plot(x, y, color='#6699cc', alpha=0.7, linewidth=3, solid_capstyle='round', zorder=2)
|
||||
from measure import *
|
||||
|
||||
fig, ax = plt.subplots()
|
||||
line = LineString([(0, 0), (1, 1), (0, 2), (2, 2), (3, 1), (1, 0)])
|
||||
|
||||
#plot_coords(ax, line)
|
||||
#plot_bounds(ax, line)
|
||||
plot_line(ax, line)
|
||||
KA03_l = LineString([Points[i].xy for i in [11,12,13,14,15,16,17,18] ])
|
||||
KA03_offset = KA03_l.parallel_offset(KA03_plotis, 'right', join_style=2)
|
||||
|
||||
ax.plot(*(KA03_l.xy), linewidth=1)
|
||||
ax.plot(*(KA03_offset.xy), linewidth=1, dashes=[5,5])
|
||||
|
||||
ax.set_title('Užliejamų plotų brėžinys')
|
||||
|
||||
|
@ -34,6 +34,11 @@ class Vertex:
|
||||
self.dirang = dirang
|
||||
self.coords = coords
|
||||
|
||||
@property
|
||||
def xy(self):
|
||||
"""xy returns a tuple of lksx and lksy coordinates"""
|
||||
return (self.coords.lksx, self.coords.lksy)
|
||||
|
||||
A = Dec('6.094')
|
||||
B = Dec('-2.923')
|
||||
C = Dec('-13.462')
|
||||
@ -125,6 +130,11 @@ K1 = Dec('13.147') + B
|
||||
# Atstumas iki tikrosios uzliejimo zonos (A1) (0.001 tikslumu)
|
||||
A1 = Dec('67.536') + B
|
||||
|
||||
# Points is vertice map by id
|
||||
Points = {}
|
||||
for v in vertices:
|
||||
Points[v.point] = v
|
||||
|
||||
if __name__ == '__main__':
|
||||
print("angle sum %.4f, theoretical angle sum %d" % \
|
||||
(angle_sum, theoretical_angle_sum))
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user