Skip to content

Commit

Permalink
Refactor ParametricLink to use Inertial constructor with mass, inerti…
Browse files Browse the repository at this point in the history
…a, and origin
  • Loading branch information
Giulero committed Jun 12, 2024
1 parent 82ac977 commit 48a8a0b
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@ def __init__(
length_multiplier=self.length_multiplier
)
self.mass = self.compute_mass()
self.inertial = Inertial(self.mass)
self.inertial.mass = self.mass
self.inertial.inertia = self.compute_inertia_parametric()
self.inertial.origin = self.modify_origin()
inertia_parametric = self.compute_inertia_parametric()
origin = self.modify_origin()
self.inertial = Inertial(
mass=self.mass, inertia=inertia_parametric, origin=origin
)
self.update_visuals()

def get_principal_length(self):
Expand Down

0 comments on commit 48a8a0b

Please sign in to comment.