Overview Schemas Index

KINEMATIC_STRUCTURE_SCHEMA (jsdai.SKinematic_structure_schema)


FUNCTION unique_link_usage
          (link : kinematic_link) : BOOLEAN;

 LOCAL mechs : SET  OF  mechanism ; joints : SET OF kinematic_joint ; struct : kinematic_structure ; END_LOCAL ; joints := bag_to_set ( USEDIN  ( link , 'kinematic_structure_schema.kinematic_joint.first_link' ) + USEDIN  ( link , 'kinematic_structure_schema.kinematic_joint.second_link' ) ) ; struct := joints [ 1 ] . structure ; REPEAT i := 2 TO SIZEOF  ( joints ) ; IF  ( joints [ i ] . structure :<>: struct ) THEN  RETURN  ( FALSE  ) ; END_IF  ; END_REPEAT ; mechs := bag_to_set ( USEDIN ( struct , 'kinematic_structure_schema.mechanism.structure_definition' ) ) ; IF ( SIZEOF ( mechs ) <> 1 ) THEN RETURN  ( FALSE ) ; END_IF ; RETURN ( TRUE ) ; 

END_FUNCTION; -- unique_link_usage

public class FUnique_link_usage
          public static Value run(SdaiContext _context, Value link)