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:
Create a new Part Body in the Part Design workbench.
Switch to the Draft workbench, and import the DXF
Select all DXF elements and do a “Draft to Sketch” operation
Switch back to Part Design workbench, then drag the newly created Sketch into the Part Body
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:
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.
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.
*** 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.
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.
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
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:
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
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.
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