[0.17 PDN] How to engrave a ShapeString in a PDN-Body

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
Mongrel_Shark
Posts: 138
Joined: Sat Oct 15, 2016 9:54 am
Location: Australia

Re: [0.17 PDN] How to engrave a ShapeString in a PDN-Body

Post by Mongrel_Shark »

NormandC wrote: Wed Aug 08, 2018 3:12 am Oh, there's something really weird in your file. In your Body, the features from Pad to Hole002 are all nested one inside the other as if they were Part objects. I've never seen that inside a Body. :?
That happens every time I use hole. On both my 14.04 machine and 16.04 where I made these files. I've seen it mentioned before on the forum. I thought you (NormandC) where making a bug report about it, but I can't remember where I thought I saw that.... :? keep making holes and it goes on and on.......
NormandC wrote: Wed Aug 08, 2018 3:12 am You could "solve" it by choosing a monospaced font rather than a proportional one.
Ok. How do I do that?




I was playing around some more and I found that I could extrude the text shape. Then use Part Design clone. Then make a body from the clone, and it worked right. No boolean errors this time. I even forgot to make it all one solid!! File attached. I think it worked because it could drag the clone into the body without errors, but when it tries to drag a part WB extrude into a body its got problems with bits from other workbenches. I also made the former way (no clone step) work by deleting the extrude from the body, but this obviously makes it uneditable later.

Except on my original model (the one I can't share) where I can't seem to adjust the text height when I did the same thing. Not a big deal, it was high, it got cut down with a pocket.. Text is last thing to get added, care factor is low.


I'm horrible with inkscape, but need to learn and thinking that might be a good option here. I'd like to try a monospaced font first though.
Attachments
Circular text body fuse4 eg.fcstd
(825.55 KiB) Downloaded 32 times
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: [0.17 PDN] How to engrave a ShapeString in a PDN-Body

Post by NormandC »

Mongrel_Shark wrote: Wed Aug 08, 2018 4:42 am
NormandC wrote: Wed Aug 08, 2018 3:12 am You could "solve" it by choosing a monospaced font rather than a proportional one.
Ok. How do I do that?
In the properties of the ShapeString, you can change the font used. See Draft ShapeString (Font File property)
User avatar
Mongrel_Shark
Posts: 138
Joined: Sat Oct 15, 2016 9:54 am
Location: Australia

Re: [0.17 PDN] How to engrave a ShapeString in a PDN-Body

Post by Mongrel_Shark »

NormandC wrote: Wed Aug 08, 2018 7:06 pm In the properties of the ShapeString, you can change the font used. See Draft ShapeString (Font File property)
That wasn't really what I was asking. I was wondering how do I choose a mono-spaced font from the options provided? I didn't see any property’s or data on the fonts available describing the spacing method.... I also didn't see the requirement for monospaced text in the instructions for circular text macro. Which is probably why I thought the spacing problem was a bug.

I googled and found a list on wikipedia. https://en.wikipedia.org/wiki/List_of_m ... _typefaces


Turns out there is a DejaVuSansMono which would be ideal, Almost the same as the DejaVu Condensed I was using.. So I changed all the shape strings (you can highlight them all and only have to do it once).


But when I re-compute the resulting shape, extrude, clone and base feature. The changes are not propagated through the model (file attached). How do I get it to propagate through the tree?
which brings me back to:
NormandC wrote: Wed Aug 08, 2018 7:06 pm In the properties of the ShapeString, you can change the font used. See Draft ShapeString (Font File property)
lol. While you can change the font of the shape string, you can't change the children of the font made by circular text macro. Unless there are more steps you left out...

Thats not really an ideal fix anyway


Surely there is some way to get all the shape strings into one sketch so I can constrain them to an arc or something? Then I won't have to go through a macro and 4 separate conversions just to attach to the part, and I'll have parametric text that I can adjust to fit, rather than starting from scratch every time something is out by a small amount or in the wrong font.......
Attachments
Circular text body fuse5 eg.fcstd
(825.83 KiB) Downloaded 44 times
chrisb
Veteran
Posts: 54303
Joined: Tue Mar 17, 2015 9:14 am

Re: [0.17 PDN] How to engrave a ShapeString in a PDN-Body

Post by chrisb »

Mongrel_Shark wrote: Thu Aug 09, 2018 2:29 am
NormandC wrote: Wed Aug 08, 2018 7:06 pm In the properties of the ShapeString, you can change the font used. See Draft ShapeString (Font File property)
That wasn't really what I was asking. I was wondering how do I choose a mono-spaced font from the options provided?
Thats exactly what you were asking, although it might not have been what you was wondering:
NormandC wrote: Wed Aug 08, 2018 7:06 pm
Mongrel_Shark wrote: Wed Aug 08, 2018 4:42 am
NormandC wrote: Wed Aug 08, 2018 3:12 am You could "solve" it by choosing a monospaced font rather than a proportional one.
Ok. How do I do that?
In the properties of the ShapeString, you can change the font used. See Draft ShapeString (Font File property)
Font properties are something outside of FreeCAD's scope. You can use one of the fonts as is, FreeCAD only needs the font file, the rest is up to you.
But when I re-compute the resulting shape, extrude, clone and base feature. The changes are not propagated through the model (file attached). How do I get it to propagate through the tree?
They are propagated, but you have somehow doubled every character. Delete the unwanted and enjoy the improved result.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
Mongrel_Shark
Posts: 138
Joined: Sat Oct 15, 2016 9:54 am
Location: Australia

Re: [0.17 PDN] How to engrave a ShapeString in a PDN-Body

Post by Mongrel_Shark »

I'm not digging that quote wormhole any deeper. :?

My question was how do I chose a monospaced font.

Not

How do I change the font. <-- this is the question that has been answered.

I wans't asking
How do I choose a monospaced fon't using freecad exclusively.

I know almost nothing about font's or writing in general. :mrgreen: The correct answer was probably to google up a list of fonts and compare them with what’s in my library. Which I did. that’s one problem solved.

Moving on now.

chrisb wrote: Thu Aug 09, 2018 5:25 am
They are propagated, but you have somehow doubled every character. Delete the unwanted and enjoy the improved result.
Nope. I just re-downloaded my own file to check it was the same (in case I saved something else). it is the same as my original Circular text body fuse5.

I have a changed FcString folder full of shape strings in the new font, and a bunch of objects in the old font. no double up objects no double up anything except the 3 objects that are still using the old string. why do I even need 3 objects?
If I delete everything in the unwanted font I only have FcShape folder left :? And I have no idea how to get that to make a new shape or something I can extrude or pad.


All of this is beside the point. I added to this thread, rather than start a new one, because I want to do what the title says. Add text to the PDN body, get placement right, then pad it. or something similar. Fuse as a last resort. It just so happent that I have curved and angled curved faces which makes it a bit harder.
I'm now adding that I would strongly prefer not to use circular text macro, as I have spent way too many hours (best part of 2 days now) re-making attempt after attempt at getting stuff in the right place. I would prefer a parametric solution.



I also have another file that's giving me even bigger problems. Can't get macro output right, cant get extrude direction right, nor can I get fuse placement to stick where I put it.
Maybe forget everything covered so far and go back to what’s the easiest way to do this? With all steps explained in detail? on the new file.

My day is almost done, I'll be back in 12 hours or so. I can wait longer for a good answer and would appreciate everyone taking a deep breath having a proper read/look before offering more advice.
I feel like we are all trying to do this the hard way.
Padding characters one at a time wouldn't be half as bad as most of what I have tried. The only reason I haven't is because I can't think of a way to get character spacing good.
Attachments
Circular text 45 eg.fcstd
(184.52 KiB) Downloaded 41 times
chrisb
Veteran
Posts: 54303
Joined: Tue Mar 17, 2015 9:14 am

Re: [0.17 PDN] How to engrave a ShapeString in a PDN-Body

Post by chrisb »

I had a look at the file attached to the quoted post:
Mongrel_Shark wrote: Thu Aug 09, 2018 2:29 am Surely there is some way to get all the shape strings into one sketch so I can constrain them to an arc or something? Then I won't have to go through a macro and 4 separate conversions just to attach to the part, and I'll have parametric text that I can adjust to fit, rather than starting from scratch every time something is out by a small amount or in the wrong font.......
There you seem to have overlays of characters. If I remove or hide all ShapeStrings except ShapeString005 I see the same text without the distracting doubles.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
mario52
Veteran
Posts: 4701
Joined: Wed May 16, 2012 2:13 pm

Re: [0.17 PDN] How to engrave a ShapeString in a PDN-Body

Post by mario52 »

hi

maybe like this (but not body)

Circular text 45 eg_Bis.FCStd
(271.61 KiB) Downloaded 35 times
i use FCCircularText (that you know and right not easy to use) and Macro_Rotate_To_Point or Macro_Center_Align_Objects_with_Faces_or_Edges

Circular_text_45_eg_Bis.png
Circular_text_45_eg_Bis.png (36.09 KiB) Viewed 1145 times
example:

Image


PS: the FCCircularText work the degrees and number (360deg / number of character+1) and not with pixel character
i work on new version for centring the character left, center, right and other align to face, wire ... "mais je n'arrive pas à la mettre au point comme je veux"

here examples
Direction_et_Point
Position_Character
Character_On_Face
Wire_To_Face.gif
Position_Circle
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
User avatar
Mongrel_Shark
Posts: 138
Joined: Sat Oct 15, 2016 9:54 am
Location: Australia

Re: [0.17 PDN] How to engrave a ShapeString in a PDN-Body

Post by Mongrel_Shark »

chrisb wrote: Thu Aug 09, 2018 10:58 am There you seem to have overlays of characters. If I remove or hide all ShapeStrings except ShapeString005 I see the same text without the distracting doubles.
Sorry I have no idea what you are talking about. Perhaps a screenshot or something? I think you must be looking at another document.

I did leave overlays visible in "circular text body5.fcstd" just to highlight the problem. Parent changed and children did not. Which was not what I expected after previous advice to just change the shape string and not do anything else.

in "circular text body5.fcstd"?
Shapestring 5 is a space. If you make it visible and everything else not visible you still can't see anything because you have only a space visible and your page is blank...
Selection_244.png
Selection_244.png (135.01 KiB) Viewed 1129 times
To repeat the same problem again. (even though I was happy to move on, because this was getting off topic)
in that document I changed all fonts in FcShape folder. This successfully changed all shape strings in that folder to the new font. But the resultant shape--> extrude-->clone-->base object--> boolean did not change font.
I would make a new shape-->extrude from the changed FcShape folder. But I don't know how to get from FcString folder to shape. the only way I know I would have to do each shape string individually. Shape-->extrude-->Clone-->base feature-->boolean. Thats going to take ages and make my document huge and probably cash my computer. So I asked for help. I spent hours writing and editing my post so it would make as much sense as possible, only for you to skim it quickly and miss most of the content I so carefully laid out. I know I'm not good at writing, but I'm not that bad. If you want to help, please take the time to actually read the questions. Or refrain from commenting as you are just confusing things more.
User avatar
Mongrel_Shark
Posts: 138
Joined: Sat Oct 15, 2016 9:54 am
Location: Australia

Re: [0.17 PDN] How to engrave a ShapeString in a PDN-Body

Post by Mongrel_Shark »

mario52 wrote: Thu Aug 09, 2018 1:08 pm hi

maybe like this (but not body)


Circular text 45 eg_Bis.FCStd

i use FCCircularText (that you know and right not easy to use) and Macro_Rotate_To_Point or Macro_Center_Align_Objects_with_Faces_or_Edges


Circular_text_45_eg_Bis.png

example:

Image


PS: the FCCircularText work the degrees and number (360deg / number of character+1) and not with pixel character
i work on new version for centring the character left, center, right and other align to face, wire ... "mais je n'arrive pas à la mettre au point comme je veux"

here examples
Direction_et_Point
Position_Character
Character_On_Face
Wire_To_Face.gif
Position_Circle
Thank You Mario!!


I have many questions about all the steps involved, as you see I can't even get from FcShape to extrude.... But perhaps we could look at that in another thread. This one is about using the body to do this task.

Is it ok with you if I copy your compound with P4.2 to my production model and fuse? Its just a part number for my reference.

I can't say what its for right now, but once the patent is filed I will reveal all on the forum. Hopefully by years end.
User avatar
Mongrel_Shark
Posts: 138
Joined: Sat Oct 15, 2016 9:54 am
Location: Australia

Re: [0.17 PDN] How to engrave a ShapeString in a PDN-Body

Post by Mongrel_Shark »

Ok I think I have a way to do this in the body.

I have two parts of the method that are less elegant than I would like. Hoping someone can improve upon this method.

The goal was to put the part number p 4.2 on a conical section of a part with some cutaways in annoying position.. (I could have created/moved the cutaways to less annoying position, but I want the challenge with the text)

1.
After making the part I made a shape string for the first letter P.

2.
I drag and dropped this shape string into my body on the tree. Made the body origin visible. Then Clicked on the little button in Data property of my shape string, in the map map mode field. To set the attachment.
Selection_248.png
Selection_248.png (140.17 KiB) Viewed 1122 times
3.
I attached to body z axis. Hoping this would help me out later. It didn't help later, so any axis or plane is probably ok.
Before closing the dialogue I used the attachment offset fields to get my P where I wanted it. I was hoping to use transform tool here, but it din't work. ( I closed map mode dialogue to try transform, then went back to map mode when transform failed)
Setting body transparency to 80% in the view property’s helped me see what I was doing. Then I scrolled with mouse wheel to place my p in the right spot. Almost as easy as transform tool :D
Selection_255.png
Selection_255.png (155.1 KiB) Viewed 1122 times
Close attachment dialogue

4.
Copy shape string 3 times with ctrl + c and then ctrl+v 3 times.

Change shape string text in 001 from p to 4. 002 to . and 003 to 4

5.
Here I was hoping I could just rotate shape strings around the body z axis. This would place each letter very nicely with easy to control spacing. But I could not get it to work. If someone can show me how to do this it would make text placement very fast. Maybe I need to use a datum line?

As I was unable to rotate around z axis, I placed each character by altering its xyz attachment. I found the map mode dialogue the easiest way to do this. Some adjustment of rotation was also required each time. This took a while, but with practice could be faster and more precise.
Selection_247.png
Selection_247.png (130.84 KiB) Viewed 1122 times
I also found this much easier after I made a sketch of a circle and used that as a line to follow with my text.

All up placing 3 more letters took me about 30-40 min. Not too bad. Could be a lot better.

6.
Pad shape strings.

7.
My placement was not perfect. So pads where uneven height from part surface. I fixed this by making pads too big. Then trimming down with groove. This hid the worst of the bad placement.
Selection_254.png
Selection_254.png (39.07 KiB) Viewed 1122 times
at this point you may want to adjust shape string placements a small amount just to get it looking more square etc.



end instruction.
---------------------------
The attached file shows my result. Its not bad but some room for improvement. I found this method much easier than any other way so far. and it's staying in PDN and dealing with the body system more. Probably the way things need to go....

1st improvement
I would like to learn how to rotate around z axis. Like Mario's rotate around point macro. So when first letter is placed. Only one rotation axis needs to change to space the letters out around the curve.

2nd improvement
I would also like to make the letters all one thing at some point in the process, ideally before pad or cut is used.. or attach them to a thing.
So if I want to move them later, I can move them all at once and not have to place individually. I think I could do this with another body. Then boolean the 2 bodys to get a result. Wondering is there a container that can go in a body and allow things to be moved in a group? With Transform tool?

If the thing they attach to is a sketch or construction line or something. Placement could be even easier. Ideally I would attach the shape strings to sketch002 in the example file attached.


Note: As my text is small compared to my radius. I probably could have put 2 or more characters per shape string. And it would probably still work out.

Now who wants to show me how to helix text all the way around a ball? :mrgreen: I want to 3dprint a FREECAD IS THE BEST golf ball. Where instead of dimples it has text pocketed in. :mrgreen:
Attachments
Circular text 45 PDN eg.fcstd
(370.62 KiB) Downloaded 41 times
Post Reply