Module: Microstation::Functions
- Included in:
- App
- Defined in:
- lib/microstation/functions.rb
Instance Method Summary collapse
- #clear_ui ⇒ Object
- #get_point ⇒ Object
- #get_points_by_line ⇒ Object
- #get_points_by_rectangle ⇒ Object
Instance Method Details
#clear_ui ⇒ Object
44 45 46 |
# File 'lib/microstation/functions.rb', line 44 def clear_ui cad_input_queue.clear_ui end |
#get_point ⇒ Object
48 49 50 |
# File 'lib/microstation/functions.rb', line 48 def get_point cad_input_queue.get_point end |
#get_points_by_line ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/microstation/functions.rb', line 28 def get_points_by_line queue = cad_input_queue queue.show_command("Get points by line") start_point = queue.get_point if start_point.failure? return Failure(:point1_reset) end queue.send_command "PLACE LINE" queue.send_data_point start_point.value! end_point = queue.get_point("Enter next vertex") if end_point.failure? return Failure(:point2_reset) end Success([start_point.value!, end_point.value!]) end |
#get_points_by_rectangle ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/microstation/functions.rb', line 12 def get_points_by_rectangle queue = cad_input_queue queue.show_command('Get points by block') start_point = queue.get_point if start_point.failure? return Failure(:point1_reset) end queue.send_command "PLACE BLOCK" queue.send_data_point start_point.value! end_point = queue.get_point if end_point.failure? return Failure(:point2_reset) end Success([start_point.value!, end_point.value!]) end |