COMPAS
  • Home
  • Docs
  • Extensions
  • Examples
  • Contribute
  • 1.0.0
  1. docs
  2. API Reference
  3. compas
  4. robots
  5. ToolModel
  6. ToolModel.iter_link_chain

ToolModel.iter_link_chain

ToolModel.iter_link_chain(link_start_name=None, link_end_name=None)

Iterator over the chain of links between a pair of start and end links.

Parameters
  • link_start_name (str or None) – Name of the starting link of the chain. Defaults to the root link name.

  • link_end_name (str or None) – Name of the final link of the chain. Defaults to the last link’s name.

Returns

Iterator of the chain of links.

Notes

This method differs from iter_links() in that it returns the chain respecting the tree structure, hence if one link branches into two or more joints, only the branch matching the end link will be returned.

Examples

>>> [l.name for l in robot.iter_link_chain('world', 'link2')]
['world', 'link1', 'link2']
  • Introduction
  • Installation
  • Getting started
  • Tutorial
  • API Reference
    • compas
      • datastructures
      • files
      • geometry
      • numerical
      • plugins
      • robots
      • rpc
      • topology
      • utilities
    • compas_rhino
    • compas_blender
    • compas_ghpython
    • compas_plotters
  • Extension points
  • Developer Guide
  • Changelog
  • Releases
  • License
  • Citing
  • ToolModel.iter_link_chain
Previous
ToolModel.iter_joints
Next
ToolModel.iter_links

COMPAS

A computational framework for collaboration and research in Architecture, Engineering, Fabrication, and Construction.

Newsletter

Copyright © 2017-2020 compas-dev