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.
Centering text when only using a single letter
I am creating a model where a single letter must be extruded on the center of a part. This has been defeating me for a while. I have tried using both the text sketch tool and the Surface Text feature. Both of these tools result in a left justified letter using all font types.
Text tool generates a left justified letter when text box is centered
Surprisingly, surface text actually won't allow you to generate just a single letter at all
Does anyone know of a way to generate a single letter with single alignment? I wouldn't have expected this to be a limiting factor of OnShape. Alternatively, are there any tools outside of OnShape that I can use to generate text in uniform fashion for this project? This project will require a lot of letters so I am open to ideas. I have not been able to find any forum topics on this function specifically.
Comments
Very interesting. I tried this out with a few different letters. It's definitely a problem with some characters, but not all. At the very least, there's something odd about 'A' and 'X'. I didn't do an exhaustive search, but perhaps this has something to do with the way that kerning is handled internally?
@jnewth_onshape ?
Agreed there should more options "built-in". That said there are a couple of featurescript that really help streamline things:
For sheet metal you can now use the form tool to create predefined cutouts.
For sketch "blocks" it's usually easier to create a zero-offset surface of your sketch faces (and group them in a composite if they are dis-jointed) and then derive and manipulate that. It can be used like a sketch for most standard features.
Hey @S1mon it's just @jnewth now. Same rogueish good looks but now with a different forum handle.
Yes, limitation of the fonts themselves. With my custom Text feature, I compute the location of centers along the path and then I call the sketch text function centered at that point - but the text is quite clearly shifted over. The amount of shift is dependent on the font and character chosen, so it's 'baked in'.
I can compensate for this when centering texts like you want @Ryan_Heim . I haven't really tested this out all too well so I'd rather not bake it in to release version quite yet but would be happy to share an unreleased version for you to test out. Hit me up on direct message and I'll share the custom feature with you.
Example of the problem with Onshape text control Here we see the top two numbers are equal. These are the distances from the edge of the text bounding box (as defined by onshape) to the path centerline (basically the point where we want the character to be centered). This shows the bounding box is centered on the center of the path. The problem is the bottom two numbers. Because the character is not centered in its bounding box, the distances from the left-most part of the character to the centerline and the right-most are not the same.
Example with compensation from my Text feature. Here the top two numbers (edges of the bounding box) are unequal distances from the path centerline, but the bottom two numbers are equal, meaning the text itself is centered on the point:
Oop, misspoke. Meant to ping @Adam_Hale the OP. Adam: send me a direct message. We can get you rolling.