Hi, I am trying to import a building floor plan that was originally drawn in QCad and saved as a DXF.
The file opens perfectly in LibreCAD and also in DraftSight, but try as I may I cannot get it to work properly in FreeCAD (both 0.17 and tonight's 0.18).
Image in LibreCAD:
Image in DraftSight:
Image in FreeCAD:
I have tried exporting in various flavours of DXF and also as DWG from both LibreCAD and DraftSight, but the result is the same every time.
I have also tried deleting various parts of the drawing to see if there is a rogue line, and although there is some slight differences, the drawing is still incomplete.
Any help is very welcome!
Missing lines with DXF import
Forum rules
and Helpful information
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!
Also, be nice to others! Read the FreeCAD code of conduct!
Re: Missing lines with DXF import
Could you share your dxf file so I could try it out and see if I can come with a solution for you?
*EDIT*: Also, one thing that sometimes solves problems with dxf is to select and copy to clipboard all objects from your dxf file, create a new dwg/dxf, paste all objects in this new file and save it with a new name. Then, import this new dxf to FreeCAD.
*EDIT*: Also, one thing that sometimes solves problems with dxf is to select and copy to clipboard all objects from your dxf file, create a new dwg/dxf, paste all objects in this new file and save it with a new name. Then, import this new dxf to FreeCAD.
Re: Missing lines with DXF import
By default I believe the Legacy Python Importer is not checked, enabling this can fix a lot of DXF import problems. This is found in Edit menu > Preferences > Import-Export > DXF tab as per screenshot:
Click Apply and then OK to ensure the change is made.
Click Apply and then OK to ensure the change is made.
Re: Missing lines with DXF import
Firstly, thanks to both for replying.
I can continue to the next stage now.
Of course, I should have done that. Attached now.Could you share your dxf file so I could try it out and see if I can come with a solution for you?
Hmm, I tried that but it was exactly the same - still bits missing.*EDIT*: Also, one thing that sometimes solves problems with dxf is to select and copy to clipboard all objects from your dxf file, create a new dwg/dxf, paste all objects in this new file and save it with a new name. Then, import this new dxf to FreeCAD.
I wanted to try this, but was having a lot of problems installing the add-on (Add-on Manager kept freezing trying to populate the add-on list). However, I tried again just now and yes - it works !By default I believe the Legacy Python Importer is not checked, enabling this can fix a lot of DXF import problems. This is found in Edit menu > Preferences > Import-Export > DXF tab as per screenshot:
I can continue to the next stage now.
- Attachments
-
- NONAME_1.dxf
- (58.39 KiB) Downloaded 58 times
Re: Missing lines with DXF import
I didn't know about the Legacy Python Importer, if that solved the problem that's the most important. In alternative, if you open your DXF with Draftsight, copy all objects to a new DXF file and import again, even with the Legacy Python Importer checked it seems to work. Attached you'll find the new DXF for you to try it out.
- Attachments
-
- NONAME.dxf
- (108.71 KiB) Downloaded 84 times
Re: Missing lines with DXF import
Thank you, your DXF also worksif you open your DXF with Draftsight, copy all objects to a new DXF file and import again, even with the Legacy Python Importer checked it seems to work. Attached you'll find the new DXF for you to try it out
I am not sure why I couldn't get the copy method to work last night, maybe it's because I was using Linux Mint. I will try again this evening.
Re: Missing lines with DXF import
A few years ago I made my own command line interface tool for importing DXFs.
https://framagit.org/MarcusFecit/LibreCadToFreeCad
The tool can also detect basic constraints such as coincidence, tangentiality, horizontality, verticality, etc..
I now have improved it with a Pyside2 QT interface and even a Web interface (Flask).
I hope I will have some time this summer to clean the code, translate it to english and publish it.
What I can say about your DXF file is that the useful part of the design is far away from the origin. Is it what you want ?
Et bonne journée !
https://framagit.org/MarcusFecit/LibreCadToFreeCad
The tool can also detect basic constraints such as coincidence, tangentiality, horizontality, verticality, etc..
I now have improved it with a Pyside2 QT interface and even a Web interface (Flask).
I hope I will have some time this summer to clean the code, translate it to english and publish it.
What I can say about your DXF file is that the useful part of the design is far away from the origin. Is it what you want ?
Et bonne journée !
--
Marc BERLIOUX
Marc BERLIOUX