Make a 3D model from a dxf file

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!
arcol
Posts: 223
Joined: Sun Nov 10, 2013 9:02 am

Re: Make a 3D model from a dxf file

Post by arcol »

Damn shoogen, you just solved in an half an hour,
while I was on the problem for days!
Thank you!

It is general enough to be the preferred workflow for dxf files.

Although I have a problem.
When I open the dxf file, it imports partially, things are missing:
dxf_import_buggy.png
dxf_import_buggy.png (75.72 KiB) Viewed 1985 times
Now, how about remodelling the stuff using sketches?:)
I stuck with it too (I want to chew this problem from every angle).

I can not rotate the holes for example (with polar pattern feature)....
Last edited by arcol on Thu Oct 23, 2014 11:14 am, edited 1 time in total.
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Make a 3D model from a dxf file

Post by NormandC »

Cool example, I'm sure one of the guys will suggest a Part Design workflow for it.

I would model half of it then do a Part Mirror and fuse the mirror copy with the original.
User avatar
shoogen
Veteran
Posts: 2823
Joined: Thu Dec 01, 2011 5:24 pm

Re: Make a 3D model from a dxf file

Post by shoogen »

You probably need to increase the Draft precision ("Internal Precision level") in the preferences.
BTW: I imported with all automatic joining disabled. I don't know if this makes any difference.
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Make a 3D model from a dxf file

Post by jmaustpc »

In this specific case, turn off join geometry, either 1) import as Draft entities or 2) directly as a sketch

If 1) then multi-select all the Draft entities, then click Draft to sketch, they will all go into just ONE sketch.


Then go to PartDesign and just "pad" to thickness ....and it works.


If you want to be able to adjust things then start constrainting things. Firstly PartDesign menu....validate sketch ...finds the missing coincident constraints..... then click fix.

As to where to go from here ....you first have to decide what is your most basic important base point or aspect from which to define everything else.

Jim
arcol
Posts: 223
Joined: Sun Nov 10, 2013 9:02 am

Re: Make a 3D model from a dxf file

Post by arcol »

shoogen wrote:You probably need to increase the Draft precision ("Internal Precision level") in the preferences.
Internal precision level: 6 (by default)
Dimension precision level: 2 (by default)

Increasing 6 to 7, makes the import function work as expected.
BTW: I imported with all automatic joining disabled. I don't know if this makes any difference.
By all the automatic joining, you mean "Preferences->Import-Export->Join geometry [ ]", can't find anything else.
jmaustpc wrote: If 1) then multi-select all the Draft entities, then click Draft to sketch, they will all go into just ONE sketch.
Not for me.
It will create (with this challenge file) 13 Sketches. So basically all closed loop results a single sketch file.

I can jump this hole with the pasted python script.
jmaustpc wrote: If you want to be able to adjust things then start constrainting things. Firstly PartDesign menu....validate sketch ...finds the missing coincident constraints..... then click fix.
Well, then after fixing the coincident constraints, i end up (with the challenge file) 89 degrees of freedom (153 by default).

I believe it is a no-go. And I think normandc advised against it just in this very same thread.
But anyway, here is a sketch with 34 degrees of freedom, after adding 84 constraints.
dxf_import_challenge_single_sketch.fcstd
(6.96 KiB) Downloaded 43 times
Last edited by arcol on Thu Oct 23, 2014 12:31 pm, edited 4 times in total.
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Make a 3D model from a dxf file

Post by jmaustpc »

shoogen wrote:BTW: I imported with all automatic joining disabled. I don't know if this makes any difference.
yes it does for me, with enabled...I get some duplicate shapes and Draft objects, when it is disabled the import worked fine.

When disabled a multi-selection of the Draft objects then Darft2sketch creates one single sketch

When enabled a multi-selection of the Draft objects then Darft2sketch creates many sketches
arcol
Posts: 223
Joined: Sun Nov 10, 2013 9:02 am

Re: Make a 3D model from a dxf file

Post by arcol »

jmaustpc wrote: When disabled a multi-selection of the Draft objects then Darft2sketch creates one single sketch
For me it takes effect only if I restart freecad. (File->close all is not enough).
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Make a 3D model from a dxf file

Post by jmaustpc »

arcol wrote:
jmaustpc wrote: When disabled a multi-selection of the Draft objects then Darft2sketch creates one single sketch
For me it takes effect only if I restart freecad. (File->close all is not enough).
You currently have to restart FreeCAD for changes in Draft preferences to take effect, every time you change a Draft Preference.
User avatar
quick61
Veteran
Posts: 3803
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: Make a 3D model from a dxf file

Post by quick61 »

Reading through this, thought I'd just offer my take on converting 2D DXF to 3D solid. Raw FreeCADdemo DXF to Part

Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
arcol
Posts: 223
Joined: Sun Nov 10, 2013 9:02 am

Re: Make a 3D model from a dxf file

Post by arcol »

quick61 wrote:Reading through this, thought I'd just offer my take on converting 2D DXF to 3D solid. Raw FreeCADdemo DXF to Part
Thank you quick61 for the educational video, it is a yet another solution to the problem!

Now, I'm more wondering how to model this very same model in freecad.
I turned into one giant sketch -> Number of constraints just exploded to a point, I could not manage it.
dxf_challenge_single.png
dxf_challenge_single.png (245.36 KiB) Viewed 1930 times
Then I tried to turn the outline into a single sketch, pad it, then one hole, but when I wanted to rotate it
90 degrees, I could not reference it to the middle of the big circle.

So now I'm really curious how to model it in Freecad.
Post Reply