Link Search Menu Expand Document

Class Mechanism

About :

Define a complete Mechanism _root_article is a list of top bill of materials : either Assemblies or Components _body is a dictionary of slot in components _joint is a set of kinematical joints or potential mechanical constraint _frame is a frame sequence for the scene

Class diagram of class of Mechanism.

Functions

Function summury
__init__(self) Instantiation method (more…)
get_frame(self) Get the mechanism FrameSequence (more…)
add_joint(self, joint) Add a joint to a mechanism (more…)
remove_joint(self, joint) Remove a joint from a mechanism (more…)
get_joint(self) Get the identified potential joint in a mechanism (more…)
get_root(self) get root articles from the bom (more…)
add_root(self, article) add root article to the bom (more…)
remove_root(self, article) remove root article from the bom (more…)
make_body(self, name, articles=[]) build a body from an article selection (more…)
get_body(self, name=None) get recorded bodies (more…)
make_joint_name(self, name) create a unique name for a new joint (more…)

Methods desciption :

init

def __init__(self)

Instantiation method

get_frame

def get_frame(self)

Get the mechanism FrameSequence

  • ← A FrameSequence object

add_joint

def add_joint(self, joint)

Add a joint to a mechanism

  • → joint: added mate instance

remove_joint

def remove_joint(self, joint)

Remove a joint from a mechanism

  • → joint: added mate instance

get_joint

def get_joint(self)

Get the identified potential joint in a mechanism

  • ← set of mechanism mates

get_root

def get_root(self)

get root articles from the bom

  • ← a list of root bom

add_root

def add_root(self, article)

add root article to the bom

  • → article:

remove_root

def remove_root(self, article)

remove root article from the bom

  • → article:

make_body

def make_body(self, name, articles=[])

build a body from an article selection articles are either assembly or components assembly are extended as all their components

  • → name: the name of the new body
  • → articles: a list of articles

get_body

def get_body(self, name=None)

get recorded bodies

  • ← a list of body

make_joint_name

def make_joint_name(self, name)

create a unique name for a new joint

  • → name: base name
  • ← the edited name to be unique