Hi,
I have come up with an interesting challenge in one of the projects I'm doing right now. Here is a ROV (Remotely Operated Underwater Vehicle) electronics compartment end cap. It has 36 holes for electric wires that will go through it. In order to avoid messing up the connections of the wires that will go through these holes, the connections will be mapped, and the holes need to be labeled on both sides. The part will be 3D-printed, so the these labels will be indented in the surfaces.
Outer side:
Inner side:
The labels, of course, need to be matched, and positioned close to the corresponding hole (more or less on the radial between the center of the part and the hole to which the label is attach). Now, in this part, I have written out and positioned these labels manually, which took quite a lot of time. For the opposite side, I couldn't even reuse the same sketch - any kind of mirror or pattern feature would either give mirrored numbers, or numbers that are on the wrong holes. So I had to copy-paste the same sketch, and then edit every single label to set it to mirrored, before doing a cut-extrude.
Now, this is not that terrible if it has to be done once, but there will be lots of prototyping for this part, it's dimensions will change, the number of holes will change as well, and therefore the labels will end up in the wrong positions all the time if it is left like this.
I am looking for a way to automate this. Ideally when I change the dimensions of the part, or the number of holes by controlling their respective features, the labels should position themselves in the correct place, and follow the numbering pattern that you see in the picture (clockwise and inwards for each group, then move on to the next group). The opposite side should also rebuild in the exact same way, only that every number should be mirrored in order to be readable and matching the same hole.
Any ideas? I know that sketch text can be linked to custom properties: that may open the door to automation. But frankly, I have no idea how to go about this, especially when the number of holes and their corresponding labels will be changing all the time.
Oh, and before you suggest a macro - I have been writing SOLIDWORKS macros for 5 years, and tell you the truth, I would have absolutely no idea how to write a macro for this It would probably take dozens of hours to produce anything that works at least half the time, and that would probably be not worth it anymore (faster to update everything manually every time the model changes). Then again, really not looking forward to updating it manually either - there's a lot of holes!
I'm looking for a truly parametric solution.
Attaching the model (saved with SW2021). I'm open to any ideas
Sketch text pattern and mirrored text
Sketch text pattern and mirrored text
- Attachments
-
- End cap.SLDPRT
- (9.8 MiB) Downloaded 108 times
Hey Laukejas
Nice little problem. I would defo be looking at a macro for this but as you don't want one here's a little idea that may reduce the workload but be open to SW quirks
Holes via Sketch Pattern - here just some random points
Now make your numbers as a configured part using a custom property for the text
I used a DT to get it done quick I then put both parts in an assembly and used the same Sketch Pattern to pattern the numbers.
If you want the numbers to be radial it will be difficult, but here directly below was quick.
Then use Cavity features to make your cuts.
The only thing you have to do is manually configure the patterned numbers As proof of concept I added a few extra holes to get up to 13 in a couple minutes and obviously once its setup you can move the points around where you like.
I know people don't like configurations and external refs - and the way SW is I dont blame them - but configs can be powerful things
Go to full postNice little problem. I would defo be looking at a macro for this but as you don't want one here's a little idea that may reduce the workload but be open to SW quirks
Holes via Sketch Pattern - here just some random points
Now make your numbers as a configured part using a custom property for the text
I used a DT to get it done quick I then put both parts in an assembly and used the same Sketch Pattern to pattern the numbers.
If you want the numbers to be radial it will be difficult, but here directly below was quick.
Then use Cavity features to make your cuts.
The only thing you have to do is manually configure the patterned numbers As proof of concept I added a few extra holes to get up to 13 in a couple minutes and obviously once its setup you can move the points around where you like.
I know people don't like configurations and external refs - and the way SW is I dont blame them - but configs can be powerful things
Re: Sketch text pattern and mirrored text
Hey Laukejas
Nice little problem. I would defo be looking at a macro for this but as you don't want one here's a little idea that may reduce the workload but be open to SW quirks
Holes via Sketch Pattern - here just some random points
Now make your numbers as a configured part using a custom property for the text
I used a DT to get it done quick I then put both parts in an assembly and used the same Sketch Pattern to pattern the numbers.
If you want the numbers to be radial it will be difficult, but here directly below was quick.
Then use Cavity features to make your cuts.
The only thing you have to do is manually configure the patterned numbers As proof of concept I added a few extra holes to get up to 13 in a couple minutes and obviously once its setup you can move the points around where you like.
I know people don't like configurations and external refs - and the way SW is I dont blame them - but configs can be powerful things
Nice little problem. I would defo be looking at a macro for this but as you don't want one here's a little idea that may reduce the workload but be open to SW quirks
Holes via Sketch Pattern - here just some random points
Now make your numbers as a configured part using a custom property for the text
I used a DT to get it done quick I then put both parts in an assembly and used the same Sketch Pattern to pattern the numbers.
If you want the numbers to be radial it will be difficult, but here directly below was quick.
Then use Cavity features to make your cuts.
The only thing you have to do is manually configure the patterned numbers As proof of concept I added a few extra holes to get up to 13 in a couple minutes and obviously once its setup you can move the points around where you like.
I know people don't like configurations and external refs - and the way SW is I dont blame them - but configs can be powerful things
- Attachments
-
- CapWithNumberedHoles.zip
- (2.04 MiB) Downloaded 149 times
Re: Sketch text pattern and mirrored text
That is a fantastic solution, Rob. Really clever use of configurations. It didn't even occur to me that they could be used in this way. It's a shame that this can't be done via Insert-Part, and then patterning the inserted parts with Sketch Driven Pattern, because then you can't change their configuration. This is almost worth writing an SPR for, but I suppose the use case for this is so rare, that it would be really far down the priority list for SW 2023.Rob wrote: ↑Mon Oct 18, 2021 5:16 am Hey Laukejas
Nice little problem. I would defo be looking at a macro for this but as you don't want one here's a little idea that may reduce the workload but be open to SW quirks
image.png
Holes via Sketch Pattern - here just some random points
Now make your numbers as a configured part using a custom property for the text
image.png
I used a DT to get it done quick
image.png
I then put both parts in an assembly and used the same Sketch Pattern to pattern the numbers.
If you want the numbers to be radial it will be difficult, but here directly below was quick.
Then use Cavity features to make your cuts.
The only thing you have to do is manually configure the patterned numbersimage.png
As proof of concept I added a few extra holes to get up to 13 in a couple minutes and obviously once its setup you can move the points around where you like.
image.png
I know people don't like configurations and external refs - and the way SW is I dont blame them - but configs can be powerful things
Anyway, this is really neat. I replicated your solution on my part, and this is indeed far more convenient than manual method:
The only caveat is that the numbers always appear on the bottom of the holes, instead of radially inwards from the hole like in my first pictures, and sometimes there isn't enough space on the bottom, like can be seen in the pic above. Since the Sketch Driven Component Pattern does not allow anything like this, I am really not sure how to solve this issue. Perhaps there could be another sketch with points to be used in the Sketch Driven Component Pattern instead of the original hole pattern sketch, that is parametrically linked to the first one somehow (maybe equations? But there are Skipped Instances in the point sketch, so it probably will still require manual fixing every time), but has the number insertion points offset so the numbers always appear between the hole and the center of the part. I need to experiment with this.
If you have any ideas on how to fix the number position, I'm all ears. But in any case - yours is a truly impressive solution
Re: Sketch text pattern and mirrored text
I found a solution for number positioning - far from ideal, but it kind of works. In the Number part, I set the positioning point (that Sketch Driven Pattern uses) in the middle of the number, not above. That means that if the original hole sketch was used for pattern, then the numbers would end up on top of the holes. So, another sketch is needed, where the sketch points are moved in radially from the holes by an equal distance. It should look like this in order for this to work:
This last bit is really difficult to achieve. Derived sketch won't work, as it is always the same size as the original. Creating some sort of additional feature that would produce bodies on these points, then using Scale to move these bodies inward towards the center, and finally creating a new sketch that captures the new centers of these features doesn't work either, because Scale will change the distances between these centers (compared to the distance between the centers of holes in different orbits). Moreover, that additional sketch would have to be manually updated if the number of holes changes.
So for now, I had to resort to creating another sketch, that uses equations to move new points inwards from the main hole pattern sketch. That sketch cannot be fully automated, because SW doesn't provide equation access to skipped instances - meaning that in the new sketch, I have to create too many points compared to the first sketch.
Finally, this means that during the Sketch Driven Pattern creation, there will be too many instances of Number part - and I have to use Instances To Skip to remove some of them.
Still, while this isn't fully automated, it ain't too bad either, compared to where we started at.
I guess this is as good as it gets with SW 2021
I would consider this case closed, but if you, Rob, or anyone else have any comments on how to improve this setup - I'm all ears. And again, thanks a bunch. Attaching the whole thing to this post.
This last bit is really difficult to achieve. Derived sketch won't work, as it is always the same size as the original. Creating some sort of additional feature that would produce bodies on these points, then using Scale to move these bodies inward towards the center, and finally creating a new sketch that captures the new centers of these features doesn't work either, because Scale will change the distances between these centers (compared to the distance between the centers of holes in different orbits). Moreover, that additional sketch would have to be manually updated if the number of holes changes.
So for now, I had to resort to creating another sketch, that uses equations to move new points inwards from the main hole pattern sketch. That sketch cannot be fully automated, because SW doesn't provide equation access to skipped instances - meaning that in the new sketch, I have to create too many points compared to the first sketch.
Finally, this means that during the Sketch Driven Pattern creation, there will be too many instances of Number part - and I have to use Instances To Skip to remove some of them.
Still, while this isn't fully automated, it ain't too bad either, compared to where we started at.
I guess this is as good as it gets with SW 2021
I would consider this case closed, but if you, Rob, or anyone else have any comments on how to improve this setup - I'm all ears. And again, thanks a bunch. Attaching the whole thing to this post.
- Attachments
-
- End cap.SLDPRT
- (7.29 MiB) Downloaded 106 times
-
- Number.SLDPRT
- (1.06 MiB) Downloaded 96 times
-
- Cap number assembly.SLDASM
- (6.12 MiB) Downloaded 118 times
Re: Sketch text pattern and mirrored text
Hi Laukejas
Glad my idea had some merit..
If the radial position is really important I see no way other than to do the work of additonal ref geom - as you have the skills maybe automated by macro - and individual mates.
Here I added a radial plane and another plane normal to it (to avoid mate flipping later)
I simply dissolved the sketch pattern and applied mates manually. If I was starting over Copy with mates would be perfect. As can be seen here with the 1 and 2 - the distance mate needs to be individually tweaked - or maybe a sketched and configured bounding circle could be created in the numbers file - still a manual process
[edit]
you could always just drag the numbers where you want by eyeball
[edit2] forget this nonsense your 2 sketch solution is perfect
Glad my idea had some merit..
If the radial position is really important I see no way other than to do the work of additonal ref geom - as you have the skills maybe automated by macro - and individual mates.
Here I added a radial plane and another plane normal to it (to avoid mate flipping later)
I simply dissolved the sketch pattern and applied mates manually. If I was starting over Copy with mates would be perfect. As can be seen here with the 1 and 2 - the distance mate needs to be individually tweaked - or maybe a sketched and configured bounding circle could be created in the numbers file - still a manual process
[edit]
you could always just drag the numbers where you want by eyeball
[edit2] forget this nonsense your 2 sketch solution is perfect