#NEWLINE# def test_custom_rigid_body( ) : #NEWLINE# #INDENT# rigidbody_masscenter = Point ( 'rigidbody_masscenter' ) #NEWLINE# rigidbody_mass = Symbol ( 'rigidbody_mass' ) #NEWLINE# rigidbody_frame = ReferenceFrame ( 'rigidbody_frame' ) #NEWLINE# body_inertia = inertia ( rigidbody_frame , 1 , 0 , 0 ) #NEWLINE# rigid_body = Body ( 'rigidbody_body' , rigidbody_masscenter , rigidbody_mass , rigidbody_frame , body_inertia ) #NEWLINE# com = rigid_body . masscenter #NEWLINE# frame = rigid_body . frame #NEWLINE# rigidbody_masscenter . set_vel ( rigidbody_frame , 0 ) #NEWLINE# assert ( com . vel ( frame ) == rigidbody_masscenter . vel ( frame ) ) #NEWLINE# assert ( com . pos_from ( com ) == rigidbody_masscenter . pos_from ( com ) ) #NEWLINE# assert ( rigid_body . mass == rigidbody_mass ) #NEWLINE# assert ( rigid_body . inertia == ( body_inertia , rigidbody_masscenter ) ) #NEWLINE# assert hasattr ( rigid_body , 'masscenter' ) #NEWLINE# assert hasattr ( rigid_body , 'mass' ) #NEWLINE# assert hasattr ( rigid_body , 'frame' ) #NEWLINE# assert hasattr ( rigid_body , 'inertia' )