MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / toString

Method toString

src/Base/Placement.cpp:215–228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

213}
214
215std::string Placement::toString() const
216{
217 Base::Vector3d pos = getPosition();
218 Base::Rotation rot = getRotation();
219
220 Base::Vector3d axis;
221 double angle {};
222 rot.getRawValue(axis, angle);
223
224 // clang-format off
225 return fmt::format("position ({:.1f}, {:.1f}, {:.1f}), axis ({:.1f}, {:.1f}, {:.1f}), angle {:.1f}\n",
226 pos.x, pos.y, pos.z, axis.x, axis.y, axis.z, angle);
227 // clang-format on
228}

Callers

nothing calls this directly

Calls 4

getPositionFunction · 0.50
getRotationFunction · 0.50
formatFunction · 0.50
getRawValueMethod · 0.45

Tested by

no test coverage detected