Advertisement
bobbuban

Untitled

Apr 16th, 2024
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. for idx, points in enumerate(layer_points):
  2. for point in points:
  3. point_coords = point[:2]
  4. hatch_texts = point[2:]
  5.  
  6. hatch_texts_sorted = sorted(hatch_texts, key=get_priority)
  7.  
  8. point_shapely = Point(*point_coords)
  9. for i, polygon in enumerate(polygons):
  10. if polygon.contains(point_shapely) and i not in added_areas:
  11. out_loop = [acadModel.AddPolyline(ADouble(all_cycles[i]))]
  12. for loop in out_loop:
  13. loop.Layer = 'Литологические границы'
  14.  
  15. for text in hatch_texts_sorted:
  16. hatch = acadModel.AddHatch(0, text, True)
  17. hatch.AppendOuterLoop(variants(out_loop))
  18. hatch.Evaluate()
  19. hatch.Layer = 'Литология'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement