FreeCAD XZ Plate Exercise

As a FreeCAD exercise, I’ve been trying to find the easiest way to convert the XZ Plate DXFs to parts. I’ve settled on 5 basic steps:

  1. Create a new Part Body in the Part Design workbench.
  2. Switch to the Draft workbench, and import the DXF
  3. Select all DXF elements and do a “Draft to Sketch” operation
  4. Switch back to Part Design workbench, then drag the newly created Sketch into the Part Body
  5. Pad (extrude) the Sketch to create a solid part

What follows is more detail via screenshots of the steps (my apologies to those familiar with the basics). In practice, it only takes ~ 1-1/2 minutes start to finish for the XZ Max Plate. The XZ Min Plate takes a bit longer due to DXF anomolies I don’t fully understand, but it’s still under 5 minutes. See *** below for how to deal with the XZ Min Plate.
Note I’ve configured the Workbenches I use, via the preferences menu, to be selectable as tabs rather than the default dropdown menu. Also, I could not get a good screen grab of step 4 above - in practice you just click on the Sketch and drag it on top of (into) the Part Body.

Steps to go from DXF to Part:

  1. Create a new document in FreeCAD and create a Body in the Part Design workbench (or select Parametric Body from the New File section of the Start screen), then switch to the Draft workbench.




  2. While in the Draft workbench, import the XZ Max DXF file.




  3. From the Edit menu Box Select (or shift + B) the entire DXF - then select Draft to Sketch from the Draft toolbar. This will create a sketch in the Model tree. *** See below for the slightly different XZ Min DXF steps.





  4. Switch to the Part Design workbench and, in the Model tree, click on and drag the newly created Sketch on top of (into) the part body.


Note the Sketch is now under, not outside of, the Part Body.

  1. Now you can select Pad (Extrude) to create the part at the desired thickness.


The resultant part can now be exported in .stl or .3mf format for printing or further processed in the CAM workbench to generate G-Code for milling.


*** For some reason, the XZ Min DXF cannot be Box Selected and converted to a sketch that will pad/extrude as required. So, after importing the XZ Min DXF, you’ll need to Ctrl+Select each line/element individually until all are selected. The larger lines/elements are easily selected. It’s necessary to zoom in to select some of the smaller ones.

After all lines/elements are selected, then the Draft to Sketch and following operations work as expected.



FYI - If you try to use box select, rather than individual line/element select on the XZ Min DXF, the Pad(extrude) operation does not yield the desired result. If anyone knows how to handle the XZ Min DXF without selecting all the lines/elements individually (or fixing the DXF), please share.

  • Al
5 Likes

Personally appreciate practical FreeCAD insights/examples like these. Nice exercise. cheers!

Fwiw shared .stl with recessed holes to help bolts grab more threads in the linear rail blocks. The asymmetric Min and Max XZ Plate models are at https://www.printables.com/model/1047962-printable-xz-plates-for-lowrider-4-consider-alu-in. If printing these temporary plates, then, use lots of layers, walls, and infill.

Recommend Makers use Alu XZ plates to maximize rigidity of their overall machine.

Does it have to do with a lack of constraints? Are some of the elements not touching? I’ve recently been fighting constraints on various shapes and pads will not extrude without full constraints

1 Like

I’m fairly sure it’s an issue with how the original DXF elements “connect” or are “constrained”. I don’t think it’s a FreeCAD constraint issue, based on how the sketch padded when a Box select is attempted on the XZ Min DXF. It does pad(extrude), just not the way you’d want. If you expand the DXF layers, you can see why I was trying to avoid figuring out what DXF elements should/could be fixed.


Although Sketches should be fully constrained to prevent breaking the model when backing up in the tree and making changes, it’s not a requirement in order to do a pad(extrude). The sketch must however be closed - i.e. no “open wires”. In the current FreeCAD release, if you long press on a sketch with overlapping features a menu pops up to allow you to more closely specify what you want to pad. Here’s a sketch with several overlapping rectangles showing the long press menu:

Here are some pads added without applying any constraints:

  • Al

i used to do it a similar way and had issues at times also

creating a draft of dxf ,individual parts, i know it says recommended, can cause this prob, ive found some dxf can have hundreds of nodes and curves ,don’t always close and spend hrs trying find them, or fix them i go fused generally, even if im editing dxf find it quicker to delete parts than find open constraints among hundreds of dots

the way i do it now

1 part design - click empty file

2 import dxf -fused

3 click new body in tool bar, beside new sketch icon in tool bar

you should now have this showing

4 :drag highlighted into new body , should look like this , click base feature which will highlight all of dxf

than pad

Thanks for the suggestion. Perhaps I’m doing it wrong, but I couldn’t get that method, using a “Fused” import, to work on the problematic XZ Min DXF. At step 3, it looked similar but, when I expanded the Layers to find the highlighted item you dragged into the body, the simularity ended. I tried it on the non-problematic XZ Max DXF with similar results. Any idea what I might be doing wrong?


The method I used for the problematic DXF only takes a couple of minutes to highlight the segments before doing a Draft to Sketch. It’s not as quick as a Box Select, but it doesn’t require what might be hours of work to manually correct what’s needed in the DXF itself. Your method is definitely preferable if I could get it to work.

  • Al

what happens if you click on arrow by layers what is in there.

can u up load the file and ill have play and see what it does for me

1 Like

The first screen shot is after doing step 3.
The second screen shot is what shows after clicking on the Layers arrow. Even if the item you highlighted to select and drag in step 4 was in view at this point, the body to drag it into is out of view at the bottom of the panel and I don’t think the panel can be scrolled while dragging.

It’s probably best to get the file directly from Printables. Here’s the link:

It’s in the STL files section, called XZ Min DXF.
The XZ Max DXF file converted with Draft to Sketch in a single operation, no problem. It’s the XZ Min file that requires extra steps.

just thought of something which has happened before when bringing in DXF or exporting , it will double up on some layers in the dxf , just threw it into lightburn clicked on each piece if they don’t become broken lines generally or double ups, can be multiple lays , had 9 on 1 hinge pocket hole once sometimes grouped , and sure enough outer edge 2 layers

converted straight after that

if i could upload the freecad file i would

1 Like

@vicious1 can you allos FCStd files? Even though no one wants an STD? :smiley:

can i double emoji :+1: and laughing at std :rofl:

1 Like

Zip it, then attach the .zip.

1 Like

xz min version 2.zip (51.9 KB)

1 Like

Yeah, but an extra step. :slight_smile:

I should note that one of the XZ plate DXFs has a known path that isn’t closed. It’s been that way sine it was created.

1 Like