-
Notifications
You must be signed in to change notification settings - Fork 535
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
3.5 hangprinter: Allow custom and prism-like setups #603
base: 3.5-dev
Are you sure you want to change the base?
Conversation
582347e
to
7101a2c
Compare
1bd250d
to
7f30701
Compare
// 0=None, 1=last-top, 2=all-top, 3-half-top, etc | ||
uint32_t unsignedAnchorMode = (uint32_t)anchorMode; | ||
gb.TryGetUIValue('T', unsignedAnchorMode, seen); | ||
if (unsignedAnchorMode <= (uint32_t)HangprinterAnchorMode::AllOnTop) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could add an else part here to return an error if somebody tries to chose an option that's not supported, no?
I mean, right now it goes to the default which is the regular hangprinter, I think that's good enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something like this?
reprap.GetPlatform().Message(ErrorMessage, "M666 A?: Invalid anchor mode\n");
Nice to have, especially for ourselves during the time we will be testing different binaries and might forget which one is on the machine ;-)
Updated code, description and title. In my eyes it is ready (and the two PRs it depends too). I'm probably still missing some things or doing something wrong. Eager to fix whatever is left. |
Otherwise it gets too deep. I think there's an option in eclipse to forbid this by project in format, one can config depness iirc.
7f30701
to
d51a945
Compare
This is a clean generalization from 4 to N. Pseudo-pyramid because the vertices in the base of the pseudo-pyramid don't need to be on the same plane. There's no base of the pyramid as such. Better documented and cleaner thanks to @tobbelobb on github.
…etups - Change from bool to class and introduce None mode for custom (experimental) setups (all allowed) - refactor out IsInsidePyramidSides - refactor out IsInsidePrismSides - introduce HangprinterAnchorMode::LastOnTop for prism-like setups with all anchors on top - introduce a T parameter in M666 to configure the anchor mode
d51a945
to
fd9f260
Compare
} | ||
|
||
bool HangprinterKinematics::IsInsidePrismSides(float const coords[3], unsigned const discount_last) const noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like these function names
ok = f->Write(scratchString.c_str()); | ||
if (!ok) return false; | ||
|
||
scratchString.printf(" U%.3f", (double)mechanicalAdvantage[0]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Print integers after U.
" U%d", (int)mechanicalAdvantage[0]
or " U%u", (unsigned)mechanicalAdvantage[0]
It's block-and-tally style gearing ratio, so can only be 1, 2, 3, 4, ...
ok = f->Write(scratchString.c_str()); | ||
if (!ok) return false; | ||
|
||
scratchString.printf(" O%.3f", (double)linesPerSpool[0]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Print integers after O. Lines per spool can also only be natural numbers 1, 2, 3, 4, ....
ok = f->Write(scratchString.c_str()); | ||
if (!ok) return false; | ||
|
||
scratchString.printf(" L%.3f", (double)motorGearTeeth[0]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Motor gear teeth is also a natural number
ok = f->Write(scratchString.c_str()); | ||
if (!ok) return false; | ||
|
||
scratchString.printf(" H%.3f", (double)spoolGearTeeth[0]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
integer
ok = f->Write(scratchString.c_str()); | ||
if (!ok) return false; | ||
|
||
scratchString.printf(" J%.3f", (double)fullStepsPerMotorRev[0]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
integer
Oh, I commented in the wrong PR again. Seems like the |
In addition to allow any pseudo-pyramid as in #598 which this PR depends on, this allows to setup hangprinters without a middle anchor.
This doesn't require any extra anchors. One could, for example, set each of the 4 anchors in one top corner of a room, resulting in a quadrangular prism printing volume. Or it could be used to move cameras in stadiums and whatnot.
For that we just set all the anchors on top.
It also allows a "None" anchor mode which always IsReacheable always returns true, which is interesting for people experimenting with potential future modes not contemplated yet, like halfTop-halfDown setups.
Dependencies:
Outdated
~~
Two options come to mind:
A) Allow users to manually select it by adding some parameter in M669. If we chose this option, any suggestion?
B) Calculate whether the last anchor is "in the middle" or not. Probably I should explain with code what I mean by "in the middle" rather than trying it in english to avoid misunderstandings.
~~