Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated to biorbd 1.11.1 #99

Merged
merged 3 commits into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bioviz/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
from .qt_ui.rectangle_on_slider import RectangleOnSlider
from ._version import __version__, check_version

check_version(biorbd, "1.9.1", "2.0.0")
check_version(biorbd, "1.11.1", "2.0.0")
check_version(pyomeca, "2020.0.1", "2020.1.0")


Expand Down
2 changes: 1 addition & 1 deletion bioviz/_version.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from packaging.version import parse as parse_version

__version__ = "2.3.2"
__version__ = "2.4.0"


def check_version(tool_to_compare, min_version, max_version):
Expand Down
3 changes: 1 addition & 2 deletions bioviz/analyses/muscle_analyses.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,11 @@ def __compute_all_values(self):
active_forces = np.ndarray((self.n_point_for_q, self.n_mus))
emg = biorbd.State(0, self.active_forces_slider.value() / 100)
for i, q_mod in enumerate(all_q):
self.model.UpdateKinematicsCustom(biorbd.GeneralizedCoordinates(q_mod))
self.model.updateMuscles(biorbd.GeneralizedCoordinates(q_mod), True)
for m in range(self.n_mus):
if self.checkboxes_muscle[m].isChecked():
mus_group_idx, mus_idx, cmp_mus = self.muscle_mapping[self.checkboxes_muscle[m].text()]
mus = self.model.muscleGroup(mus_group_idx).muscle(mus_idx)
mus.updateOrientations(self.model, q_mod, 1)
muscles_length_jacobian = self.model.musclesLengthJacobian().to_array()

length[i, m] = mus.length(self.model, q_mod, False)
Expand Down
8 changes: 4 additions & 4 deletions bioviz/biorbd_vtk.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ class _MarkerInternal:
size: float
color: tuple[float, float, float]
opacity: float
actors: list[QVTKRenderWindowInteractor, ...]
actors: list[QVTKRenderWindowInteractor]


class VtkModel(QtWidgets.QWidget):
Expand Down Expand Up @@ -284,7 +284,7 @@ def __init__(
actors=list(),
),
}
self.markers_link_actors: list[QVTKRenderWindowInteractor, ...] = list()
self.markers_link_actors: list[QVTKRenderWindowInteractor] = list()

self.contacts = Markers()
self.contacts_size = contacts_size
Expand Down Expand Up @@ -461,7 +461,7 @@ def update_markers(self, markers):
self._update_markers(markers, "model")

def update_experimental_markers(
self, markers, with_link: bool = True, virtual_to_experimental_markers_indices: list[int, ...] = None
self, markers, with_link: bool = True, virtual_to_experimental_markers_indices: list[int] = None
):
"""
Update position of the experimental markers on the screen (but do not repaint)
Expand Down Expand Up @@ -1842,7 +1842,7 @@ def new_gravity_vector(self, segment_rt, gravity, length, normalization_ratio, v
Parameters
----------
segment_rt : np.ndarray
homogeneous matrix in which coordinates are applied
homogenous matrix in which coordinates are applied
gravity : np.ndarray
gravity array with 3 application coordinates and 3 magnitude coordinates
length : float
Expand Down
Loading