Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def make_plane_view(self, y):
- straights_on_side = {}
- straights_with_ends = {}
- straights = []
- dict_ = {}
- for side_coef in self.polys_sides_with_coef.keys():
- flag_found = False
- for side_coef_t in self.polys_sides_with_coef_1.keys():
- if side_coef_t == side_coef:
- polygon = self.polys_sides_with_coef_1
- flag_found = True
- break
- if not flag_found:
- for side_coef_2t in self.polys_sides_with_coef_2.keys():
- if side_coef_2t == side_coef:
- polygon = self.polys_sides_with_coef_2
- flag_found = True
- break
- bones = self.have_intersection(y, self.polys_sides_with_coef[side_coef])
- if bones:
- # print('side: ' + str(self.polys_sides_with_coef[side_coef]))
- # print('side coef: ' + str(side_coef))
- # print('bones: ' + str(bones))
- end_list = self.find_straights_ends(side_coef, y, polygon)
- if end_list:
- dict_[side_coef] = end_list
- # straight_coef = self.planes_intersection(y, side_coef)
- # straights.append(straight_coef) # shouldnt be here !!!!!!! надо добавлять, когда точно будет 2 конца отрезка
- # straights_on_side[straight_coef] = side_coef # аналогично
- # straights_with_ends[straight_coef] = end_list
- for side_coef in dict_.keys():
- end_list = dict_[side_coef]
- straight_coef = self.planes_intersection(y, side_coef)
- straights.append(straight_coef) # shouldnt be here !!!!!!! надо добавлять, когда точно будет 2 конца отрезка
- straights_on_side[straight_coef] = side_coef # аналогично
- straights_with_ends[straight_coef] = end_list
- return straights_with_ends, straights_on_side, straights
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement