autocad 0.4.6 → 0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop/minitest.yml +2 -2
  3. data/.rubocop/strict.yml +4 -4
  4. data/.rubocop.yml +36 -33
  5. data/CHANGELOG.md +5 -5
  6. data/LICENSE.txt +21 -21
  7. data/README.md +134 -39
  8. data/Rakefile +26 -10
  9. data/exe/autocad +3 -3
  10. data/gemfiles/rubocop.gemfile +2 -1
  11. data/lib/autocad/app.rb +127 -28
  12. data/lib/autocad/arc.rb +3 -0
  13. data/lib/autocad/block.rb +11 -6
  14. data/lib/autocad/block_reference.rb +33 -4
  15. data/lib/autocad/bounding_box.rb +202 -0
  16. data/lib/autocad/dim_style.rb +4 -0
  17. data/lib/autocad/drawing.rb +873 -172
  18. data/lib/autocad/element.rb +217 -25
  19. data/lib/autocad/errors.rb +9 -0
  20. data/lib/autocad/filter.rb +502 -168
  21. data/lib/autocad/layer.rb +129 -41
  22. data/lib/autocad/layout.rb +120 -0
  23. data/lib/autocad/line.rb +154 -55
  24. data/lib/autocad/message_box.rb +95 -95
  25. data/lib/autocad/model.rb +217 -89
  26. data/lib/autocad/mtext.rb +189 -110
  27. data/lib/autocad/plot.rb +45 -0
  28. data/lib/autocad/plot_configuration.rb +372 -0
  29. data/lib/autocad/point.rb +7 -0
  30. data/lib/autocad/point3d.rb +18 -11
  31. data/lib/autocad/pviewport.rb +136 -21
  32. data/lib/autocad/selection_filter.rb +358 -180
  33. data/lib/autocad/selection_set.rb +140 -61
  34. data/lib/autocad/selection_set_adapter.rb +187 -8
  35. data/lib/autocad/spline.rb +27 -0
  36. data/lib/autocad/text.rb +66 -11
  37. data/lib/autocad/text_style.rb +4 -0
  38. data/lib/autocad/version.rb +1 -1
  39. data/lib/autocad/viewport.rb +57 -0
  40. data/lib/autocad.rb +126 -30
  41. data/lib/faa/cleanup.rb +137 -0
  42. data/lib/win32ole_helper.rb +52 -0
  43. data/rbs_collection.lock.yaml +38 -18
  44. data/sig/generated/autocad/app.rbs +278 -251
  45. data/sig/generated/autocad/arc.rbs +6 -3
  46. data/sig/generated/autocad/block.rbs +8 -5
  47. data/sig/generated/autocad/block_reference.rbs +99 -59
  48. data/sig/generated/autocad/bounding_box.rbs +78 -0
  49. data/sig/generated/autocad/dim_style.rbs +6 -0
  50. data/sig/generated/autocad/drawing.rbs +597 -158
  51. data/sig/generated/autocad/element.rbs +233 -166
  52. data/sig/generated/autocad/errors.rbs +29 -23
  53. data/sig/generated/autocad/filter.rbs +388 -60
  54. data/sig/generated/autocad/layer.rbs +76 -19
  55. data/sig/generated/autocad/layout.rbs +64 -0
  56. data/sig/generated/autocad/line.rbs +128 -25
  57. data/sig/generated/autocad/message_box.rbs +81 -81
  58. data/sig/generated/autocad/model.rbs +115 -41
  59. data/sig/generated/autocad/mtext.rbs +123 -0
  60. data/sig/generated/autocad/plot.rbs +26 -0
  61. data/sig/generated/autocad/plot_configuration.rbs +176 -0
  62. data/sig/generated/autocad/point.rbs +7 -0
  63. data/sig/generated/autocad/point3d.rbs +70 -66
  64. data/sig/generated/autocad/pviewport.rbs +64 -0
  65. data/sig/generated/autocad/selection_filter.rbs +226 -50
  66. data/sig/generated/autocad/selection_set.rbs +112 -37
  67. data/sig/generated/autocad/selection_set_adapter.rbs +235 -28
  68. data/sig/generated/autocad/spline.rbs +22 -0
  69. data/sig/generated/autocad/text.rbs +66 -7
  70. data/sig/generated/autocad/text_style.rbs +6 -0
  71. data/sig/generated/autocad/viewport.rbs +19 -2
  72. data/sig/generated/autocad.rbs +140 -68
  73. data/sig/generated/faa/cleanup.rbs +53 -0
  74. data/sig/generated/win32ole_helper.rbs +9 -0
  75. data/sig/prototype/lib/autocad/app.rbs +3 -1
  76. data/sig/prototype/lib/autocad/bounding_box.rbs +15 -0
  77. data/sig/prototype/lib/autocad/drawing.rbs +6 -0
  78. data/sig/prototype/lib/autocad/layer.rbs +5 -0
  79. data/sig/prototype/lib/autocad/viewport.rbs +7 -0
  80. data/sig/prototype/lib/autocad.rbs +1 -1
  81. metadata +29 -5
  82. data/event_handler.log +0 -24
  83. data/sig/generated/autocad/text_node.rbs +0 -37
@@ -1,166 +1,233 @@
1
- # Generated from lib/autocad/element.rb with RBS::Inline
2
-
3
- class WIN32OLE
4
- def to_ole: () -> untyped
5
- end
6
-
7
- module Autocad
8
- end
9
-
10
- module Autocad
11
- module ElementTrait
12
- #
13
- #
14
- #
15
- # @rbs return bool -- true if ole type is Text
16
- def text?: () -> bool
17
-
18
- # @rbs return bool -- true if ole type is TextNode
19
- def text_node?: () -> bool
20
-
21
- def has_tags?: () -> untyped
22
-
23
- def to_ole: () -> untyped
24
-
25
- # @rbs return bool -- true if object is of type cell
26
- def cell?: () -> bool
27
-
28
- def complex?: () -> untyped
29
-
30
- # @rbs return bool -- true if Text or TextNode
31
- def textual?: () -> bool
32
-
33
- def autocad_id: () -> untyped
34
-
35
- def visible?: () -> untyped
36
-
37
- # @rbs return bool -- true if ole type is TypeLine
38
- def line?: () -> bool
39
-
40
- def graphical?: () -> untyped
41
-
42
- def inspect: () -> untyped
43
-
44
- def parent: () -> untyped
45
-
46
- def id_from_record: (untyped id) -> untyped
47
-
48
- def select: () -> untyped
49
-
50
- def autocad_type: () -> untyped
51
-
52
- def model: () -> untyped
53
- end
54
-
55
- class Element
56
- include ElementTrait
57
-
58
- def self.convert_item: (untyped ole, untyped app, ?untyped cell) -> untyped
59
-
60
- def self.ole_object?: () -> untyped
61
-
62
- attr_reader ole_obj: untyped
63
-
64
- attr_reader app: untyped
65
-
66
- attr_reader acad_type: untyped
67
-
68
- attr_reader original: untyped
69
-
70
- def initialize: (untyped ole, untyped app, untyped typ, ?untyped cell) -> untyped
71
-
72
- def in_cell?: () -> untyped
73
-
74
- def read_ole: (untyped ole) -> untyped
75
-
76
- def write_ole: (untyped value) -> untyped
77
-
78
- def method_missing: (untyped meth, *untyped) ?{ (?) -> untyped } -> untyped
79
-
80
- def get_property_handler: () -> untyped
81
-
82
- def property_handler: () -> untyped
83
-
84
- def []: (untyped name) -> untyped
85
-
86
- def do_update: (untyped value) -> untyped
87
-
88
- def update: (untyped value) -> untyped
89
-
90
- def updated?: () -> untyped
91
-
92
- def redraw: (?untyped el) -> untyped
93
-
94
- def app_ole_obj: () -> untyped
95
-
96
- def delete: () -> untyped
97
-
98
- def clone: (untyped new_insertion_point) -> untyped
99
-
100
- def move_x: (untyped amt) -> untyped
101
-
102
- def move_y: (untyped amt) -> untyped
103
-
104
- def move: (untyped x, untyped y) -> untyped
105
-
106
- def move_ole: (untyped pt1, untyped pt2) -> untyped
107
-
108
- def ole_cell: (untyped ole) -> untyped
109
-
110
- def each_complex: (untyped ole) ?{ (?) -> untyped } -> untyped
111
- end
112
-
113
- class App
114
- def ole_to_ruby: (untyped ole) -> untyped
115
- end
116
- end
117
-
118
- module Autocad
119
- class Arc < Element
120
- end
121
- end
122
-
123
- module Autocad
124
- class Ellipse < Element
125
- end
126
- end
127
-
128
- module Autocad
129
- class BSplineSurface < Element
130
- end
131
- end
132
-
133
- module Autocad
134
- class Linetype < Element
135
- CONTINUOUS: ::String
136
-
137
- DASHED: ::String
138
-
139
- CENTER: ::String
140
-
141
- HIDDEN: ::String
142
-
143
- PHANTOM: ::String
144
-
145
- BREAK: ::String
146
-
147
- BORDER: ::String
148
-
149
- DOT2: ::String
150
-
151
- DOTX2: ::String
152
-
153
- DIVIDE: ::String
154
-
155
- TRACKING: ::String
156
-
157
- DASHDOT: ::String
158
-
159
- def name: () -> untyped
160
- end
161
- end
162
-
163
- module Autocad
164
- class BSplineCurve < Element
165
- end
166
- end
1
+ # Generated from lib/autocad/element.rb with RBS::Inline
2
+
3
+ class WIN32OLE
4
+ def ole_respond_to?: (untyped name) -> untyped
5
+
6
+ def to_ole: () -> untyped
7
+ end
8
+
9
+ module Autocad
10
+ end
11
+
12
+ module Autocad
13
+ module AcadEntity
14
+ def layer: () -> untyped
15
+
16
+ def layer=: (untyped name) -> untyped
17
+
18
+ def line_type: () -> untyped
19
+
20
+ def line_type=: (untyped name) -> untyped
21
+
22
+ def visible?: () -> untyped
23
+
24
+ def copy: () -> untyped
25
+
26
+ def intersects_with: (untyped obj) -> untyped
27
+
28
+ def mirror: () -> untyped
29
+
30
+ def move_to: () -> untyped
31
+
32
+ def transform_by: (untyped matrix) -> untyped
33
+ end
34
+
35
+ module ElementTrait
36
+ # Get the parent drawing of this element
37
+ # @rbs return Drawing?
38
+ def drawing: () -> Drawing?
39
+
40
+ # Check if this element is a paper space viewport
41
+ # @rbs return bool
42
+ def pviewport?: () -> bool
43
+
44
+ # Check if this element is a block reference
45
+ # @rbs return bool
46
+ def block_reference?: () -> bool
47
+
48
+ def bounds: () -> untyped
49
+
50
+ #
51
+ #
52
+ #
53
+ #
54
+ # @rbs return bool -- true if ole type is Text
55
+ # def text?
56
+ # Check if this element is a text object
57
+ # @rbs return bool
58
+ def text?: () -> bool
59
+
60
+ # Explode this element into its component parts
61
+ # @rbs &: (Element) -> void
62
+ # @rbs return Enumerator[Element]
63
+ def explode: () { (Element) -> void } -> Enumerator[Element]
64
+
65
+ # Check if this element has any tags
66
+ # @rbs return bool
67
+ def has_tags?: () -> bool
68
+
69
+ # Get the underlying OLE object
70
+ # @rbs return WIN32OLE
71
+ def to_ole: () -> WIN32OLE
72
+
73
+ # Check if this element is a cell
74
+ # @rbs return bool
75
+ def cell?: () -> bool
76
+
77
+ # Highlight this element in the drawing
78
+ # @rbs flag: bool
79
+ # @rbs return void
80
+ def highlight: (?bool flag) -> void
81
+
82
+ def def: (untyped autocad_id) -> untyped
83
+
84
+ # Check if this element is visible
85
+ # @rbs return bool
86
+ def visible?: () -> bool
87
+
88
+ # Check if this element is a line
89
+ # @rbs return bool
90
+ def line?: () -> bool
91
+
92
+ # Check if this element is graphical
93
+ # @rbs return bool
94
+ def graphical?: () -> bool
95
+
96
+ # Get string representation of this element
97
+ # @rbs return String
98
+ def inspect: () -> String
99
+
100
+ # Get the parent element
101
+ # @rbs return Element?
102
+ def parent: () -> Element?
103
+
104
+ # Convert record ID to element ID
105
+ # @rbs id: WIN32OLE_RECORD
106
+ # @rbs return Integer?
107
+ def id_from_record: (WIN32OLE_RECORD id) -> Integer?
108
+
109
+ # Select this element in the drawing
110
+ # @rbs return void
111
+ def select: () -> void
112
+
113
+ # Get the AutoCAD object type name
114
+ # @rbs return String
115
+ def autocad_type: () -> String
116
+
117
+ # Get the model containing this element
118
+ # @rbs return Model
119
+ def model: () -> Model
120
+ end
121
+
122
+ class Element
123
+ include ElementTrait
124
+
125
+ def self.convert_item: (untyped ole, untyped app, ?untyped cell) -> untyped
126
+
127
+ def self.ole_object?: () -> untyped
128
+
129
+ attr_reader ole_obj: untyped
130
+
131
+ attr_reader app: untyped
132
+
133
+ attr_reader acad_type: untyped
134
+
135
+ attr_reader original: untyped
136
+
137
+ def initialize: (untyped ole, untyped app, untyped typ, ?untyped cell) -> untyped
138
+
139
+ def in_cell?: () -> untyped
140
+
141
+ def read_ole: (untyped ole) -> untyped
142
+
143
+ def write_ole: (untyped value) -> untyped
144
+
145
+ def method_missing: (untyped meth, *untyped) ?{ (?) -> untyped } -> untyped
146
+
147
+ def get_property_handler: () -> untyped
148
+
149
+ def property_handler: () -> untyped
150
+
151
+ def []: (untyped name) -> untyped
152
+
153
+ def do_update: (untyped value) -> untyped
154
+
155
+ def update: (untyped value) -> untyped
156
+
157
+ def updated?: () -> untyped
158
+
159
+ def redraw: (?untyped el) -> untyped
160
+
161
+ def app_ole_obj: () -> untyped
162
+
163
+ def delete: (?regen: untyped) -> untyped
164
+
165
+ def clone: (untyped new_insertion_point) -> untyped
166
+
167
+ def move_x: (untyped amt) -> untyped
168
+
169
+ def move_y: (untyped amt) -> untyped
170
+
171
+ def move: (untyped x, untyped y) -> untyped
172
+
173
+ def move_ole: (untyped pt1, untyped pt2) -> untyped
174
+
175
+ def ole_cell: (untyped ole) -> untyped
176
+
177
+ def each_complex: (untyped ole) ?{ (?) -> untyped } -> untyped
178
+ end
179
+
180
+ class App
181
+ def ole_to_ruby: (untyped ole) -> untyped
182
+ end
183
+ end
184
+
185
+ module Autocad
186
+ class Arc < Element
187
+ end
188
+ end
189
+
190
+ module Autocad
191
+ class Ellipse < Element
192
+ end
193
+ end
194
+
195
+ module Autocad
196
+ class BSplineSurface < Element
197
+ end
198
+ end
199
+
200
+ module Autocad
201
+ class Linetype < Element
202
+ CONTINUOUS: ::String
203
+
204
+ DASHED: ::String
205
+
206
+ CENTER: ::String
207
+
208
+ HIDDEN: ::String
209
+
210
+ PHANTOM: ::String
211
+
212
+ BREAK: ::String
213
+
214
+ BORDER: ::String
215
+
216
+ DOT2: ::String
217
+
218
+ DOTX2: ::String
219
+
220
+ DIVIDE: ::String
221
+
222
+ TRACKING: ::String
223
+
224
+ DASHDOT: ::String
225
+
226
+ def name: () -> untyped
227
+ end
228
+ end
229
+
230
+ module Autocad
231
+ class BSplineCurve < Element
232
+ end
233
+ end
@@ -1,23 +1,29 @@
1
- # Generated from lib/autocad/errors.rb with RBS::Inline
2
-
3
- module Autocad
4
- Error: untyped
5
-
6
- NonDGNFile: untyped
7
-
8
- class FileNotFound < Error
9
- def initialize: (untyped path) -> untyped
10
- end
11
-
12
- MultipleUpdateError: untyped
13
-
14
- class DrawingError < Error
15
- attr_reader drawing: untyped
16
-
17
- def initialize: (untyped message, untyped drawing) -> untyped
18
- end
19
-
20
- class ExistingFile < Error
21
- def initialize: (untyped path) -> untyped
22
- end
23
- end
1
+ # Generated from lib/autocad/errors.rb with RBS::Inline
2
+
3
+ module Autocad
4
+ Error: untyped
5
+
6
+ NonDGNFile: untyped
7
+
8
+ class FileNotFound < Error
9
+ def initialize: (untyped path) -> untyped
10
+ end
11
+
12
+ MultipleUpdateError: untyped
13
+
14
+ class DrawingError < Error
15
+ attr_reader drawing: untyped
16
+
17
+ def initialize: (untyped message, untyped drawing) -> untyped
18
+ end
19
+
20
+ class DrawingClose < Error
21
+ attr_reader drawing_name: untyped
22
+
23
+ def initialize: (untyped message, untyped drawing_name) -> untyped
24
+ end
25
+
26
+ class ExistingFile < Error
27
+ def initialize: (untyped path) -> untyped
28
+ end
29
+ end