Assign a Sketch to a face

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!
kvsriram9
Posts: 9
Joined: Mon Sep 21, 2015 4:41 pm

Assign a Sketch to a face

Postby kvsriram9 » Wed Sep 12, 2018 7:05 am

Hi

I am trying to map a "copied sketch" on to a face of a part.

I have looked at the following thread: "How to duplicate sketch on other face of same object" (https://forum.freecadweb.org/viewtopic. ... edc8e9b7a6). While following the procedure, I keep getting the following error- "In order to use this feature it needs to belong to a part object in the document". I have not clearly understood where I am making a mistake.

Procedure outlined was
1. In hierarchy tree, select the sketch you want to Copy
2. Message - copy dependent objects? - say "no"
3. Click in the 3D view window, and Paste
4. Select the face of the model onto which you want the new sketch to be mapped
5. Click the Map Sketch to Face icon
6. Select the sketch name
7. After editing the sketch, and when I try to pocket the feature - it gives me the above error.

So what do I do to make the Sketch a part of the part object?

Thanks,

br/sriram


OS: Ubuntu 18.04.1 LTS<br/>
Word size of OS: 64-bit<br/>
Word size of FreeCAD: 64-bit<br/>
Version: 0.17.13541 (Git)<br/>
Build type: None<br/>
Branch: releases/FreeCAD-0-17<br/>
Hash: 9948ee4f1570df9216862a79705afb367b2c6ffb<br/>
Python version: 2.7.15rc1<br/>
Qt version: 4.8.7<br/>
Coin version: 4.0.0a<br/>
OCC version: 7.3.0<br/>
Locale: English/India (en_IN)</r>
Attachments
Cover_Test.fcstd
(10.44 KiB) Downloaded 12 times
chrisb
Posts: 36223
Joined: Tue Mar 17, 2015 9:14 am

Re: Assign a Sketch to a face

Postby chrisb » Wed Sep 12, 2018 8:01 am

kvsriram9 wrote: Wed Sep 12, 2018 7:05 am While following the procedure, I keep getting the following error- "In order to use this feature it needs to belong to a part object in the document". I have not clearly understood where I am making a mistake.
I guess, there are two errors involved:
- The first is your error: for pocketing you have to put the sketch into a body and you can attach it only to things inside this body.
- The second is an error in the message. instead of saying "it needs to belong to a part object" it should say it needs to belong to a PartDesign object, or even better: "it needs to belong to a PartDesign body".
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Bance
Posts: 2052
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: Assign a Sketch to a face

Postby Bance » Wed Sep 12, 2018 8:36 am

Hi,

You need to make the sketch part of the body....

Drag and drop it into the body, then the pad/pocket will succeed. Your sketches are overconstrained by the way, you should fix this before you proceed.

Also you should avoid mapping sketches to faces, this can lead to problems (look up topological naming errors), instead use attachment offset to place the sketch where you need it.
Attachments
Cover_Testbance.fcstd
(10.76 KiB) Downloaded 10 times
kvsriram9
Posts: 9
Joined: Mon Sep 21, 2015 4:41 pm

Re: Assign a Sketch to a face

Postby kvsriram9 » Wed Sep 12, 2018 10:00 am

Hi Chrisb / Bance, Thanks for the quick response.

I copied Sketch001 from another part (a different file) and selected the Body (which has a Pad) and pasted the Sketch001 into it. After pasting, in the HierarchyTree, the Sketch001 comes after the Pad entry, but not inside the Pad. So it is not part of Pad.

Whereas in the file attached by Bance, the Sketch001 is inside the Pad and hence able to Pocket.

Bance, did you redraw the Sketch001 in the file? Or did you take the copied Sketch and move into the Pad? For some reason, I am unable to drag and drop. Again, doing something wrong! I tried dragging the Sketch from your file and dropping into Cover_Test. It did not work. Then I copied and pasted the Sketch, it worked, but it is not in the Pad.

Regarding your second point, "use attachment offset..." - point noted. How do you do it?
Bance
Posts: 2052
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: Assign a Sketch to a face

Postby Bance » Wed Sep 12, 2018 12:39 pm

OK,

after pasting the file, then drag and drop sketch001 onto body.
kvsriram9 wrote: Wed Sep 12, 2018 10:00 am Regarding your second point, "use attachment offset..." - point noted. How do you do it?
Attachment offset is in the data tab below the history tree, expand it and change 'Z' offset to suit top of pad.

It wasn't clear from your original post, where the sketch001 had come from. You would probably be better off using a shapebinder.https://www.freecadweb.org/wiki/PartDesign_ShapeBinder
And external geometry tool.

By the way, when looking at the files I provided you, if you make everything invisible, then go to the start of the tree and toggle visibility of the first sketch then each feature in turn you can see how the model was built gradually. This will allow you to understand how it all works!
Attachments
Cover_Testbance.fcstd
(40.25 KiB) Downloaded 12 times
kvsriram9
Posts: 9
Joined: Mon Sep 21, 2015 4:41 pm

Re: Assign a Sketch to a face

Postby kvsriram9 » Wed Sep 12, 2018 1:39 pm

Aaah, got it! Need to drag the sketch onto the Body. Works!

Thanks for the help. Will study the ShapeBinder feature.

Cheers!!
br/sriram
Bance
Posts: 2052
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: Assign a Sketch to a face

Postby Bance » Wed Sep 12, 2018 2:21 pm

You are welcome :D