Module: SkippyLib::PickHelper

Defined in:
modules/pick_helper.rb

Overview

Since:

  • 3.0.0

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.new(view) ⇒ Object

Parameters:

  • view (Sketchup::View)

Raises:

  • (NotImplementedError)

Since:

  • 3.0.0



8
9
10
11
12
13
14
15
# File 'modules/pick_helper.rb', line 8

def self.new(view)
  # TODO: Don't do this! `Sketchup::PickHelper` objects are reused. Cannot
  # use `extend` as it with modify the global persistent object.
  raise NotImplementedError
  # pick_helper = view.pick_helper
  # pick_helper.extend(self)
  # pick_helper
end

Instance Method Details

#leavesArray<Entity>

Return unique set of leaves from the pick paths.

Returns:

  • (Array<Entity>)

Since:

  • 3.0.0



19
20
21
# File 'modules/pick_helper.rb', line 19

def leaves
  all_picked.uniq
end

#pathsArray<Array<Entity>>

Returns:

  • (Array<Array<Entity>>)

Since:

  • 3.0.0



24
25
26
# File 'modules/pick_helper.rb', line 24

def paths
  Array.new(count) { |i| path_at(i) }
end