overrides/model.rb
#This looks for edges that have a start/end vertex at the point
This looks for edges that have a start/end vertex at the point
This looks for edges that have a start / end vertex at the point
def path_from(start_vertex, end_vertex, forbidden_edges: [])
    starting_edges = edges_at(start_vertex, on_allowed: true)
    puts "I could start with #{starting_edges.count}"
    starting_edges.reject! { |e| forbidden_edges.include?(e) }
    puts "I have #{starting_edges.count} left"
    path_list = []
    starting_edges.each do |starting_edge|
      puts "Start #{starting_edge.entityID}"
      path_list = traverse([starting_edge],starting_edge.connected_at_other_vertex(start_vertex), starting_edge.other_point(start_vertex),
                           end_vertex, forbidden_edges: forbidden_edges.concat([starting_edge]))
      if path_list.length > 0
        break
      end
    end
    puts path_list
    return path_list
  end
def path_from ( start_vertex , end_vertex , forbidden_edges : [ ] ) starting_edges = edges_at ( start_vertex , on_allowed : true ) puts "I could start with #{starting_edges.count}" starting_edges . reject! { | e | forbidden_edges . include? ( e ) } puts "I have #{starting_edges.count} left" path_list = [ ] starting_edges . each do | starting_edge | puts "Start #{starting_edge.entityID}" path_list = traverse ( [ starting_edge ] , starting_edge . connected_at_other_vertex ( start_vertex ) , starting_edge . other_point ( start_vertex ) , end_vertex , forbidden_edges : forbidden_edges . concat ( [ starting_edge ] ) ) if path_list . length > 0 break end end puts path_list return path_list end
This looks for edges that have a start/end vertex at the point
This looks for edges that have a start / end vertex at the point
start_vertex
<not_specific>
end_vertex
<not_specific>
forbidden_edges
<not_specific>