MCPcopy Create free account
hub / github.com/circuitnet/CircuitNet / instance_direction_bottom_left

Function instance_direction_bottom_left

feature_extraction/src/util.py:15–34  ·  view source on GitHub ↗
(direction)

Source from the content-addressed store, hash-verified

13 return m_direction
14
15def instance_direction_bottom_left(direction): # used when we need to get the bottom left corner of the cell.
16 if direction == 'N':
17 i_direction = (0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0)
18 elif direction == 'S':
19 i_direction = (-1, 0, 0, -1, 0, 0, 0, 0, 1, 0, 0, 1)
20 elif direction == 'W':
21 i_direction = (0, -1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0)
22 elif direction == 'E':
23 i_direction = (0, 0, -1, 0, 0, 1, 0, 0, 0, 0, 1, 0)
24 elif direction == 'FN':
25 i_direction = (-1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0)
26 elif direction == 'FS':
27 i_direction = (0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 1)
28 elif direction == 'FW':
29 i_direction = (0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0)
30 elif direction == 'FE':
31 i_direction = (0, -1, -1, 0, 0, 0, 0, 0, 0, 1, 1, 0)
32 else:
33 raise ValueError('read_macro_direction_wrong')
34 return i_direction
35
36def my_range(start, end):
37 if start == end:

Callers 3

get_RUDYMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected