Skip to content
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

Is a multiline legend possible? #21

Closed
sergiofenoll opened this issue Jan 11, 2020 · 3 comments
Closed

Is a multiline legend possible? #21

sergiofenoll opened this issue Jan 11, 2020 · 3 comments

Comments

@sergiofenoll
Copy link

I was wondering if it's possible to have multiple characters beneath each other as the legend. I was thinking of printing some keycaps for a keyboard with 3 layers and I'd like to print the characters from each layer on the keycap.

BTW, thanks for the great project, it's been very helpful!

@rsheldiii
Copy link
Owner

Multiline legends are supported but openSCAD doesn't do text wrapping as far as I can tell, so you have to do it manually. Something like this:

$outset_legends = true;
2uh() 2u() legend("a") legend("b", [0,1]) legend("c", [0,-1]) key();

produces this:

image

The position arguments aren't based off text size or anything so you just have to fudge it until you get it right, they'll be smaller on regular sized keycaps. Hope that helps!

@sergiofenoll
Copy link
Author

Thank you! I'll try doing what you recommended.

@rsheldiii
Copy link
Owner

there's now an example of this in the examples directory: https://github.com/rsheldiii/KeyV2/blob/master/examples/legends.scad

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants