autocad 0.4.6
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.
- checksums.yaml +7 -0
- data/.rubocop/minitest.yml +2 -0
- data/.rubocop/strict.yml +4 -0
- data/.rubocop.yml +33 -0
- data/.solargraph.yml +22 -0
- data/.vscode/launch.json +30 -0
- data/CHANGELOG.md +5 -0
- data/CODE_OF_CONDUCT.md +132 -0
- data/Guardfile +66 -0
- data/LICENSE.txt +21 -0
- data/README.md +39 -0
- data/Rakefile +10 -0
- data/Steepfile +35 -0
- data/WASD-D-TDS-C001.dwg +0 -0
- data/WASD-D-TDS-C001.pdf +0 -0
- data/autocad.log +1 -0
- data/autocad_example.rb +26 -0
- data/event_handler.log +24 -0
- data/examples/example_save_pdf.rb +5 -0
- data/exe/autocad +3 -0
- data/exe/dgn2pdf +50 -0
- data/exe/pw_print +43 -0
- data/gemfiles/rubocop.gemfile +6 -0
- data/lib/autocad/app.rb +655 -0
- data/lib/autocad/arc.rb +29 -0
- data/lib/autocad/block.rb +141 -0
- data/lib/autocad/block_reference.rb +198 -0
- data/lib/autocad/drawing.rb +426 -0
- data/lib/autocad/element.rb +454 -0
- data/lib/autocad/enumerator.rb +24 -0
- data/lib/autocad/errors.rb +37 -0
- data/lib/autocad/event_handler.rb +30 -0
- data/lib/autocad/filter.rb +168 -0
- data/lib/autocad/layer.rb +41 -0
- data/lib/autocad/line.rb +55 -0
- data/lib/autocad/message_box.rb +95 -0
- data/lib/autocad/model.rb +89 -0
- data/lib/autocad/mtext.rb +110 -0
- data/lib/autocad/paths.rb +29 -0
- data/lib/autocad/point3d.rb +143 -0
- data/lib/autocad/pviewport.rb +21 -0
- data/lib/autocad/selection_filter.rb +180 -0
- data/lib/autocad/selection_set.rb +61 -0
- data/lib/autocad/selection_set_adapter.rb +146 -0
- data/lib/autocad/text.rb +74 -0
- data/lib/autocad/version.rb +5 -0
- data/lib/autocad.rb +161 -0
- data/olegen.rb +341 -0
- data/rbs_collection.lock.yaml +188 -0
- data/rbs_collection.yaml +19 -0
- data/scanner.obj +0 -0
- data/sig/generated/autocad/app.rbs +251 -0
- data/sig/generated/autocad/arc.rbs +17 -0
- data/sig/generated/autocad/block.rbs +63 -0
- data/sig/generated/autocad/block_reference.rbs +59 -0
- data/sig/generated/autocad/drawing.rbs +158 -0
- data/sig/generated/autocad/element.rbs +166 -0
- data/sig/generated/autocad/enumerator.rbs +15 -0
- data/sig/generated/autocad/errors.rbs +23 -0
- data/sig/generated/autocad/event_handler.rbs +14 -0
- data/sig/generated/autocad/filter.rbs +60 -0
- data/sig/generated/autocad/layer.rbs +19 -0
- data/sig/generated/autocad/line.rbs +25 -0
- data/sig/generated/autocad/message_box.rbs +81 -0
- data/sig/generated/autocad/model.rbs +41 -0
- data/sig/generated/autocad/paths.rbs +19 -0
- data/sig/generated/autocad/point3d.rbs +66 -0
- data/sig/generated/autocad/selection_filter.rbs +50 -0
- data/sig/generated/autocad/selection_set.rbs +37 -0
- data/sig/generated/autocad/selection_set_adapter.rbs +28 -0
- data/sig/generated/autocad/text.rbs +19 -0
- data/sig/generated/autocad/text_node.rbs +37 -0
- data/sig/generated/autocad/version.rbs +5 -0
- data/sig/generated/autocad/viewport.rbs +11 -0
- data/sig/generated/autocad.rbs +68 -0
- data/sig/prototype/lib/autocad/app.rbs +34 -0
- data/sig/prototype/lib/autocad/block.rbs +5 -0
- data/sig/prototype/lib/autocad/block_reference.rbs +5 -0
- data/sig/prototype/lib/autocad/drawing.rbs +13 -0
- data/sig/prototype/lib/autocad/element.rbs +9 -0
- data/sig/prototype/lib/autocad/enumerator.rbs +5 -0
- data/sig/prototype/lib/autocad/event_handler.rbs +7 -0
- data/sig/prototype/lib/autocad/model.rbs +5 -0
- data/sig/prototype/lib/autocad/paths.rbs +5 -0
- data/sig/prototype/lib/autocad.rbs +3 -0
- data/temp/autocad.dwg +0 -0
- data/temp/autocad.log +1 -0
- data/temp/event_handler.log +0 -0
- metadata +147 -0
@@ -0,0 +1,15 @@
|
|
1
|
+
# Generated from lib/autocad/enumerator.rb with RBS::Inline
|
2
|
+
|
3
|
+
module Autocad
|
4
|
+
class Enumerator
|
5
|
+
include Enumerable
|
6
|
+
|
7
|
+
attr_reader app: untyped
|
8
|
+
|
9
|
+
def initialize: (untyped ole, untyped app) -> untyped
|
10
|
+
|
11
|
+
def each: () -> untyped
|
12
|
+
|
13
|
+
def reset: () -> untyped
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,23 @@
|
|
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
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# Generated from lib/autocad/event_handler.rb with RBS::Inline
|
2
|
+
|
3
|
+
module Autocad
|
4
|
+
class EventHandler
|
5
|
+
def initialize: () -> untyped
|
6
|
+
|
7
|
+
# @rbs event: String -- the event name to handle
|
8
|
+
def add_handler: (String event) ?{ (?) -> untyped } -> untyped
|
9
|
+
|
10
|
+
def get_handler: (untyped event) -> untyped
|
11
|
+
|
12
|
+
def method_missing: (untyped event, *untyped args) -> untyped
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,60 @@
|
|
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
|
@@ -0,0 +1,19 @@
|
|
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
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# Generated from lib/autocad/line.rb with RBS::Inline
|
2
|
+
|
3
|
+
module Autocad
|
4
|
+
class Line < Element
|
5
|
+
def length: () -> untyped
|
6
|
+
|
7
|
+
def line?: () -> untyped
|
8
|
+
|
9
|
+
def start_point: () -> untyped
|
10
|
+
|
11
|
+
def end_point: () -> untyped
|
12
|
+
end
|
13
|
+
|
14
|
+
class Circle < Element
|
15
|
+
def center: () -> untyped
|
16
|
+
|
17
|
+
def radius: () -> untyped
|
18
|
+
end
|
19
|
+
|
20
|
+
class Polyline < Element
|
21
|
+
def length: () -> untyped
|
22
|
+
|
23
|
+
def coordinates: () -> untyped
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,81 @@
|
|
1
|
+
# Generated from lib/autocad/message_box.rb with RBS::Inline
|
2
|
+
|
3
|
+
module WinAPI
|
4
|
+
extend Fiddle::Importer
|
5
|
+
|
6
|
+
include Fiddle::BasicTypes
|
7
|
+
|
8
|
+
include Fiddle::Win32Types
|
9
|
+
|
10
|
+
def get_foreground_window: () -> untyped
|
11
|
+
|
12
|
+
def self.get_text_of_active_window: () -> untyped
|
13
|
+
|
14
|
+
module MB
|
15
|
+
OK: ::Integer
|
16
|
+
|
17
|
+
CANCEL: ::Integer
|
18
|
+
|
19
|
+
ABORT: ::Integer
|
20
|
+
|
21
|
+
RETRY: ::Integer
|
22
|
+
|
23
|
+
IGNORE: ::Integer
|
24
|
+
|
25
|
+
YES: ::Integer
|
26
|
+
|
27
|
+
NO: ::Integer
|
28
|
+
|
29
|
+
module ICON
|
30
|
+
ERROR: ::Integer
|
31
|
+
|
32
|
+
QUESTION: ::Integer
|
33
|
+
|
34
|
+
INFORMATION: ::Integer
|
35
|
+
|
36
|
+
WARNING: ::Integer
|
37
|
+
end
|
38
|
+
|
39
|
+
module BTN
|
40
|
+
OK: ::Integer
|
41
|
+
|
42
|
+
OKCANCEL: ::Integer
|
43
|
+
|
44
|
+
ABORTRETRYIGNORE: ::Integer
|
45
|
+
|
46
|
+
YESNO: ::Integer
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
# msgbox_yesno('Do you want to continue?') do |y|
|
52
|
+
# if y
|
53
|
+
# puts 'proceeding with ...'
|
54
|
+
# else
|
55
|
+
# puts 'cancelled ...'
|
56
|
+
# end
|
57
|
+
# end
|
58
|
+
#
|
59
|
+
# msgbox('We are finished here')
|
60
|
+
#
|
61
|
+
# loop do
|
62
|
+
# puts WinAPI.get_text_of_active_window
|
63
|
+
# sleep 1
|
64
|
+
# end
|
65
|
+
module Kernel
|
66
|
+
# @rbs str: String
|
67
|
+
# @rbs return String
|
68
|
+
def self?.L: (String str) -> String
|
69
|
+
|
70
|
+
# @example
|
71
|
+
# msg_box_yesno("Do you want to continue") do |y|
|
72
|
+
# if y
|
73
|
+
# puts "proceeding"
|
74
|
+
# else
|
75
|
+
# puts "cancelled"
|
76
|
+
# end
|
77
|
+
# end
|
78
|
+
def self?.msgbox_yesno: (untyped content, ?title: untyped) -> untyped
|
79
|
+
|
80
|
+
def self?.msgbox: (untyped content, ?title: untyped) -> untyped
|
81
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# Generated from lib/autocad/model.rb with RBS::Inline
|
2
|
+
|
3
|
+
module Autocad
|
4
|
+
module ModelTrait
|
5
|
+
def each: () -> untyped
|
6
|
+
|
7
|
+
# @rbs pt1: Autocad::Point3d
|
8
|
+
# @rbs return Autocad::Line
|
9
|
+
def add_line: (Autocad::Point3d pt1, untyped pt2, ?layer: untyped) -> Autocad::Line
|
10
|
+
|
11
|
+
# @rbs center: [] | Point3d -- center of circle
|
12
|
+
# @rbs radius:
|
13
|
+
def add_circle: ([ ] | Point3d center, untyped radius) -> untyped
|
14
|
+
|
15
|
+
def add_rectangle: (untyped upper_left, untyped lower_right) -> untyped
|
16
|
+
|
17
|
+
def add_spline: (untyped points) -> untyped
|
18
|
+
|
19
|
+
def drawing: () -> untyped
|
20
|
+
end
|
21
|
+
|
22
|
+
class PaperSpace
|
23
|
+
include ModelTrait
|
24
|
+
|
25
|
+
attr_reader app: untyped
|
26
|
+
|
27
|
+
attr_reader ole_obj: untyped
|
28
|
+
|
29
|
+
def initialize: (untyped ole, untyped app) -> untyped
|
30
|
+
end
|
31
|
+
|
32
|
+
class ModelSpace
|
33
|
+
include ModelTrait
|
34
|
+
|
35
|
+
attr_reader app: untyped
|
36
|
+
|
37
|
+
attr_reader ole_obj: untyped
|
38
|
+
|
39
|
+
def initialize: (untyped ole, untyped app) -> untyped
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# Generated from lib/autocad/paths.rb with RBS::Inline
|
2
|
+
|
3
|
+
module Autocad
|
4
|
+
class Paths
|
5
|
+
include Enumerable
|
6
|
+
|
7
|
+
def initialize: (untyped path) -> untyped
|
8
|
+
|
9
|
+
def <<: (untyped path) -> untyped
|
10
|
+
|
11
|
+
def append: (untyped path) -> untyped
|
12
|
+
|
13
|
+
def prepend: (untyped path) -> untyped
|
14
|
+
|
15
|
+
def each: () -> untyped
|
16
|
+
|
17
|
+
def to_s: () -> untyped
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
# Generated from lib/autocad/point3d.rb with RBS::Inline
|
2
|
+
|
3
|
+
module Autocad
|
4
|
+
class Point3d
|
5
|
+
def self.cartesian_to_polar: (untyped x, untyped y) -> untyped
|
6
|
+
|
7
|
+
def self.from_polar_degrees: (untyped r, untyped a) -> untyped
|
8
|
+
|
9
|
+
def self.from_ole: (untyped ole) -> untyped
|
10
|
+
|
11
|
+
def self.polar_to_cartesian: (untyped r, untyped a) -> untyped
|
12
|
+
|
13
|
+
# convert array of points to array of x,y coordinates
|
14
|
+
# array can be [ Point3d, Point3d, ..]
|
15
|
+
# array can be [ [x,y,z], [x,y,z], [x,y,z] ..]
|
16
|
+
# array can be [x,y, x1, y1, x2,y2, x3,y3]
|
17
|
+
# array can be [[x,y], [x2,y2], [x3,y3]]
|
18
|
+
# all coordinates are converted to float
|
19
|
+
# z coordinates are ignored
|
20
|
+
# @rbs return Array[Float]
|
21
|
+
def self.pts_to_array: (untyped pts) -> Array[Float]
|
22
|
+
|
23
|
+
def self.array_to_ole: (untyped ar) -> untyped
|
24
|
+
|
25
|
+
attr_reader x: untyped
|
26
|
+
|
27
|
+
attr_reader y: untyped
|
28
|
+
|
29
|
+
attr_reader z: untyped
|
30
|
+
|
31
|
+
def initialize: (?untyped _x, ?untyped _y, ?untyped _z, ?x: untyped, ?y: untyped, ?z: untyped) -> untyped
|
32
|
+
|
33
|
+
# @rbs other: Point3d | [Float,Float,Float]
|
34
|
+
def +: (Point3d | [ Float, Float, Float ] other) -> untyped
|
35
|
+
|
36
|
+
def distance_to: (untyped other) -> untyped
|
37
|
+
|
38
|
+
# @rbs return [Float,Float, Float]
|
39
|
+
def deconstruct: () -> [ Float, Float, Float ]
|
40
|
+
|
41
|
+
# @rbs return { x: Float, y: Float, z: Float}
|
42
|
+
def deconstruct_keys: () -> { x: Float, y: Float, z: Float }
|
43
|
+
|
44
|
+
# @rbs return [Float,Float, Float]
|
45
|
+
def to_ary: () -> [ Float, Float, Float ]
|
46
|
+
|
47
|
+
# @rbs other: Point3d | [Float,Float,Float]
|
48
|
+
def -: (Point3d | [ Float, Float, Float ] other) -> untyped
|
49
|
+
|
50
|
+
def to_xy: () -> untyped
|
51
|
+
|
52
|
+
def xy_bounds: (untyped other) -> untyped
|
53
|
+
|
54
|
+
def to_s: () -> untyped
|
55
|
+
|
56
|
+
# @rbs return [Float,Float, Float]
|
57
|
+
def to_a: () -> [ Float, Float, Float ]
|
58
|
+
|
59
|
+
# @rbs return Point3d -- return a Point3d at [0,0,0]
|
60
|
+
def zero: () -> Point3d
|
61
|
+
|
62
|
+
def to_cartesian: () -> untyped
|
63
|
+
|
64
|
+
def to_ole: () -> untyped
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# Generated from lib/autocad/selection_filter.rb with RBS::Inline
|
2
|
+
|
3
|
+
module Autocad
|
4
|
+
class SelectionFilter
|
5
|
+
attr_reader types: untyped
|
6
|
+
|
7
|
+
attr_reader values: untyped
|
8
|
+
|
9
|
+
def initialize: () -> untyped
|
10
|
+
|
11
|
+
def has_filters?: () -> untyped
|
12
|
+
|
13
|
+
# Logical Operators
|
14
|
+
def and: (*untyped conditions) -> untyped
|
15
|
+
|
16
|
+
def or: (*untyped conditions) -> untyped
|
17
|
+
|
18
|
+
def xor: (untyped condition1, untyped condition2) -> untyped
|
19
|
+
|
20
|
+
def not: (untyped condition) -> untyped
|
21
|
+
|
22
|
+
# Relational Operators
|
23
|
+
# f.type("Circle").greater_than(5)
|
24
|
+
def greater_than: (untyped value) -> untyped
|
25
|
+
|
26
|
+
def less_than: (untyped value) -> untyped
|
27
|
+
|
28
|
+
def equal_to: (untyped value) -> untyped
|
29
|
+
|
30
|
+
def not_equal_to: (untyped value) -> untyped
|
31
|
+
|
32
|
+
def block_reference: (?untyped name) -> untyped
|
33
|
+
|
34
|
+
def name: (untyped value) -> untyped
|
35
|
+
|
36
|
+
def type: (untyped kind) -> untyped
|
37
|
+
|
38
|
+
def layer: (untyped name) -> untyped
|
39
|
+
|
40
|
+
def visible: (?untyped vis) -> untyped
|
41
|
+
|
42
|
+
def color: (untyped num) -> untyped
|
43
|
+
|
44
|
+
def paper_space: () -> untyped
|
45
|
+
|
46
|
+
def model_space: () -> untyped
|
47
|
+
|
48
|
+
def contains: (untyped str) -> untyped
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# Generated from lib/autocad/selection_set.rb with RBS::Inline
|
2
|
+
|
3
|
+
module Autocad
|
4
|
+
class SelectionSet
|
5
|
+
attr_reader filter_types: untyped
|
6
|
+
|
7
|
+
attr_reader filter_values: untyped
|
8
|
+
|
9
|
+
attr_reader name: untyped
|
10
|
+
|
11
|
+
def initialize: (untyped name) -> untyped
|
12
|
+
|
13
|
+
def has_filter?: () -> untyped
|
14
|
+
|
15
|
+
def filter_text: (?untyped str) -> untyped
|
16
|
+
|
17
|
+
def to_ole_filter_type: () -> untyped
|
18
|
+
|
19
|
+
def to_ole_filter_value: () -> untyped
|
20
|
+
|
21
|
+
# filter do |f|
|
22
|
+
# st = f.type('Circle').or(f.type('Arc'))
|
23
|
+
# st2 = f.layer('0').or(f.layer('1'))
|
24
|
+
# f.and(st, st2)
|
25
|
+
# end
|
26
|
+
def filter: () -> untyped
|
27
|
+
|
28
|
+
# Helper methods for common operations
|
29
|
+
def filter_by_type: (*untyped types) -> untyped
|
30
|
+
|
31
|
+
def filter_by_layer: (*untyped layers) -> untyped
|
32
|
+
|
33
|
+
def filter_text_containing: (untyped text) -> untyped
|
34
|
+
|
35
|
+
def filter_block_references: (?untyped name) -> untyped
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# Generated from lib/autocad/selection_set_adapter.rb with RBS::Inline
|
2
|
+
|
3
|
+
module Autocad
|
4
|
+
class SelectionSetAdapter
|
5
|
+
def initialize: (untyped drawing, untyped selection_set) -> untyped
|
6
|
+
|
7
|
+
def filter_types: () -> untyped
|
8
|
+
|
9
|
+
def filter_values: () -> untyped
|
10
|
+
|
11
|
+
def select_on_screen: () -> untyped
|
12
|
+
|
13
|
+
# accepts Point3d | [x,y] | (x,y)
|
14
|
+
def select_at_point: (untyped x, untyped y) -> untyped
|
15
|
+
|
16
|
+
# @param points [Array<Point3d>] Array of points defining the polygon
|
17
|
+
# @param mode [:fence, :window, :crossing] Selection mode
|
18
|
+
def select_by_polygon: (?points: untyped, ?mode: untyped) -> untyped
|
19
|
+
|
20
|
+
def filter: () ?{ (?) -> untyped } -> untyped
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
def create_selection_set: () -> untyped
|
25
|
+
|
26
|
+
def create_ole_variant: (untyped data) -> untyped
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# Generated from lib/autocad/text.rb with RBS::Inline
|
2
|
+
|
3
|
+
module Autocad
|
4
|
+
class Text < Element
|
5
|
+
def read_ole: (untyped _ole) -> untyped
|
6
|
+
|
7
|
+
def write_ole: (untyped text) -> untyped
|
8
|
+
|
9
|
+
def to_regexp: () -> untyped
|
10
|
+
|
11
|
+
def =~: (untyped reg) -> untyped
|
12
|
+
|
13
|
+
def to_s: () -> untyped
|
14
|
+
|
15
|
+
def bounds: () -> untyped
|
16
|
+
|
17
|
+
def method_missing: (untyped meth, *untyped) ?{ (?) -> untyped } -> untyped
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# Generated from lib/autocad/text_node.rb with RBS::Inline
|
2
|
+
|
3
|
+
module Autocad
|
4
|
+
class TextNode < Element
|
5
|
+
attr_reader original: untyped
|
6
|
+
|
7
|
+
attr_reader ole_obj: untyped
|
8
|
+
|
9
|
+
def to_regexp: () -> untyped
|
10
|
+
|
11
|
+
def empty?: () -> untyped
|
12
|
+
|
13
|
+
def text?: () -> untyped
|
14
|
+
|
15
|
+
def size: () -> untyped
|
16
|
+
|
17
|
+
def read_ole: (untyped ole) -> untyped
|
18
|
+
|
19
|
+
def write_ole: (untyped text) -> untyped
|
20
|
+
|
21
|
+
def write_ole_regular: (untyped text) -> untyped
|
22
|
+
|
23
|
+
def write_ole_in_cell: (untyped text) -> untyped
|
24
|
+
|
25
|
+
def update_ole!: (untyped text) -> untyped
|
26
|
+
|
27
|
+
def to_s: () -> untyped
|
28
|
+
|
29
|
+
def =~: (untyped reg) -> untyped
|
30
|
+
|
31
|
+
def template?: () -> untyped
|
32
|
+
|
33
|
+
def render: (?untyped h) -> untyped
|
34
|
+
|
35
|
+
def method_missing: (untyped meth, *untyped) ?{ (?) -> untyped } -> untyped
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
# Generated from lib/autocad.rb with RBS::Inline
|
2
|
+
|
3
|
+
module Autocad
|
4
|
+
module Common
|
5
|
+
def method_missing: (untyped method) -> untyped
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
module ACAD
|
10
|
+
end
|
11
|
+
|
12
|
+
module Autocad
|
13
|
+
ROOT: untyped
|
14
|
+
|
15
|
+
# @yield [Autocad::App]
|
16
|
+
def self.run: () -> void
|
17
|
+
|
18
|
+
# @return [Pathname]
|
19
|
+
def self.root: () -> Pathname
|
20
|
+
|
21
|
+
# @rbs dir: String -- the directory of drawing dgn|dwg -- to convert
|
22
|
+
# @rbs outdir: String -- the output dir for converted pdf files
|
23
|
+
def self.dgn2pdf: (untyped dir_or_file, ?outdir: String, ?mode: untyped) -> untyped
|
24
|
+
|
25
|
+
# save the current drawing
|
26
|
+
# @rbs dir: String|Pathname -- the dir to save drawing to
|
27
|
+
# @rbs exit: bool -- whether to exit afterwards or start irb
|
28
|
+
# @rbs model: bool -- prints model space instead of paperspace in pdf document
|
29
|
+
# @rbs return void
|
30
|
+
def self.save_open_drawings: (?dir: String | Pathname, ?exit: bool, ?model: bool) -> void
|
31
|
+
|
32
|
+
# save the current drawing
|
33
|
+
# @rbs dir: String|Dir -- the dir to save drawing to
|
34
|
+
# @rbs exit: bool -- whether to exit afterwards or start irb
|
35
|
+
# @rbs model: bool -- prints model space in pdf document
|
36
|
+
# @rbs return void
|
37
|
+
def self.save_current_drawing: (String | Dir dir, ?exit: bool, ?model: bool) -> void
|
38
|
+
|
39
|
+
# save the current drawing as pdf
|
40
|
+
# @rbs dir: String|Dir -- the dir to save drawing to
|
41
|
+
# @rbs return void
|
42
|
+
def self.save_current_drawing_as_pdf: (String | Dir dir) -> void
|
43
|
+
|
44
|
+
# gets all dwg and dgn dfiles in a directory
|
45
|
+
# @rbs dir: String|Pathname
|
46
|
+
def self.drawings_in_dir: (String | Pathname dir) -> untyped
|
47
|
+
|
48
|
+
def self.open_drawing: (untyped drawing) -> untyped
|
49
|
+
|
50
|
+
# Runs the app, opening the filenames
|
51
|
+
# and yielding each open drawing to the
|
52
|
+
# supplied block
|
53
|
+
# it automatically closes the drawing and
|
54
|
+
# the app when done
|
55
|
+
#
|
56
|
+
# @rbs *files: Array[String|Pathname]
|
57
|
+
# @rbs visible: bool -- show the app window
|
58
|
+
# @rbs error_proc: (Exception, Drawing) -> void
|
59
|
+
# @rbs wait_time: Integer -- the total amount of time to wait to open file (500)
|
60
|
+
# @rbs wait_interval: Float -- the amount of time to wait between attempts (0.5)
|
61
|
+
# @rbs read_only: bool
|
62
|
+
# @rbs &: (Drawing) -> void
|
63
|
+
def self.with_drawings: () { (Drawing) -> void } -> untyped
|
64
|
+
|
65
|
+
# Finds the drawing in dir and calls with_drawing forwarding all params
|
66
|
+
# @rbs dir: String|Pathname -- directory to search for drawings
|
67
|
+
def self.with_drawings_in_dir: (String | Pathname dir) -> untyped
|
68
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
module Windows
|
2
|
+
class FileSystem
|
3
|
+
@fs_object: untyped
|
4
|
+
end
|
5
|
+
end
|
6
|
+
|
7
|
+
module Autocad
|
8
|
+
class App
|
9
|
+
self.@default_error_proc: untyped
|
10
|
+
|
11
|
+
@event_handler: untyped
|
12
|
+
|
13
|
+
@ole_obj: untyped
|
14
|
+
|
15
|
+
@app_event: untyped
|
16
|
+
|
17
|
+
@run_loop: untyped
|
18
|
+
|
19
|
+
@windows: untyped
|
20
|
+
|
21
|
+
# make_visible(visible)
|
22
|
+
@scanners: untyped
|
23
|
+
|
24
|
+
@ole_preferences_files: untyped
|
25
|
+
|
26
|
+
attr_accessor self.default_error_proc: untyped
|
27
|
+
|
28
|
+
alias doc active_drawing
|
29
|
+
|
30
|
+
alias current_drawing active_drawing
|
31
|
+
|
32
|
+
alias model model_space
|
33
|
+
end
|
34
|
+
end
|