wipeout.py 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. # Created: 08.04.2018
  2. # Copyright (c) 2018, Manfred Moitzi
  3. # License: MIT-License
  4. from .graphics import ExtendedTags, DXFAttr, DefSubclass, DXFAttributes
  5. from .graphics import none_subclass, entity_subclass, ModernGraphicEntity
  6. from .image import image_subclass
  7. from .dxfobjects import DXFObject
  8. _WIPEOUT_CLS = """0
  9. CLASS
  10. 1
  11. WIPEOUT
  12. 2
  13. AcDbWipeout
  14. 3
  15. WipeOut|Product Desc: Object Enabler for WipeOut entity | Company: Autodesk, Inc. | WEB Address: www.autodesk.com
  16. 90
  17. 2175
  18. 91
  19. 1
  20. 280
  21. 0
  22. 281
  23. 1
  24. """
  25. _WIPEOUT_TPL = """0
  26. WIPEOUT
  27. 5
  28. 0
  29. 330
  30. 0
  31. 100
  32. AcDbEntity
  33. 8
  34. 0
  35. 100
  36. AcDbWipeout
  37. 90
  38. 0
  39. 10
  40. 0.0
  41. 20
  42. 0.0
  43. 30
  44. 0.0
  45. 11
  46. 0.0
  47. 21
  48. 0.0
  49. 31
  50. 0.0
  51. 12
  52. 0.0
  53. 22
  54. 0.0
  55. 32
  56. 0.0
  57. 13
  58. 1.0
  59. 23
  60. 1.0
  61. 340
  62. 0
  63. 70
  64. 7
  65. 280
  66. 1
  67. 281
  68. 50
  69. 282
  70. 50
  71. 283
  72. 0
  73. 360
  74. 0
  75. 71
  76. 1
  77. 92
  78. 2
  79. """
  80. wipeout_subclass = image_subclass._replace(name='AcDbWipeout')
  81. class Wipeout(ModernGraphicEntity):
  82. # Requires AC1021/R2007
  83. __slots__ = ()
  84. TEMPLATE = ExtendedTags.from_text(_WIPEOUT_TPL)
  85. CLASS = ExtendedTags.from_text(_WIPEOUT_CLS)
  86. DXFATTRIBS = DXFAttributes(none_subclass, entity_subclass, wipeout_subclass)
  87. def destroy(self) -> None:
  88. return
  89. _WIPEOUT_VARIABLES_CLS = """0
  90. CLASS
  91. 1
  92. WIPEOUTVARIABLES
  93. 2
  94. AcDbWipeoutVariables
  95. 3
  96. "WipeOut|Product Desc: WipeOut Dbx Application|Company: Autodesk, Inc.|WEB Address: www.autodesk.com"
  97. 90
  98. 0
  99. 91
  100. 1
  101. 280
  102. 0
  103. 281
  104. 0
  105. """
  106. _WIPEOUT_VARIABLES_TPL = """0
  107. WIPEOUTVARIABLES
  108. 5
  109. 0
  110. 102
  111. {ACAD_REACTORS
  112. 102
  113. }
  114. 330
  115. 0
  116. 100
  117. AcDbWipeoutVariables
  118. 70
  119. 0
  120. """
  121. class WipeoutVariables(DXFObject):
  122. TEMPLATE = ExtendedTags.from_text(_WIPEOUT_VARIABLES_TPL)
  123. CLASS = ExtendedTags.from_text(_WIPEOUT_VARIABLES_CLS)
  124. DXFATTRIBS = DXFAttributes(
  125. none_subclass,
  126. DefSubclass('AcDbWipeoutVariables', {
  127. 'frame': DXFAttr(70, default=0), # Display-image-frame flag: 0 = No frame; 1 = Display frame
  128. }),
  129. )