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 it possible to make a circular number pattern? ie. a dial face.

I'm trying to make a 2 digit counter. I have the design the way I want it, however I dont know how to make a circular pattern of numbers from 0-9. Is this possible ??
0
Best Answer
-
MichaelPascoe Member Posts: 2,134 PRO
@johnathan_oey872, I looked at the history of your document and copied it back where you gave it a try; you got very close!
Here are the things I changed to fix it:- Text implicit mate location.
- Transform angle to 360 / #qty * #count.
- Transform axis.
- Pattern qty to use the variable #qty.
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴1
Answers
Hi @johnathan_oey872, yes this is possible. Try something like this:
- Create an axis sketch.
- Create the variable #qty = 10
- Create the variable #count = -1. The reason we do this, is that the count variable has to start somewhere. This is setting the variable "count" to -1.
- Create another variable #count = #count + 1. The reason we do this, is that the instance pattern is going to pattern the second count variable feature. Each time it patterns "count", it is changing itself by +1.
- Use a custom feature that allows you to create text based on a variable. I used the custom feature Text. Remember to click the small arrow that allows you to use expressions as text so that you can use the variable as the text.
- Transform rotate the number around the axis sketch. Make sure the rotation angle is set to 360 / #qty * 2
- Circular pattern the number. Make sure you set this to "Feature pattern" pattern and check "Apply per instance". Set the pattern qty to #qty.
https://cad.onshape.com/documents/aff472c3def984252e6e3fb4/w/3c972d6084bec1d9fd09e0cb/e/3b478643451b24a022e46761?renderMode=0&uiState=63ecfc75cafbc56a9ebe3a33Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
think of a coin. I need the numbers to go around the face of the coin. and be 0-9 not 1-9.
but this vid definitely will be useful for another project
Sure thing @johnathan_oey872. This technique is a difficult one to do. Feel free to share a link to your document and I will take a look. From here, the simplest way to pattern it flat will be to change the orientation of the number.
To re-orient the number you will need to edit the in context mate connector that determines the text location do this:
- Edit the Text feature.
- Click the very small mate button to edit that implicit mate.
- Change the origin of the mate to the start of the axis line.
- Set Z to 0.
- Set Y to whatever you want.
https://cad.onshape.com/documents/aff472c3def984252e6e3fb4/w/3c972d6084bec1d9fd09e0cb/e/2e0fafe2ffeea1699f698760?renderMode=0&uiState=63ee297b8f9af21504b6b4f1Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
@johnathan_oey872, I looked at the history of your document and copied it back where you gave it a try; you got very close!
Here are the things I changed to fix it:
- Text implicit mate location.
- Transform angle to 360 / #qty * #count.
- Transform axis.
- Pattern qty to use the variable #qty.
https://cad.onshape.com/documents/11be8f315519c158facf43ad/w/67b4d0efd161e70caadc0944/e/1fe09e3fc77596c4f4f4b5e0?renderMode=0&uiState=63ef74bf708b0b77c6bacd19Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
@johnathan_oey872, adjust the implicit mate connector location inside the Text feature. Bring it down in the Z; then, after the pattern, use Boolean subtract like Dirk mentioned.
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
I needed to click the "Targets" button and select the part to change in the boolean / subtract section..
This is amazing! Many thanks, @MichaelPascoe!
Also (ahem) an old thread, and I found an issue: numbers greater than 9 draw strangely. When I try the example with qty=11, I get this:
The 0 from 10 is positioned with the first digit, with space for the 1. This seems like an issue with the amazing Text feature (up to date fwiw). I tried to make a clock face, starting count at 0 (vs -1) so the clock face starts counting with 1 in the right position, but it does the same thing with the 0 from 10:
I've drawn patterns like this previously using a Python script to generate an SVG which I convert to DXF and import. That works fine but THIS method is amazing for being inside Onshape (and for the incredible variable jiu jitsu).
Any clues would be appreciated. Here's the file I put together, showing my first example.
I would look at "text path". It should solve all of the issues much more quickly.
I think sketches can now handle feature patterns with text expressions? So no need for a custom feature.Nevermind, I just tried it. Sketches still can't handle this: https://cad.onshape.com/documents/11be8f315519c158facf43ad/w/67b4d0efd161e70caadc0944/e/dd792b0c95a5010725997…
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
There's a simpler way to do this as @S1mon mentioned. Here's a version of your doc that has your dial:
https://cad.onshape.com/documents/4fd1a079592b7f4a7b788a8e/w/be94444c984ed56c4bd0e526/e/3569728fa430422861c1bbb0
And you can learn more about the Text feature here:
https://forum.onshape.com/discussion/comment/101768#Comment_101768
The doc that contains the Text feature includes a set of Clock face examples. This custom feature distributes text or sequences around a path, including closed paths (so where there's no beginning or ending).
@S1mon your script is a dream, thank you!
And @MichaelPascoe thank you for the expression insight!