[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!
chrisb
Veteran
Posts: 54168
Joined: Tue Mar 17, 2015 9:14 am

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

Post by chrisb »

I have a body into which I want to engrave some ShapeStrings.
My current procedure is:
- Extrude the ShapeString
- Make a boolean Cut of Body-Extrude

It works, but is this the intended usage?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
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 »

You know how it is with FreeCAD. There is the "intended use" by the programmers, then there are the uses we end users find afterwards. :D

What I think is needed is to allow use of Shapestrings inside bodies, with PartDesign features, like it used to up to 0.16.

I can't test right now, as I'm dealing with weird stuff... :?
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 »

Okay, I reverted to an older freecad-daily package of 0.17 in which Draft workbench works.

I just tested this:

EDIT: after some further attempts I revised the following procedure. It is the best I could come with. Am I doing things I shouldn't do? No idea, but it seems to work quite nicely and keeps an almost pure PartDesign work flow!

  1. Create Body with additive box (and yes, I remembered to attach it ;) )
  2. Switch to the Draft workbench
  3. Create a ShapeString, for its placement I manually entered coordinates (0,0,0) and left the working plane to Auto, which placed it on global XY. In the tree, it is outside the Body.
  4. Switch to the PartDesign workbench.
  5. Right-click on ShapeString in the tree and select "Move to other body", then select the Body and click OK
  6. This moves the ShapeString underneath the Body! :D But it is not attached yet.
  7. Switch to the Part workbench.
  8. Select the ShapeString object then go to the "Part --> Attachment..." menu
  9. Select a face on the Body, no matter the ShapeString's original placement, it will automatically move and rotate to lie on the selected face! Then set the Extra placement coordinates; they are referenced from the lower left corner of the selected face. Click OK.
  10. Switch back to the PartDesign workbench
  11. Create a pocket or a pad - and voilà! :ugeek:
With the Part Attachment utility, the ShapeString is mapped to the body, just like a sketch would. It will always stay referenced to the lower left corner of the face it's mapped to. This is a great improvement over 0.16! :)
FC017_PDN_ShapeString_02.png
FC017_PDN_ShapeString_02.png (40.88 KiB) Viewed 2802 times
I couldn't resist doing an homage to mario52 by copying his usual caption :D

Note that I used a Linux font, Liberation Sans Regular. If you're not on Linux you'll have to update the Font file property to an available font on your system.

Edit: I just needed to add that FreeCAD is awesome, but FreeCAD 0.17 is awesomer. :D
Attachments
FC017_PDN_Shapestring_normandc2.fcstd
(497.83 KiB) Downloaded 72 times
Last edited by NormandC on Sat Jun 24, 2017 10:00 pm, edited 2 times in total.
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 »

I found the weakness of this method: if you change the size or placement of the solid inside the Body, the ShapeString object will not follow.

For example, set the Super placement of the Box to Z -10 and the ShapeString Pocket will disappear.


This is where mapping the ShapeString to the Body would be useful. And I think I found how to do it! Switch to Part workbench and use Part --> Attachment!

I have to go now, but I'll update my first reply later.

EDIT: previous reply updated.
chrisb
Veteran
Posts: 54168
Joined: Tue Mar 17, 2015 9:14 am

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

Post by chrisb »

Thank you very much. Direct padding and pocketing of a ShapeString was to me until now a task in the far future, and now it is here. Far better than my solution ... phantastic!
(Bookmarked as a recipe)
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
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 »

In fact it's always been possible, even in 0.16. The trick was to select the face of a solid before creating the ShapeString. But it didn't fully mapped it (or any other Draft object) to the face, if the solid was moved or its dimensions changed, the Draft object didn't follow it. Now with Part Attachment, it does.
chrisb
Veteran
Posts: 54168
Joined: Tue Mar 17, 2015 9:14 am

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

Post by chrisb »

NormandC wrote: Sun Jun 25, 2017 1:50 am In fact it's always been possible, even in 0.16. The trick was to select the face of a solid before creating the ShapeString. But it didn't fully mapped it (or any other Draft object) to the face, if the solid was moved or its dimensions changed, the Draft object didn't follow it. Now with Part Attachment, it does.
I had always attached the ShapeString to the corresponding face, but I never pocketed directly. instead I went the way described above and so I didn't expect it to move with the face. Your procedure is a double win for me.
I have to confess, that I know the advantages of 0.17 (or some of them) but am still better accustomed to the 0.16 way with it's simpler dependencies. It seems to be more direct and ... somehow simpler.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
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 »

The Body certainly adds some complexity, and it also puts a wall between itself and other workbenches. Maybe that's something that will be improved in the long run.
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 »

Hi Guys

I was looking for a better way to do this when I found this thread. Cheers. Saved me making a new thread :D

Before now, my method was: Make the shape string (Draft wb), extrude Shape String (PART wb), then using a clone to get that into a body for boolean. I have also wondered if a shape binder might be useful here?

Getting the shape string directly into the body would be heaps nicer.

Except:

NormandC wrote: Sat Jun 24, 2017 7:14 pm Switch to the Part workbench.
Select the ShapeString object then go to the "Part --> Attachment..." menu
Select a face on the Body, no matter the ShapeString's original placement, it will automatically move and rotate to lie on the selected face! Then set the Extra placement coordinates; they are referenced from the lower left corner of the selected face. Click OK.

This bit didn't work. Probably because I am trying to attach to a curved face. :mrgreen:

Its for a pipe fitting, for injection moulding. I just want an arrow with the word "FLOW" pocketed in it.

Then on other side of the pipe I will need to add company name or logo or something like that.


Would I be better off trying to attach to an origin plane or datum plane? Whats the best way to do this on a curved surface?


File with example attached.

P.s. I know there is a curved text macro (by Mario I think?) that I haven't used yet. Would that be better in the case of curved surfaces?


OS: Ubuntu 16.04.5 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13528 (Git)
Build type: None
Branch: releases/FreeCAD-0-17
Hash: 5c3f7bf8ec51e2c7187789f7edba71a7aa82a88b
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Australia (en_AU)
Attachments
Flow arrow eg.fcstd
(37.24 KiB) Downloaded 43 times
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 »

Looks like attaching to an origin plane did the trick. :D

Also I skipped a step with the attaching. While the PART wb attachment method does work. I found another way :D It works in all Workbenches (I think).

1. First make sure the Origin for your body is visible. (if attaching to flat face, this is not required)
2. Then select the shape string in tree, and click the little button in map mode field, located near top of Data properties of the shape string.
3. You can now select an origin plane or axis. (or flat face on part if thats all you need)
4. OPTIONAL. You can set attachment offset here to get placement right. You can also do this any time from the shape string properties. Which is why its optional.

Once done you should now see flat face in the shape strings Map mode field. and you can go ahead and do a Part Design operation on the shape string. In my case I did a pocket. It worked, my Pipe now has a lot less parts in the tree and no dependency issues to bite me later. I don't even need to do a boolian at all. The arrow could be added to the pipe in much the same way. Attach sketch to origin and offset to get correct placement. Then pad arrow directly onto the pipe body.

Selection_225.png
Selection_225.png (227.56 KiB) Viewed 2177 times
Selection_226.png
Selection_226.png (185.53 KiB) Viewed 2177 times
Selection_227.png
Selection_227.png (61.51 KiB) Viewed 2177 times
Attachments
Flow arrow eg.fcstd
(135.35 KiB) Downloaded 36 times
Post Reply