From 60d6df337ac4c9b542bf67b515b1fc05e81779d3 Mon Sep 17 00:00:00 2001 From: Lennart Karstensen Date: Wed, 29 Apr 2026 16:34:46 +0200 Subject: [PATCH] [RodStraightSection] Fix rest shape double-offset for non-first sections (#223) x_used is the global curvilinear abscissa; adding x_start again placed the rest node at 2*x_start + local_offset instead of x_used. For wires with two or more RodStraightSections this produced enormous elastic restoring forces at every timestep, causing simulation explosion. Fix: use x_used directly, consistent with RodSpireSection and RodMeshSection. --- src/BeamAdapter/component/model/RodStraightSection.inl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BeamAdapter/component/model/RodStraightSection.inl b/src/BeamAdapter/component/model/RodStraightSection.inl index e74851ca0..a6c247eab 100644 --- a/src/BeamAdapter/component/model/RodStraightSection.inl +++ b/src/BeamAdapter/component/model/RodStraightSection.inl @@ -53,7 +53,7 @@ bool RodStraightSection::initSection() template void RodStraightSection::getRestTransformOnX(Transform& global_H_local, const Real x_used, const Real x_start) { - global_H_local.set(type::Vec3(x_start + x_used, 0.0, 0.0), Quat()); + global_H_local.set(type::Vec3(x_used, 0.0, 0.0), Quat()); }