fix: format_utils normalize function sigs, iges_import class closing brace
CI / Build & Test (push) Failing after 31s
CI / Release Build (push) Failing after 31s

This commit is contained in:
茂之钳
2026-07-24 07:41:30 +00:00
parent 1cba481c2e
commit 9ecd86fb09
2 changed files with 5 additions and 4 deletions
+4 -3
View File
@@ -26,7 +26,7 @@ inline std::string fmt_double(double v, int precision = 12) {
}
/// Format for IGES: uses D exponent
inline std::string fmt_iges_real(double v) {
inline std::string fmt_iges_real(double v, int /*precision*/ = 12) {
auto s = fmt_double(v, 12);
auto pos = s.find('e');
if (pos != std::string::npos) s[pos] = 'D';
@@ -35,8 +35,9 @@ inline std::string fmt_iges_real(double v) {
/// Format a Point3D as comma-separated reals
inline std::string fmt_point(const core::Point3D& p, bool use_d = false) {
auto format_fn = use_d ? fmt_iges_real : fmt_double;
return format_fn(p.x()) + "," + fmt(p.y()) + "," + fmt(p.z());
using FmtFn = std::string (*)(double, int);
FmtFn fn = use_d ? static_cast<FmtFn>(fmt_iges_real) : fmt_double;
return fn(p.x(), 12) + "," + fn(p.y(), 12) + "," + fn(p.z(), 12);
}
/// Pad a string to exactly 72 characters with spaces