Conversation
📝 WalkthroughWalkthroughThis PR enhances numeric export formatting across two point cloud conversion tools. The mm2ply exporter introduces format-aware ASCII output by passing explicit format strings to a modified write_val lambda, while mm2txt applies consistent precision rules for coordinate and floating-point field output. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/mm2txt/main.cpp (1)
141-168: Fixed-point coord formatting can drop small values.With
%.8fonx/y/z(Line 144/148/152), values below ~1e-8 round to0, which undermines the “max precision” goal and diverges from the%.8eused for other float fields. Consider using a scientific format (or%g) for coordinates too.💡 Suggested change (use scientific format for coords)
- mrpt::system::os::fprintf(f, "%.8f", xs.at(i)); + mrpt::system::os::fprintf(f, "%.8e", xs.at(i)); ... - mrpt::system::os::fprintf(f, "%.8f", ys.at(i)); + mrpt::system::os::fprintf(f, "%.8e", ys.at(i)); ... - mrpt::system::os::fprintf(f, "%.8f", zs.at(i)); + mrpt::system::os::fprintf(f, "%.8e", zs.at(i));
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #34 +/- ##
========================================
Coverage 77.03% 77.03%
========================================
Files 179 179
Lines 9526 9526
Branches 917 917
========================================
Hits 7338 7338
Misses 2188 2188 🚀 New features to boost your workflow:
|
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.