Skip to content

Commit

Permalink
Merge pull request #78 from ANaaim/Option_Spherical_Joint
Browse files Browse the repository at this point in the history
Add feature :  Add new argument in add_model to be able to use constant lenght joint (#78)
  • Loading branch information
Ipuch authored Jul 29, 2023
2 parents b9c9ce3 + 019484b commit df64f19
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions bionc/model_creation/biomechanical_model_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ def add_joint(
child: str,
parent_axis: NaturalAxis | tuple[NaturalAxis] | list[NaturalAxis] = None,
child_axis: NaturalAxis | tuple[NaturalAxis] | list[NaturalAxis] = None,
parent_point: str = None,
child_point: str = None,
length: float = None,
theta: float | tuple[float] | list[float] = None,
):
"""
Expand All @@ -49,6 +52,12 @@ def add_joint(
The axis of the parent segment, zero, one or two element but not more.
child_axis : NaturalAxis | tuple[NaturalAxis] | list[NaturalAxis]
The axis of the child segment, zero, one or two element but not more.
parent_point : str
The name of the parent point
child_point : str
The name of the child point
length : float
The length for the constant length joint constraint
theta : float | tuple[float] | list[float]
The angle of axis constraints, zero, one or two element but not more.
Expand All @@ -66,6 +75,9 @@ def add_joint(
parent_axis=parent_axis,
child_axis=child_axis,
theta=theta,
parent_point=parent_point,
child_point=child_point,
length=length,
)

def update(self, data: Data) -> BiomechanicalModel:
Expand Down

0 comments on commit df64f19

Please sign in to comment.