Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
Is there a less clunky way to do embedded text for 3D printing?

I want to achieve the effect in the top sketch below, which is two parts, with colored text embedded right on the surface of the first part. I can do it but it's very clunky.
- To get justs two parts - one for the main model and one for the text, I have to string all the digits together with a hidden shape in the main part. (Second sketch)
- Not only do I have to string them together, I have to then stand-off the second part from the bottom of the other part otherwise the slicer (Bambu Studio) will drop the text flat on the build plate at the bottom of the main part.
- I cannot modify the letters without significant effort - you can only insert new letters, not modify existing ones. So changing text means deleting, re-inserting, and add a bunch of constraints, line by line. Even just deleting text is painful since you have to do one digit at a time.
- I have to create a negative cutout of the letter on the original part, otherwise the slicer gets confused
Is there a better way to do this?
Document is on:
https://cad.onshape.com/documents/38533e535e72b9710293584a/w/d388b4d396838d7e6b8fae6a/e/1a47153967ea097be7d33252
0
Answers
Resin printer? - Scotty
There are mostly bad ways to do this, unfortunately. Text is tricky to work with. For example, you are using a non-stencil font, which means the 'holes' in numbers like 8 and 6 and 0 are either left floating OR (as you have done) all connected to the base. But now that means the letters have to be printed and laid in from the 'front' of the workpiece.
Here's a way that shows how this could work. There are some design changes and some tool changes:
1. Dont make that whole thick block in one go. Make it thin so the text doesnt have to be very tall.
2. Switch to a stencil font. Onshape has one. This makes all the holes in numbers like 6 and 8 and 0 connected to the main body.
3. Use my "Text" feature (described in the forums, aka Text Path). All that text layout can be one sketch and one feature.
4. You can use autoboolean (which works on features and parts, very handy) or just regular boolean to cut out the text lettering from the main body. I use autoboolean from @GregBrown
5. Print. If you have a 2-color printer this will likely just work as-is but if you need to print two separate bodies and then assemble, that'll be tricky.
6. Add an additional standoff part if needed to get it back to the original height (probably important given that you are making an auto-focus gauge).
https://cad.onshape.com/documents/d5d0a3cea54df719fb9b488c/w/fb96618b4a4fcfd6507de7a8/e/68248ee5990f73051e3ca9d7
@deon_brewis I had hoped that using expressions for the text and a feature pattern I could make the numbers increment themselves without having to re-type, but even with the great Text feature from @jnewth it doesn't increment. @jnewth any idea why it can't do that even in a feature pattern? I assumed it would. I ended up creating a dynamic comma separated string for the text using featurescript instead. Here's my example, which is very flexibly defined by a start height, end height, and step size. The rest just rebuilds. You edit all of those in the "Text variables" feature I made at the top.
https://cad.onshape.com/documents/9cc733a1e0fe3aef319d9394/w/eff170594078ef855938a98a/e/6da63863d43dbd70f54373b2
All of that said, I do have some workflow to share about bambu studio. You don't have to split it to parts to get different filaments and print in place. Import a .step file, then edit the filaments of the base to something else like this.
Independent Onshape Consultant | Industrial Designer
Yeah - I filed a bug about it because it is (to me, in my ignorance) weird, and the fix I cooked up seems to be an abuse of the id mechanism rather than a reasonable use.
Insofar as I understand it:
A feature pattern gets the pattern feature's id prefixed to it, so the shape of the ids is [pattern id] [patterned feature id] [anything created in feature]. In Text feature's case, that would be sketches and sketch entity ids (and the latter may not matter).
When the "Text" feature is executing, it doesn't parse the feature id to see if it's in a pattern. Because it doesnt, the (sketches or sketch ids, can't remember) all end up with the same downstream partial IDs, which means for whatever reason they all end up creating the same string (as the original). There is the getRemainder… function but that doesnt look at or manipulate Ids.
There is an easy enough workaround I could put in to the Text feature: parse the feature id, detect if it is executing in a pattern, then further uniquefy the downstream created sketch ids with the upstream pattern feature id (which is tested and works). It feels like the wrong fix though, and I figured most people were using the Text feature to create an incrementing pattern of text rather than creating instances of text that were then patterned, so I didnt do it. Perhaps I should add it in.
Thanks for the demo of Bambu studio! I'm a Prusa man myself but Ive heard good things. The Text feature makes it easy to produce sketches which can then be used for creating the negative as well as the positive extrude operations — but better than that is just using Bambu to get the end result you want! For myself, I have to print colors one at a time on my mini, so would need to make them separate parts and separate jobs and then assemble after.
Haven't done it myself but you could do some gcode mods to have the printer pause, purge, change filament for each color. Saw a couple YT vids on it. Not sure what's involved. if not getting a tolerance between your parts might be necessary.
I don't have a multi-color printer, (I have the standard bambu model), I'm just curious what the end goal is here. If you send what you have to the printer, will it print everything in place and make the letters a separate color? Why do you need all the structure under the letters, assuming they are printed in-place as a separate color?