3
$\begingroup$

I'm tring to work in Blender using a DXF as a base, the original file is made in Autocad 2018, every object exploded, flatten, exported has DXF and imported in Blender 2.8 with the included DXF import addon. No matter how I export the file, (Autocad or different online exporter) the file in Blender has artifacts, lines that are not in the orginal drawing, probably mispalced lines. See the image for a reference. What I'm supposed to do to have a nearly-perfect DXF import? Blender DXf imported on the left, Autocad original file on the right.

$\endgroup$

2 Answers 2

5
$\begingroup$

Since import from dxf can be tricky I'll suggest two possible workarounds for posterity :

Curve import (the actual problem in this question)

Splines in DXF format and Blender's own way of handling curves are different so it's really hard to expect imported curves to be represented exactly like they are drawn in your CAD software.

You'll have to convert the splines to regular LINEs or POLYLINEs if you want to import them accurately. Of course you'll lose the curve capabilites of your objects but you can convert the mesh lines back to Blender curves and take it from there if you really want to be working with curves.

Floating Point Precision Error

This can be caused by floating point precision error. It's because usually in Autocad or other CAD softwares when working on infrastructure projects, you work in particular coordinate systems so your project is georeferenced. The coordinates can be in the millions of units in X or Y axis so when it's imported in Blender they can be quite far from origin. However Blender doesn't support that natively, and it behaves quite erratically when you work far from the origin.

Here are some workarounds :

  • Move everything close to the origin in your dxf file and save it as is (my preferred method since it's easier to just input precise values and use them again when exporting back to dxf)
  • In Blender, if you have only one object : select the Object then go Object > Set Origin > To Geometry and then Object > Clear > Location.
  • In Blender, if you have several objects : Select all the objects, go into edit mode, Select all the geometry with Select > All then go Mesh > Snap > Cursor to Selected, then go back into Object mode, Object > Set Origin > To 3D Cursor and then Object > Clear > Location
  • You do have the option to use a Geo Referencing system while importing if you happen to know the Latitude and Longitude of your project. I didn't test it and I wouldn't rely on it though :)

enter image description here

$\endgroup$
4
  • $\begingroup$ Thanks for your reply, but it doesn't seem it worked in my case: I tried the first and third method, and still the same artifacts in the same locatin appear. $\endgroup$
    – ro_orco
    Nov 25, 2021 at 9:47
  • $\begingroup$ The problem seems more related to curves not being recognized. $\endgroup$
    – ro_orco
    Nov 25, 2021 at 9:59
  • 1
    $\begingroup$ Oh alright, yeah curves in Autocad and Blender behave quite differently, I suggest you convert your curves to regular polylines before importing the project $\endgroup$
    – Gorgious
    Nov 25, 2021 at 10:09
  • $\begingroup$ That was it! Thank you $\endgroup$
    – ro_orco
    Nov 25, 2021 at 10:18
0
$\begingroup$

I know this issue has been raised for three years now, but I recently had a similar problem, just sharing how I solved it:

This error seems to be related to how AutoCAD outputs the dxf file, specifically that some rounds are not converted to polyline correctly resulting in a misrecognition by Blender or other software.

What I do is:

  1. select all lines in AutoCAD and use the join command (optional).
  2. save as a dxf file.
  3. open the dxf file using Klayout and check for errors (I have not encountered any errors so far).
  4. save as a new dxf file using Klayout.
  5. import the new dxf file into Blender

Although I don't know what happend when AutoCAD save arcs, the Blender error seems to be arc related. I've also had similar problems loading dxf files on some other software. But anyway, Klayout solved my problem. Hope it may help you too!

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .