Class FrameSequence
About :
A Frame sequence is just a list of frame names
It support to manage positions of mechanism articles
Functions
Function | summury |
---|---|
__init__(self, frame=[], current=None) | Instantiation method (more…) |
len(self) | Get the sequence length (more…) |
get_current(self) | Get the current frame name (more…) |
set_current(self, current) | Set the current frame (more…) |
add_frame(self, frame) | Add a new frame (more…) |
get_frame(self, frame=’’, D={}) | Get the best frame in a dictionnary of frames (more…) |
get_frame_index(self, frame=’’) | Get the index of the frame in the current sequence (more…) |
Methods desciption :
init
def __init__(self, frame=[], current=None)
Instantiation method
- → frame: a list of frame name
- → current: the current frame
len
def len(self)
Get the sequence length
- ← length pf the frame sequence
get_current
def get_current(self)
Get the current frame name
- ← the name of the current frame
set_current
def set_current(self, current)
Set the current frame
- → current: frame name
add_frame
def add_frame(self, frame)
Add a new frame
- → frame: frame name
get_frame
def get_frame(self, frame='', D={})
Get the best frame in a dictionnary of frames
- → frame: expected frame
- → D: the frame dictionary
- ← the closest frame in the dictionnary
get_frame_index
def get_frame_index(self, frame='')
Get the index of the frame in the current sequence
- → frame: frame name
- ← its index from 0 to n-1