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,60 +1,388 @@
1
- # Generated from lib/autocad/filter.rb with RBS::Inline
2
-
3
- module Autocad
4
- class Filter
5
- attr_reader types: untyped
6
-
7
- attr_reader values: untyped
8
-
9
- attr_reader clauses: untyped
10
-
11
- def initialize: (?clauses: untyped) -> untyped
12
-
13
- def new_filter: (untyped clause, untyped value) -> untyped
14
-
15
- def has_filters?: () -> untyped
16
-
17
- # convert the clauses to the values and types needed for autocad filter
18
- # rbs return Array[Array,Array] -- the types and values array
19
- def convert_clauses: () -> untyped
20
-
21
- # Logical Operators
22
- def and: (*untyped conditions) -> untyped
23
-
24
- def merge_conditions: (untyped existing, untyped new_condition) -> untyped
25
-
26
- def or: (*untyped conditions) -> untyped
27
-
28
- def xor: (untyped condition1, untyped condition2) -> untyped
29
-
30
- def not: (untyped condition) -> untyped
31
-
32
- # Relational Operators
33
- # f.type("Circle").greater_than(5)
34
- def greater_than: (untyped value) -> untyped
35
-
36
- def less_than: (untyped value) -> untyped
37
-
38
- def equal_to: (untyped value) -> untyped
39
-
40
- def not_equal_to: (untyped value) -> untyped
41
-
42
- def block_reference: (?untyped name) -> untyped
43
-
44
- def name: (untyped value) -> untyped
45
-
46
- def type: (untyped kind) -> untyped
47
-
48
- def layer: (untyped name) -> untyped
49
-
50
- def visible: (?untyped vis) -> untyped
51
-
52
- def color: (untyped num) -> untyped
53
-
54
- def paper_space: () -> untyped
55
-
56
- def model_space: () -> untyped
57
-
58
- def contains: (untyped str) -> untyped
59
- end
60
- end
1
+ # Generated from lib/autocad/filter.rb with RBS::Inline
2
+
3
+ module Autocad
4
+ # Builds complex filter expressions for AutoCAD entity selection
5
+ #
6
+ # This class provides a functional, immutable approach to building
7
+ # selection filters with a fluent interface. Each method returns a new
8
+ # Filter instance with the added condition.
9
+ #
10
+ # The Filter class is the core of the selection system, providing:
11
+ # - Logical operators (AND, OR, XOR, NOT)
12
+ # - Property filters (type, layer, color, etc.)
13
+ # - Numeric comparisons (greater than, less than, etc.)
14
+ # - Special entity filters (block references, text, etc.)
15
+ #
16
+ # @example Create a filter for red circles
17
+ # filter = Filter.new
18
+ # .type("CIRCLE")
19
+ # .color(1)
20
+ #
21
+ # @example Combine filters with logical operators
22
+ # text_filter = Filter.new.type("TEXT").or.type("MTEXT")
23
+ # layer_filter = Filter.new.layer("NOTES")
24
+ # combined = Filter.new.and(text_filter, layer_filter)
25
+ #
26
+ # @example Complex filter with nested conditions
27
+ # filter = Filter.new.and(
28
+ # Filter.new.or(
29
+ # Filter.new.type("CIRCLE"),
30
+ # Filter.new.type("ARC")
31
+ # ),
32
+ # Filter.new.not(
33
+ # Filter.new.layer("HIDDEN")
34
+ # )
35
+ # )
36
+ class Filter
37
+ # @return [Array<Integer>] DXF group codes for filtering
38
+ # @return [Array<Object>] Values corresponding to types
39
+ # @return [Hash<Symbol, Object>] Internal representation of filter conditions
40
+ # @rbs attr_reader types: Array[Integer] -- DXF group codes for filtering
41
+ # @rbs attr_reader values: Array[untyped] -- Values corresponding to types
42
+ # @rbs attr_reader clauses: Hash[Symbol, untyped] -- Internal representation of filter conditions
43
+ attr_reader types: untyped
44
+
45
+ # @return [Array<Integer>] DXF group codes for filtering
46
+ # @return [Array<Object>] Values corresponding to types
47
+ # @return [Hash<Symbol, Object>] Internal representation of filter conditions
48
+ # @rbs attr_reader types: Array[Integer] -- DXF group codes for filtering
49
+ # @rbs attr_reader values: Array[untyped] -- Values corresponding to types
50
+ # @rbs attr_reader clauses: Hash[Symbol, untyped] -- Internal representation of filter conditions
51
+ attr_reader values: untyped
52
+
53
+ # @return [Array<Integer>] DXF group codes for filtering
54
+ # @return [Array<Object>] Values corresponding to types
55
+ # @return [Hash<Symbol, Object>] Internal representation of filter conditions
56
+ # @rbs attr_reader types: Array[Integer] -- DXF group codes for filtering
57
+ # @rbs attr_reader values: Array[untyped] -- Values corresponding to types
58
+ # @rbs attr_reader clauses: Hash[Symbol, untyped] -- Internal representation of filter conditions
59
+ attr_reader clauses: untyped
60
+
61
+ # Initialize a new filter with optional clauses
62
+ #
63
+ # @param clauses [Hash<Symbol, Object>] Initial filter clauses
64
+ # @return [void]
65
+ # @rbs clauses: Hash[Symbol, untyped] -- Initial filter clauses
66
+ # @rbs return void
67
+ def initialize: (?clauses: Hash[Symbol, untyped]) -> void
68
+
69
+ # Create a new filter with an additional clause
70
+ #
71
+ # This method implements the immutable pattern - instead of modifying
72
+ # the current filter, it returns a new filter with the added clause.
73
+ #
74
+ # @param clause [Symbol] The clause type
75
+ # @param value [Object] The clause value
76
+ # @return [Filter] A new filter instance
77
+ # @rbs clause: Symbol -- The clause type
78
+ # @rbs value: untyped -- The clause value
79
+ # @rbs return Filter -- A new filter instance
80
+ def new_filter: (Symbol clause, untyped value) -> Filter
81
+
82
+ # Check if filter has any conditions
83
+ #
84
+ # @return [Boolean] True if the filter has conditions
85
+ # @note This implementation always returns true and should be fixed
86
+ # to check if clauses.any? instead
87
+ # @rbs return bool -- Always returns true (should check clauses.any?)
88
+ def has_filters?: () -> bool
89
+
90
+ # Convert the clauses to AutoCAD selection filter format
91
+ #
92
+ # Transforms the internal filter representation into the format
93
+ # expected by AutoCAD's selection API: arrays of group codes and values.
94
+ #
95
+ # @return [Array<Array<Integer>, Array<Object>>] The types and values arrays
96
+ # @rbs return [Array[Integer], Array[untyped]] -- The types and values arrays
97
+ def convert_clauses: () -> [ Array[Integer], Array[untyped] ]
98
+
99
+ # Logical AND combination of filters
100
+ #
101
+ # Creates a new filter that combines multiple conditions with AND logic.
102
+ # All conditions must be met for an entity to be selected.
103
+ #
104
+ # @param conditions [Array<Filter>] Filters to combine
105
+ # @return [Filter] A new filter with AND condition
106
+ # @example Combine type and layer filters
107
+ # f.and(f.type("CIRCLE"), f.layer("WALLS"))
108
+ # @example Complex nested AND condition
109
+ # f.and(
110
+ # f.layer("ELECTRICAL"),
111
+ # f.or(f.type("LINE"), f.type("POLYLINE"))
112
+ # )
113
+ # @rbs *conditions: Array[Filter] -- Filters to combine
114
+ # @rbs return Filter -- A new filter with AND condition
115
+ def and: (*Array[Filter] conditions) -> Filter
116
+
117
+ # Placeholder for merging conditions (unimplemented)
118
+ #
119
+ # @note This method is a placeholder and not currently implemented
120
+ # @param existing [Filter] Existing filter
121
+ # @param new_condition [Filter] New filter to merge
122
+ # @return [void]
123
+ # @rbs existing: Filter -- Existing filter
124
+ # @rbs new_condition: Filter -- New filter to merge
125
+ # @rbs return void
126
+ def merge_conditions: (Filter existing, Filter new_condition) -> void
127
+
128
+ # Logical OR combination of filters
129
+ #
130
+ # Creates a new filter that combines multiple conditions with OR logic.
131
+ # Any condition can be met for an entity to be selected.
132
+ #
133
+ # @param conditions [Array<Filter>] Filters to combine
134
+ # @return [Filter] A new filter with OR condition
135
+ # @example Select circles or arcs
136
+ # f.or(f.type("CIRCLE"), f.type("ARC"))
137
+ # @example Select entities on multiple layers
138
+ # f.or(f.layer("WALLS"), f.layer("DOORS"), f.layer("WINDOWS"))
139
+ # @rbs *conditions: Array[Filter] -- Filters to combine
140
+ # @rbs return Filter -- A new filter with OR condition
141
+ def or: (*Array[Filter] conditions) -> Filter
142
+
143
+ # Logical XOR combination of two filters
144
+ #
145
+ # Creates a new filter that combines two conditions with XOR logic.
146
+ # Exactly one condition must be met for an entity to be selected.
147
+ #
148
+ # @param condition1 [Filter] First filter
149
+ # @param condition2 [Filter] Second filter
150
+ # @return [Filter] A new filter with XOR condition
151
+ # @example Select circles or red entities, but not red circles
152
+ # f.xor(f.type("CIRCLE"), f.color(1))
153
+ # @rbs condition1: Filter -- First filter
154
+ # @rbs condition2: Filter -- Second filter
155
+ # @rbs return Filter -- A new filter with XOR condition
156
+ def xor: (Filter condition1, Filter condition2) -> Filter
157
+
158
+ # Logical NOT of a filter
159
+ #
160
+ # Creates a new filter that negates a condition.
161
+ # Entities that do NOT meet the condition will be selected.
162
+ #
163
+ # @param condition [Filter] Filter to negate
164
+ # @return [Filter] A new filter with NOT condition
165
+ # @example Select all entities except circles
166
+ # f.not(f.type("CIRCLE"))
167
+ # @example Select entities not on the HIDDEN layer
168
+ # f.not(f.layer("HIDDEN"))
169
+ # @rbs condition: Filter -- Filter to negate
170
+ # @rbs return Filter -- A new filter with NOT condition
171
+ def not: (Filter condition) -> Filter
172
+
173
+ # Filter for values greater than specified value
174
+ #
175
+ # Creates a new filter for numeric comparisons.
176
+ # Typically used for radius, length, or other dimensional properties.
177
+ #
178
+ # @param value [Numeric] Value to compare against
179
+ # @return [Filter] A new filter with greater than condition
180
+ # @example Filter for circles with radius > 5
181
+ # f.type("CIRCLE").greater_than(5)
182
+ # @example Filter for lines longer than 10 units
183
+ # f.type("LINE").greater_than(10)
184
+ # @rbs value: Numeric -- Value to compare against
185
+ # @rbs return Filter -- A new filter with greater than condition
186
+ def greater_than: (Numeric value) -> Filter
187
+
188
+ # Filter for values less than specified value
189
+ #
190
+ # Creates a new filter for numeric comparisons.
191
+ # Typically used for radius, length, or other dimensional properties.
192
+ #
193
+ # @param value [Numeric] Value to compare against
194
+ # @return [Filter] A new filter with less than condition
195
+ # @example Filter for circles with radius < 10
196
+ # f.type("CIRCLE").less_than(10)
197
+ # @example Filter for text with height < 2.5
198
+ # f.type("TEXT").less_than(2.5)
199
+ # @rbs value: Numeric -- Value to compare against
200
+ # @rbs return Filter -- A new filter with less than condition
201
+ def less_than: (Numeric value) -> Filter
202
+
203
+ # Filter for values equal to specified value
204
+ #
205
+ # Creates a new filter for exact numeric matches.
206
+ # Useful for standardized dimensions or properties.
207
+ #
208
+ # @param value [Numeric] Value to compare against
209
+ # @return [Filter] A new filter with equal to condition
210
+ # @example Filter for circles with radius = 7.5
211
+ # f.type("CIRCLE").equal_to(7.5)
212
+ # @example Filter for text with exact height
213
+ # f.type("TEXT").equal_to(3.0)
214
+ # @rbs value: Numeric -- Value to compare against
215
+ # @rbs return Filter -- A new filter with equal to condition
216
+ def equal_to: (Numeric value) -> Filter
217
+
218
+ # Filter for values not equal to specified value
219
+ #
220
+ # Creates a new filter that excludes entities with specific values.
221
+ #
222
+ # @param value [Numeric] Value to compare against
223
+ # @return [Filter] A new filter with not equal to condition
224
+ # @example Filter for circles with radius != 0
225
+ # f.type("CIRCLE").not_equal_to(0)
226
+ # @example Filter for non-standard text heights
227
+ # f.type("TEXT").not_equal_to(2.5)
228
+ # @rbs value: Numeric -- Value to compare against
229
+ # @rbs return Filter -- A new filter with not equal to condition
230
+ def not_equal_to: (Numeric value) -> Filter
231
+
232
+ # Filter for block references (optionally with specific name)
233
+ #
234
+ # Creates a new filter for block reference entities.
235
+ # Optionally filters for a specific block name pattern.
236
+ #
237
+ # @param name [String, nil] Block name pattern (e.g., "DOOR*")
238
+ # @return [Filter] A new filter for block references
239
+ # @example Filter for any block reference
240
+ # f.block_reference
241
+ # @example Filter for door block references
242
+ # f.block_reference("DOOR*")
243
+ # @example Filter for furniture with specific naming pattern
244
+ # f.block_reference("FURN_*_CHAIR")
245
+ # @rbs name: String? -- Block name pattern (e.g., "DOOR*")
246
+ # @rbs return Filter -- A new filter for block references
247
+ def block_reference: (?String? name) -> Filter
248
+
249
+ # Filter by entity name
250
+ #
251
+ # Creates a new filter for entities with specific names.
252
+ # Useful for named objects like blocks, layers, etc.
253
+ #
254
+ # @param value [String] Entity name
255
+ # @return [Filter] A new filter for entity name
256
+ # @example Filter by specific entity name
257
+ # f.name("A123")
258
+ # @example Filter by name pattern
259
+ # f.name("DOOR_*")
260
+ # @rbs value: String -- Entity name
261
+ # @rbs return Filter -- A new filter for entity name
262
+ def name: (String value) -> Filter
263
+
264
+ # Filter by entity type
265
+ #
266
+ # Creates a new filter for entities of a specific type.
267
+ # This is one of the most common filters.
268
+ #
269
+ # @param kind [String] AutoCAD entity type (e.g., "LINE", "CIRCLE")
270
+ # @return [Filter] A new filter for entity type
271
+ # @example Filter for lines
272
+ # f.type("LINE")
273
+ # @example Filter for circles
274
+ # f.type("CIRCLE")
275
+ # @example Filter for multi-line text
276
+ # f.type("MTEXT")
277
+ # @rbs kind: String -- AutoCAD entity type (e.g., "LINE", "CIRCLE")
278
+ # @rbs return Filter -- A new filter for entity type
279
+ def type: (String kind) -> Filter
280
+
281
+ # Filter by layer name
282
+ #
283
+ # Creates a new filter for entities on a specific layer.
284
+ # Supports exact layer names or wildcard patterns.
285
+ #
286
+ # @param name [String] Layer name
287
+ # @return [Filter] A new filter for layer
288
+ # @example Filter for entities on WALLS layer
289
+ # f.layer("WALLS")
290
+ # @example Filter for entities on any layer starting with "A-"
291
+ # f.layer("A-*")
292
+ # @rbs name: String -- Layer name
293
+ # @rbs return Filter -- A new filter for layer
294
+ def layer: (String name) -> Filter
295
+
296
+ # Filter by visibility
297
+ #
298
+ # Creates a new filter for entity visibility.
299
+ # By default, filters for visible entities.
300
+ #
301
+ # @param vis [Boolean] True for visible, false for invisible
302
+ # @return [Filter] A new filter for visibility
303
+ # @example Filter for visible entities
304
+ # f.visible(true)
305
+ # @example Filter for hidden entities
306
+ # f.visible(false)
307
+ # @rbs vis: bool -- True for visible, false for invisible
308
+ # @rbs return Filter -- A new filter for visibility
309
+ def visible: (?bool vis) -> Filter
310
+
311
+ # Filter by color index
312
+ #
313
+ # Creates a new filter for entities with a specific color.
314
+ # Accepts color index (1-255) or symbolic color names.
315
+ #
316
+ # @param num [Integer] AutoCAD color index (0-255)
317
+ # @return [Filter] A new filter for color
318
+ # @example Filter for red entities
319
+ # f.color(1) # Red
320
+ # @example Filter for blue entities
321
+ # f.color(5) # Blue
322
+ # @example Filter for entities with specific color
323
+ # f.color(Autocad::Color::Green)
324
+ # @rbs num: Integer -- AutoCAD color index (0-255)
325
+ # @rbs return Filter -- A new filter for color
326
+ def color: (Integer num) -> Filter
327
+
328
+ # Filter for paper space entities
329
+ #
330
+ # Creates a new filter for entities in paper space (layouts).
331
+ #
332
+ # @return [Filter] A new filter for paper space
333
+ # @example Filter for paper space entities
334
+ # f.paper_space
335
+ # @example Filter for title blocks in paper space
336
+ # f.and(f.paper_space, f.block_reference("TITLE*"))
337
+ # @rbs return Filter -- A new filter for paper space
338
+ def paper_space: () -> Filter
339
+
340
+ # Filter for model space entities
341
+ #
342
+ # Creates a new filter for entities in model space.
343
+ #
344
+ # @return [Filter] A new filter for model space
345
+ # @example Filter for model space entities
346
+ # f.model_space
347
+ # @example Filter for circles in model space
348
+ # f.and(f.model_space, f.type("CIRCLE"))
349
+ # @rbs return Filter -- A new filter for model space
350
+ def model_space: () -> Filter
351
+
352
+ # Filter for text containing a string pattern
353
+ #
354
+ # Creates a new filter for text entities containing specific content.
355
+ # Works with both TEXT and MTEXT entities.
356
+ #
357
+ # @param str [String] Text pattern to search for
358
+ # @return [Filter] A new filter for text content
359
+ # @example Filter for text containing "REVISION"
360
+ # f.has_text("REVISION")
361
+ # @example Filter for text containing a specific pattern
362
+ # f.has_text("*REV*")
363
+ # @rbs str: String -- Text pattern to search for
364
+ # @rbs return Filter -- A new filter for text content
365
+ def has_text: (String str) -> Filter
366
+
367
+ # Filter for any text entity
368
+ #
369
+ # Creates a new filter for any text entity (TEXT or MTEXT).
370
+ #
371
+ # @return [Filter] A new filter for text entities
372
+ # @example Filter for any text entity
373
+ # f.text
374
+ # @example Filter for text on a specific layer
375
+ # f.and(f.text, f.layer("NOTES"))
376
+ def text: () -> untyped
377
+
378
+ # Filter for entities with specific linetype
379
+ #
380
+ # Creates a new filter for entities with a specific linetype.
381
+ #
382
+ # @param name [String] Linetype name
383
+ # @return [Filter] A new filter for linetype
384
+ # @example Filter for entities with DASHED linetype
385
+ # f.linetype("DASHED")
386
+ def linetype: (untyped name) -> untyped
387
+ end
388
+ end
@@ -1,19 +1,76 @@
1
- # Generated from lib/autocad/layer.rb with RBS::Inline
2
-
3
- module Autocad
4
- class Layer < Element
5
- def name: () -> untyped
6
-
7
- def description: () -> untyped
8
-
9
- def lock: (?untyped lk) -> untyped
10
-
11
- def visible?: () -> untyped
12
-
13
- def visible=: (untyped vis) -> untyped
14
-
15
- def delete: () -> untyped
16
-
17
- def linetype=: (untyped ltname) -> untyped
18
- end
19
- end
1
+ # Generated from lib/autocad/layer.rb with RBS::Inline
2
+
3
+ module Autocad
4
+ class Layer < Element
5
+ # @rbs return String -- the name of the layer
6
+ def name: () -> String
7
+
8
+ # Get the color of the layer
9
+ # @rbs return Integer -- the color index of the layer
10
+ def color: () -> Integer
11
+
12
+ # Set the color of the layer
13
+ # @rbs color: Integer|Symbol -- the color to set (can be ACAD::COLOR constant, symbol, or integer)
14
+ # @rbs return void
15
+ def color=: (Integer | Symbol color) -> void
16
+
17
+ # Get the symbolic color name if available
18
+ # @rbs return Symbol|Integer -- the symbolic color name or integer if no name exists
19
+ def color_name: () -> (Symbol | Integer)
20
+
21
+ # set the name of the layer
22
+ # @rbs name: String
23
+ # @rbs return void
24
+ def name=: (String name) -> void
25
+
26
+ def description: () -> untyped
27
+
28
+ # is the layer the active layer
29
+ # @rbs return bool
30
+ def active?: () -> bool
31
+
32
+ # Activates the current layer by setting it as the active layer in the drawing.
33
+ # This method assigns the current layer's OLE object to the ActiveLayer property of the drawing's OLE object.
34
+ #
35
+ # @rbs return void
36
+ def activate: () -> void
37
+
38
+ # @rbs return bool
39
+ def frozen?: () -> bool
40
+
41
+ # freeze the layer - entities on layer are invisible and wont be
42
+ # regenerated
43
+ def freeze: () -> untyped
44
+
45
+ # unfreeze the layer
46
+ def unfreeze: () -> untyped
47
+
48
+ # @rbs return bool
49
+ def thawed?: () -> bool
50
+
51
+ # lock the layer - entities on layer can't be changed
52
+ def lock: () -> untyped
53
+
54
+ # unlock the layer
55
+ def unlock: () -> untyped
56
+
57
+ # @rbs return bool -- true if layer is locked
58
+ def locked?: () -> bool
59
+
60
+ def visible?: () -> untyped
61
+
62
+ def visible=: (untyped vis) -> untyped
63
+
64
+ # turn on the layer.
65
+ def turn_on: () -> untyped
66
+
67
+ def turn_off: () -> untyped
68
+
69
+ # @rbs return bool
70
+ def on?: () -> bool
71
+
72
+ def delete: () -> untyped
73
+
74
+ def linetype=: (untyped ltname) -> untyped
75
+ end
76
+ end
@@ -0,0 +1,64 @@
1
+ # Generated from lib/autocad/layout.rb with RBS::Inline
2
+
3
+ module Autocad
4
+ class Layout < PlotConfiguration
5
+ # Inserts a block into the layout
6
+ # @rbs block: Block
7
+ # @rbs pt: Point3d?
8
+ # @rbs return void
9
+ def insert_block: (Block block, ?pt: Point3d?) -> void
10
+
11
+ # Get the layout name
12
+ # @rbs return String
13
+ def name: () -> String
14
+
15
+ # Set the layout name
16
+ # @rbs str: String
17
+ # @rbs return void
18
+ def name=: (String str) -> void
19
+
20
+ # Copy plot settings from another configuration
21
+ # @rbs pc: PlotConfiguration
22
+ # @rbs return void
23
+ def copy_plot_configuration: (PlotConfiguration pc) -> void
24
+
25
+ # Insert a block reference into the layout
26
+ # @rbs name: String
27
+ # @rbs pt: Point3d
28
+ # @rbs rotation: Float
29
+ # @rbs scale: Float
30
+ # @rbs return BlockReference?
31
+ # @raise [StandardError] On insertion failure
32
+ def add_block_reference: (String name, pt: Point3d, ?rotation: Float, ?scale: Float) -> BlockReference?
33
+
34
+ # Get layout tab order position
35
+ # @rbs return Integer
36
+ def tab_order: () -> Integer
37
+
38
+ # Set layout tab order position
39
+ # @rbs n: Integer
40
+ # @rbs return void
41
+ def tab_order=: (Integer n) -> void
42
+
43
+ # Get paper dimensions in millimeters
44
+ # @rbs return [Float, Float]
45
+ def paper_size: () -> [ Float, Float ]
46
+
47
+ # Calculate usable area bounds with margins
48
+ # @rbs return BoundingBox
49
+ def bounds: () -> BoundingBox
50
+
51
+ # Get paper size in inches
52
+ # @rbs return [Float, Float]
53
+ def paper_size_inches: () -> [ Float, Float ]
54
+
55
+ # Add a paper space viewport
56
+ # @rbs scale: Symbol
57
+ # @rbs return PViewport
58
+ def add_pviewport: (?Symbol scale) -> PViewport
59
+
60
+ # Get page margins
61
+ # @rbs return [[Float, Float], [Float, Float]]
62
+ def paper_margins: () -> [ [ Float, Float ], [ Float, Float ] ]
63
+ end
64
+ end