-
-
Notifications
You must be signed in to change notification settings - Fork 909
UltiMaker Hackathon '25: Slice-ID/Print-ID project #2241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
rburema
wants to merge
21
commits into
main
Choose a base branch
from
UMH-2025_id_label_paint
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 14 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
684c316
Hackathon '25: Slice/Print-ID label: Determine axis/ranges of project…
rburema 96e4390
Apply clang-format
rburema 3d63cf5
Hackathon '25: Slice/Print-ID label: Apply label-extents to model/gco…
rburema 7eb5fdb
Apply clang-format
rburema 8890a04
Label points didn't include the one _just_ before the label.
rburema 1febbdd
Fix int-vector * integer multiplication. (Not sure if the floating-po…
rburema 0e7f289
Print-ID/Slice-ID: Pass UV coords through to gcode (not yet mapped to…
rburema b7c9201
Slice-ID/Print-ID: Should now use the actual label-UV, instead of dat…
rburema 5ed6cf0
Slice-ID/Print-ID: (errrr ... fix recreating the image each time and …
rburema 4750542
Slice-ID/Print-ID: Prints a timestamp on the painted area.
rburema 410fc23
Apply clang-format
rburema 0a0b434
Slice-ID: Clean up a little.
rburema e6c2b89
Slice-ID/Print-ID: Squashed commit of the following:
rburema e2520a9
Apply clang-format
rburema 6098408
Fix Capitalizaton for *nix (Mac and Linux) builds.
rburema d5bce75
Slide-ID/Print-ID: Fix little code and spelling stuff (and hopefully …
rburema 6acf96b
Small readability adjustments.
rburema 5f1f08d
Rewrite 'sliced UV coords' to use _line_ grid instead of _point_ grid.
rburema 37d47e8
Going to need the Segments outside of the lne-grid as well.
rburema 05b7f99
State of Slice-ID/Print-ID at the end of the Hackathon '25.
rburema 96efb64
Apply clang-format
rburema File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| // Copyright (c) 2025 UltiMaker | ||
| // CuraEngine is released under the terms of the AGPLv3 or higher | ||
|
|
||
| #ifndef ID_FIELD_INFO_H | ||
| #define ID_FIELD_INFO_H | ||
|
|
||
| #include <optional> | ||
|
|
||
| #include "geometry/Point3LL.h" | ||
| #include "utils/AABB.h" | ||
| #include "utils/Point2F.h" | ||
| #include "utils/Point3D.h" | ||
|
|
||
| namespace cura | ||
| { | ||
| const double CLOSE_1D = std::nextafter(1.0, 0.0); | ||
| const float CLOSE_1F = std::nextafter(1.0f, 0.0f); | ||
| // NOTE: nextafter isn't constexpr yet in c++20, replace with constexpr when we do C++23 | ||
|
|
||
| struct IdFieldInfo | ||
| { | ||
| typedef std::pair<double, double> span_t; | ||
|
|
||
| Point3D primary_axis_; | ||
| span_t primary_span_; | ||
|
|
||
| Point3D secondary_axis_; | ||
| span_t secondary_span_; | ||
|
|
||
| Point3D normal_; | ||
|
|
||
| public: | ||
| static std::optional<IdFieldInfo> fromPointCloud(const std::vector<Point3LL>& points); | ||
|
|
||
| Point2F worldPointToLabelUv(const Point3LL& pt) const; | ||
| }; | ||
| } // namespace cura | ||
|
|
||
| #endif // ID_FIELD_INFO_H |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| // Copyright (c) 2025 UltiMaker | ||
| // CuraEngine is released under the terms of the AGPLv3 or higher | ||
|
|
||
| #ifndef LABEL_MAKER_H | ||
| #define LABEL_MAKER_H | ||
|
|
||
| #include <string_view> | ||
| #include <vector> | ||
|
|
||
| namespace cura | ||
| { | ||
| void paintStringToBuffer(const std::string_view& str, const size_t buffer_width, const size_t buffer_height, std::vector<uint8_t>& buffer); | ||
| } | ||
|
|
||
| #endif // LABEL_MAKER_H |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,8 @@ | |
| #ifndef POINT2F_H | ||
| #define POINT2F_H | ||
|
|
||
| #include <cmath> | ||
|
|
||
| namespace cura | ||
| { | ||
|
|
||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.