Skip to content
Open
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 src/BeamAdapter/component/model/RodStraightSection.inl
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ bool RodStraightSection<DataTypes>::initSection()
template <class DataTypes>
void RodStraightSection<DataTypes>::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());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
global_H_local.set(type::Vec3(x_used, 0.0, 0.0), Quat());
global_H_local.set(type::Vec3(x_used - x_start, 0.0, 0.0), Quat());

Thank you for your contribution, indeed there is an error here the x_start should not be added to the x_used which is already the global curvilinear abscissa. However for me the correct fix is to deduce the x_start as the sections are used in reverse order.
If your tool is composed of 2 straightSection:
section 1: length 400
section 2: length 200

when tool will goes out the method will be called on the section 2 with the values:
x_used -> equal to full length -> 600,
x_start = 400 (length of section 1), therefor the transform will be computed at relative value of 600 - 400 = 200 the last position of this section

}


Expand Down