sunstudy.py 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # Created: 08.04.2018
  2. # Copyright (c) 2018, Manfred Moitzi
  3. # License: MIT-License
  4. from .dxfobjects import ExtendedTags, DXFAttr, DefSubclass, DXFAttributes
  5. from .dxfobjects import none_subclass, DXFObject
  6. _SUNSTUDY_TPL = """0
  7. SUNSTUDY
  8. 5
  9. 0
  10. 330
  11. 0
  12. 100
  13. AcDbSunStudy
  14. 90
  15. 1
  16. 1
  17. 2
  18. """
  19. sunstudy_subclass = DefSubclass('AcDbSun', {
  20. 'version': DXFAttr(90),
  21. 'name': DXFAttr(1),
  22. 'description': DXFAttr(2),
  23. 'output_type': DXFAttr(70),
  24. 'sheet_set_name': DXFAttr(3), # Included only if Output type is Sheet Set.
  25. 'use_subset': DXFAttr(290), # Included only if Output type is Sheet Set.
  26. 'sheet_subset_name': DXFAttr(4), # Included only if Output type is Sheet Set.
  27. 'dates_from_calender': DXFAttr(291),
  28. 'date_input_array_size': DXFAttr(91), # represents the number of dates picked
  29. # 90 Julian day; represents the date. One entry for each date picked.
  30. # 90 Seconds past midnight; represents the time of day. One entry for each date picked.
  31. 'range_of_dates': DXFAttr(292),
  32. # 93 Start time. If range of dates flag is true.
  33. # 94 End time. If range of dates flag is true.
  34. # 95 Interval in seconds. If range of dates flag is true.
  35. 'hours_count': DXFAttr(73),
  36. # 290 Hour. One entry for every hour as specified by the number of hours entry above.
  37. 'page_setup_wizard_id': DXFAttr(340), # Page setup wizard hard pointer ID
  38. 'view_id': DXFAttr(341), # View hard pointer ID
  39. 'visual_style_id': DXFAttr(342), # Visual Style ID
  40. 'shade_plot_type': DXFAttr(74),
  41. 'viewports_per_page': DXFAttr(75),
  42. 'nrows': DXFAttr(76), # Number of rows for viewport distribution
  43. 'ncols': DXFAttr(77), # Number of columns for viewport distribution
  44. 'spacing': DXFAttr(40),
  45. 'lock_viewports': DXFAttr(293),
  46. 'label_viewports': DXFAttr(294),
  47. 'text_style_id': DXFAttr(343),
  48. })
  49. class SunStudy(DXFObject):
  50. # Requires AC1021/R2007
  51. __slots__ = ()
  52. TEMPLATE = ExtendedTags.from_text(_SUNSTUDY_TPL)
  53. DXFATTRIBS = DXFAttributes(none_subclass, sunstudy_subclass)