fix: format_utils rename fmt→format_fn, iges_import insert_or_assign
This commit is contained in:
@@ -35,8 +35,8 @@ 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 fmt = use_d ? fmt_iges_real : fmt_double;
|
||||
return fmt(p.x()) + "," + fmt(p.y()) + "," + fmt(p.z());
|
||||
auto format_fn = use_d ? fmt_iges_real : fmt_double;
|
||||
return format_fn(p.x()) + "," + fmt(p.y()) + "," + fmt(p.z());
|
||||
}
|
||||
|
||||
/// Pad a string to exactly 72 characters with spaces
|
||||
|
||||
@@ -582,7 +582,7 @@ private:
|
||||
if (!ent) {
|
||||
// Return default line
|
||||
auto nc = curves::NurbsCurve({Point3D(0,0,0), Point3D(1,0,0)}, {0,0,1,1}, {1,1}, 1);
|
||||
curve_cache_[de_index] = nc;
|
||||
curve_cache_.insert_or_assign(de_index, nc);
|
||||
return nc;
|
||||
}
|
||||
|
||||
@@ -600,7 +600,7 @@ private:
|
||||
} catch (const std::exception&) {
|
||||
// Keep default line on error
|
||||
}
|
||||
curve_cache_[de_index] = nc;
|
||||
curve_cache_.insert_or_assign(de_index, nc);
|
||||
return nc;
|
||||
}
|
||||
|
||||
@@ -850,7 +850,7 @@ private:
|
||||
std::vector<std::vector<Point3D>> g = {{Point3D(0,0,0), Point3D(1,0,0)},
|
||||
{Point3D(0,1,0), Point3D(1,1,0)}};
|
||||
auto ns = curves::NurbsSurface(g, {0,0,1,1}, {0,0,1,1}, {}, 1, 1);
|
||||
surface_cache_[de_index] = ns;
|
||||
surface_cache_.insert_or_assign(de_index, ns);
|
||||
return ns;
|
||||
}
|
||||
|
||||
@@ -877,7 +877,7 @@ private:
|
||||
// Keep default surface
|
||||
}
|
||||
|
||||
surface_cache_[de_index] = ns;
|
||||
surface_cache_.insert_or_assign(de_index, ns);
|
||||
return ns;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user