Skip to content
This repository was archived by the owner on Mar 1, 2025. It is now read-only.

Commit 95b9c75

Browse files
Update src/Base/Placement.cpp
Co-authored-by: Kacper Donat <[email protected]>
1 parent 75634c9 commit 95b9c75

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Base/Placement.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -211,17 +211,17 @@ Placement Placement::sclerp(const Placement& p0, const Placement& p1, double t,
211211
return p0 * trf.pow(t, shorten);
212212
}
213213

214-
void Placement::print(std::string name)
214+
std::string Placement::toString()
215215
{
216-
217216
Base::Vector3d pos = getPosition();
217+
Base::Rotation rot = getRotation();
218+
218219
Base::Vector3d axis;
219220
double angle;
220-
Base::Rotation rot = getRotation();
221221
rot.getRawValue(axis, angle);
222-
Base::Console().Warning(
223-
"placement %s : position (%.1f, %.1f, %.1f) - axis (%.1f, %.1f, %.1f) angle %.1f\n",
224-
name.c_str(),
222+
223+
return fmt::format(
224+
"position ({.1f}, {.1f}, {.1f}), axis ({.1f}, {.1f}, {.1f}), angle {.1f}\n",
225225
pos.x,
226226
pos.y,
227227
pos.z,

0 commit comments

Comments
 (0)