Centering Shapestring on cube surface

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
User avatar
Build-0-Matic
Posts: 54
Joined: Fri Dec 20, 2019 9:31 pm

Centering Shapestring on cube surface

Post by Build-0-Matic »

Hi!
I know this must sound pretty simple, but I'm currently trying to make a dice with some embossed text on each face.
I'd like the text to be at a 45° angle to maximize available text length.

I've made a cube with a fillet using the part workbench.
I used the draft workbench to make shapestrings that I then extruded. While this worked, I find the manual aligning and centering process to be quite a hassle.

I did find some references in the forum that seem to work, but they were made a long time ago and I can't seem to be able to make them work in version 0.19

One of them used the Lattice2 workbench, which is a neat idea, but I then have a bunch of problems projecting the text in the proper orientation on the surface.

Is there a simple way to do that without the shapestring going off at all sorts of weird angles?
Thanks.

Here's my current config
OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24291 (Git)
Build type: Release
Branch: releases/FreeCAD-0-19
Hash: 7b5e18a0759de778b74d3a5c17eba9cb815035ac
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/Canada (en_CA)
edwilliams16
Veteran
Posts: 3112
Joined: Thu Sep 24, 2020 10:31 pm
Location: Hawaii
Contact:

Re: Centering Shapestring on cube surface

Post by edwilliams16 »

Screen Shot 2022-05-24 at 10.21.47 AM.png
Screen Shot 2022-05-24 at 10.21.47 AM.png (37.7 KiB) Viewed 951 times

Took some fiddling. Made a toposeries of placements on the centers of the faces of the cube. Populated them with children of Strings
Strings had XAlign and YAlign = Middle
Screen Shot 2022-05-24 at 10.23.38 AM.png
Screen Shot 2022-05-24 at 10.23.38 AM.png (42.4 KiB) Viewed 951 times
Attachments
die_EW.FCStd
(836.89 KiB) Downloaded 18 times
User avatar
Build-0-Matic
Posts: 54
Joined: Fri Dec 20, 2019 9:31 pm

Re: Centering Shapestring on cube surface

Post by Build-0-Matic »

Wow!
That's exactly what I was trying to do.
I'll really have to dissect that file to see how you did it.
Thanks!

I'll just have to figure out how to turn around the backwards text and subtract the text from the surfaces... Shouldn't be too hard.
edwilliams16
Veteran
Posts: 3112
Joined: Thu Sep 24, 2020 10:31 pm
Location: Hawaii
Contact:

Re: Centering Shapestring on cube surface

Post by edwilliams16 »

Subtract is easy - just replace the Boolean Fusion with a Boolean Cut. The other problem less so. To get the orientations right, you may need to divide the toposeries into two groups of opposing faces and rotate the shapestrings on the reversed ones. That is, unless you can find a better attachment mode that respects the outward normal. You also may want to make the cube slightly different dimensions as the current inertial attachment is ambiguous and FreeCAD is flipping a coin in some way.

I thought it might be simpler to use the Lattice2|Placement Shooter onto the six faces and adjust the placements to center them. This turned out much less convoluted.
Screen Shot 2022-05-24 at 1.20.00 PM.png
Screen Shot 2022-05-24 at 1.20.00 PM.png (60.06 KiB) Viewed 903 times
Attachments
die_EW2.FCStd
(844.77 KiB) Downloaded 12 times
User avatar
Build-0-Matic
Posts: 54
Joined: Fri Dec 20, 2019 9:31 pm

Re: Centering Shapestring on cube surface

Post by Build-0-Matic »

I was thinking of doing the toposeries in two steps, one for the surround and a different one for top and bottom.
This is the kind of thing that in theory should be simple but turns out to be surprisingly hard... :?
edwilliams16
Veteran
Posts: 3112
Joined: Thu Sep 24, 2020 10:31 pm
Location: Hawaii
Contact:

Re: Centering Shapestring on cube surface

Post by edwilliams16 »

Build-0-Matic wrote: Wed May 25, 2022 2:55 pm This is the kind of thing that in theory should be simple but turns out to be surprisingly hard... :?
I don't see how it is simple in theory. For each face we need to specify a diagonal direction for the text. This boils down to assigning a vertex corner for each face. For this to happen without just defining that assignment face by face, we need a rule, some symmetry we can use that allows to figure out which corner to start the diagonal. I don't believe there is such a rule.
What arrangement of text diagonals are you looking to end up with, anyway?
User avatar
Build-0-Matic
Posts: 54
Joined: Fri Dec 20, 2019 9:31 pm

Re: Centering Shapestring on cube surface

Post by Build-0-Matic »

When I say it's simple in theory, I mean that it's just a primitive cube with some centered text on the sides. It's not like some complex thread or something.
But still it's hard to do.

But I've had an idea of starting with a Part Design workbench primitive instead... I'm going to try this even though I've never used that workbench.

Here's a picture of what I'm trying to do. This is from a book on creativity. They suggest cutting them out but I can't get myself to cut a book apart, so I want to 3D print them instead.
IMG_3082.JPG
IMG_3082.JPG (95.38 KiB) Viewed 742 times
User avatar
Build-0-Matic
Posts: 54
Joined: Fri Dec 20, 2019 9:31 pm

Re: Centering Shapestring on cube surface

Post by Build-0-Matic »

I think I'm close to cracking this puzzle.
Here's where I'm at so far.
Open Part Design workbench
Create a new body.
Create a primitive cube
Add a datum point to the center of mass of one face.
Open the Lattice2 workbench
Create a Lattice placement with a single object
Select as support point the datum point previously created
Make string at given placement
Select as support the same datum point
Open the draft workbench
Rotate the string by 45°
Open Part workbench
Select string and extrude
Select original box and text objects and apply a cut to the whole thing.

I think that's going to work... I'll have to finish one in order to really know.
User avatar
Build-0-Matic
Posts: 54
Joined: Fri Dec 20, 2019 9:31 pm

Re: Centering Shapestring on cube surface

Post by Build-0-Matic »

OK... your solution worked better than mine :roll:
edwilliams16
Veteran
Posts: 3112
Joined: Thu Sep 24, 2020 10:31 pm
Location: Hawaii
Contact:

Re: Centering Shapestring on cube surface

Post by edwilliams16 »

Lattice2 offers more tools to use with Part than with Part Design, so there’s not much reason to use PD here.
Post Reply