How to put a wire in a 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!
Bance
Veteran
Posts: 4186
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: How to put a wire in a body?

Post by Bance »

Why are you complicating everything with PD bodies?

Are they really needed?

Could you not just use Part extrudes?
Pintuxgu
Posts: 25
Joined: Sat Oct 07, 2017 11:18 am

Re: How to put a wire in a body?

Post by Pintuxgu »

This seems to get me a bit further with a limited amount of mouse clicks:

1. Import both DXF files.
2. Draft / Upgrade to wires.
3. Draft / "Draft to Sketch" of everything together.
4. Part Design: Put the sketch into a body and pad it.

I can do this a few times more for milling at different depths. This is my best effort yet, but I'm open to a better workflow.
Attachments
Box_03.png
Box_03.png (128.01 KiB) Viewed 583 times
domad
Veteran
Posts: 2053
Joined: Mon Jun 22, 2020 12:16 pm

Re: How to put a wire in a body?

Post by domad »

Pintuxgu wrote: Wed Mar 22, 2023 3:27 pm ....
Hi Pintuxgu, greetings to the Community!
To do it with "Draft" and "Part" in a matter of seconds, create the extrusion of the box, then import the shapes from the dxf, then create wires for each one (just use the multiple selection function "Box selection") then join the wires into a compound, extrude the compound and finally do a boolean cut (difference) operation between the box and the extruded compound.
Attached is the file created with the procedure described.
You can then obtain a Draft-"Facebinder" from the perforated face to be converted into Sketch with the "Draft to Sketch" function
Attachments
Box_Draft-Part.FCStd
(57.3 KiB) Downloaded 9 times
Box_Draft-Part.png
Box_Draft-Part.png (172.59 KiB) Viewed 573 times
chrisb
Veteran
Posts: 53925
Joined: Tue Mar 17, 2015 9:14 am

Re: How to put a wire in a body?

Post by chrisb »

Returning to the original question: You can add Draft objects to the Group property of a body. I have done so with three rectangles, which I had upgraded to wires and then to faces. These can directly be padded and pocketed.
SnipScreenshot-b28886.png
SnipScreenshot-b28886.png (29.02 KiB) Viewed 560 times
Attachments
bodyOnDraft.FCStd
(30.04 KiB) Downloaded 5 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
papyblaise
Veteran
Posts: 7870
Joined: Thu Jun 13, 2019 4:28 pm
Location: France

Re: How to put a wire in a body?

Post by papyblaise »

if I remember correctly, we already made a stand for Allen key a short time ago (3 or 4 months)
User avatar
Shalmeneser
Veteran
Posts: 9475
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: How to put a wire in a body?

Post by Shalmeneser »

* New file
* File > Import : --.dxf
* Select all shapes
* Draft_Draft2Sketch
* repeat
* (you can suppress shapes)
* PartDesign wb
* New body
* Move sketches inside the body with the mouse
* Modify Map Mode to FlatFace
* Modify Support to XY_Plane
* Pad and Pocket
Attachments
Krimptang_SHALM.FCStd
(76.06 KiB) Downloaded 7 times
Pintuxgu
Posts: 25
Joined: Sat Oct 07, 2017 11:18 am

Re: How to put a wire in a body?

Post by Pintuxgu »

Just had dinner and read about https://wiki.freecad.org/Part_and_PartDesign

I noticed you can:
1. Import DXF in Draft.
2. Upgrade once (to wire) or twice (to faces)
3. Part Workbench -> Extrude.

With the result that you have multiple extrusions:
Box_04.png
Box_04.png (189.13 KiB) Viewed 487 times
But as what I understand from the Wiki, "Part" and "Part Design" have a very large overlap in functionality. And to not confuse stuff further for myself, I will switch back to the Part Design Workbench, as I have much more experience with that, and the Part Workbench does not have to seem much advantage for me.
Pintuxgu
Posts: 25
Joined: Sat Oct 07, 2017 11:18 am

Re: How to put a wire in a body?

Post by Pintuxgu »

I'm very close now, also thanks to Shalmaneser's last post.
I have now imported all layers at the correct depth, padded the outside, and made pockets with all the others on their correct depths.

There are two thinks I do not know what they are or how they work:
* Modify Map Mode to FlatFace
* Modify Support to XY_Plane

I see that these are part of the Sketch, (and not of the body). I will have to study more to understand what those are and how to apply those properties effectively. I guess that not having proper references for your sketches leads into the "topological naming problem" and malformed objects.

Skipping these steps did seem to work (I hope it's not blasphemy).
I found it quite surprising that FreeCAD can now work with sketches with multiple objects in a single sketch, and you can make a pocket from all of them at the same time. This has been a long standing limitation in FreeCAD. Another detail is that once I have created a sketch from the imported DXF file, al the imported "shapes" can be deleted to clean up the document tree.

As for now, the result looks like:
Box_05.png
Box_05.png (178.64 KiB) Viewed 456 times
I still want to change some small things before I go to the Path workbench (that would be a separate topic). The main thing is that I now have a workflow that works.
Attachments
Box_Part_Worbench.FCStd
(502.14 KiB) Downloaded 8 times
Pintuxgu
Posts: 25
Joined: Sat Oct 07, 2017 11:18 am

Re: How to put a wire in a body?

Post by Pintuxgu »

Update: Going from imported shapes directly to Draft / Draft2Sketch as Shalmeneser suggests does work, but it leaves all the lines as separate entities. If you first update them to wires in the Draft workbench, then the ends have coincident constraints in the resulting sketch, and this results in less work when you want to refine the sketch further.

I am also a bit confused by the location of a sketch in the document tree.

According to:
https://wiki.freecad.org/Sketch
> ... Nevertheless, a Sketch can always be created by itself for any other purpose;

A sketch can be created directly (as a stand alone object) in the Draft workbench by the tool already mentioned.
When working in the PartDesign workbench however, a sketch must always be a sub object of a body. It does not allow you to create a sketch in the root of the document for example. This seems inconsistent to me.
Bance
Veteran
Posts: 4186
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: How to put a wire in a body?

Post by Bance »

Pintuxgu wrote: Wed Mar 22, 2023 6:47 pm I found it quite surprising that FreeCAD can now work with sketches with multiple objects in a single sketch, and you can make a pocket from all of them at the same time. This has been a long standing limitation in FreeCAD.
Nonsense this has always been allowed. :evil:
Pintuxgu wrote: Wed Mar 22, 2023 7:13 pm A sketch can be created directly (as a stand alone object) in the Draft workbench by the tool already mentioned.
When working in the PartDesign workbench however, a sketch must always be a sub object of a body. It does not allow you to create a sketch in the root of the document for example. This seems inconsistent to me.
I like to be able to choose where my sketches are created..... :evil:
Post Reply