SolveSpace Logo SOLVESPACE -- parametric 2d/3d CAD

(you are viewing a thread; or go back to list of threads)

Enhancement request: 2D DXF-Import (by Roland Frank)

Since DXF-Export is supported isn't there an easy way to support DXF-Import on active workplane as an unconstrained sketch ?
Or is this an issue of license fees ?

Thu Sep 26 2013, 01:54:23
(no subject) (by Jonathan Westhues)
Export filters are generally easier to write than import filters. An import filter needs to implement the complete standard, but an export filter needs only to implement the subset that you wish to use.

It would certainly be possible to implement that import feature, either from scratch (as I did partially in SketchFlat) or with libdxf or something. A typical DXF won't map very well to a sketch within SolveSpace, since it lacks parametric structure. That would still be a useful feature, though.
Thu Sep 26 2013, 02:14:04
STL import (by Jesper Lindeberg)
I think to two most usefull imports would be DXF and STL.

So big wote from me to support these.

Mon May 5 2014, 08:19:13
STL, STEP, DXF import (by Jesper Lindeberg)
Could you use something like this to make imports easy?
I really think more file import support would be great.

Wed Oct 8 2014, 07:10:31
(no subject) (by Jesper Lindeberg)
Wed Oct 8 2014, 07:11:29
2D dxf import (by Bep van Malde)
Hello Jonathan,

Thank you for this great program.
I use it alongside Sketchup, as it laks Paramertick modeling.
It would however be great if I could import a DXF file.


Bep van Malde
Wed Nov 5 2014, 16:52:01
(no subject) (by Stefan Nilsson )
Thank you for a great program.
I agree with the other users that some kind of import facility would be very apreciated. There are lots of models available, on the net and from manufacturers that facilitate the design process
Mon Jan 12 2015, 00:38:57
2D dxf import (by Dave)
what an excellent program!!! thankyou very much. totally awesome... well almost. if only it had 2d dxf import! is this likely to happen any time soon?

Also another feature would be great is the ability to create basic documentation & annotation of drawings / sketches..
Wed Mar 4 2015, 01:18:32
(no subject) (by whitequark)
I've pondered on DXF import (and also better DXF export; currently it is very annoying to edit the exported files, as they include a lot of exactly overlapping lines, not to mention lack styles and layers). I think it would be most convenient to use dxflib (not to be confused with libdxf) for this. I'm mainly interested in export but might take a look at import as well.
Sun Mar 22 2015, 16:35:30
(no subject) (by yugami)
I played around with DFXlib a tiny bit today. I think I need to understand the engine behind adding lines etc to move forward. I managed to get 4 lines to show up from importing 4 lines, they just don't look like they should.
Mon Mar 30 2015, 00:55:29
(no subject) (by yugami)
The more I play with this the more I don't understand how this is supposed to work. For a very very plain DXF (1 single drawing of a single item that works as a single extrude) it would be workable.

Anything of complexity does not map well as Johnathan stated.

I'm wondering if any of the people requesting this have example files that I can see showing what they would like to import.
Tue Mar 31 2015, 13:29:33
(no subject) (by whitequark)
I believe this is exactly the case the DXF import is supposed to solve. At least this is how I would use it.

I wonder whether it is wisest to import the DXF as a collection of requests and entities you can move, as opposed to like any other imported geometry. In the latter case you could change the DXF file and have the changes propagated, which sounds like a nice feature to me.
Wed Apr 1 2015, 08:16:30
sample dxf file to import (by Dave)
Hey yugami you asked for an example dxf file.
attached is a typical example of what i want to import.

As you will see its a very basic file with a handful of points.
it doesn't even matter if the text notations aren't imported - if its too difficult, i can modify the dxf with other software to remove the text so its just points!

All I would like to be able to do is:

1) open a dxf (like the one attached)
2) Edit the sketch, add lines / curves and constraints
3) export back to dxf

(i dont need to do any 3d modeling - just making good use of constraints)
Fri Apr 10 2015, 04:04:40, download attachment Sample file.DXF
(no subject) (by yugami)
Qcad only shows me a series of points. Is that what this file is?

If not, this doesn't bode well as its their library I was using to work on import.

I have line importing working. Though I don't see a way to make the scaling work. A 6" long piece I made in qcad came in at .8" or so. Though all the relations were correct so it was easy to scale back to size
Fri Apr 10 2015, 09:19:08
(no subject) (by Dave)
Yes the file is only a series of points from a site survey.
Wed Apr 15 2015, 01:44:34
(no subject) (by yugami)
OK Thanks, I started thinking that based on your #2 after I posted.

I'm tinkering with it in my freetime. So far the points are being triggered in the import for some reason, could be my fault.
Wed Apr 15 2015, 10:07:21
dxf import would be great ... (by Robert Yu)
I just started looking at solvespace and it looks very useful. I would be interested in being able to import from other formats like dxf, collada, or stl. Thank you.
Mon Jun 22 2015, 16:09:21
.slvs format? (by Robert Yu)
Is there a document defining the .slvs format? I am using sketchup and perhaps I can make it write out the .slvs format.
Thank you.
Mon Jun 22 2015, 16:16:18
.slvs is XML (by Roland Frank)
Hello Robert.

Try reading an slvs-file with an XML-Editor, for example
the XML Copy Editor.

What you can read there is nearly self-explanatory.

Tue Jun 23 2015, 14:07:12
(no subject) (by Jonathan Westhues)
The .slvs file format is plain text, and mostly self-explanatory if you're familiar with the program's internal data structures (like from sketch.h). It's not XML, though.
Tue Jun 23 2015, 16:11:37
dxf import (by Dave)
hey yugami, any luck with the dxf import?
Tue Sep 22 2015, 05:22:44
(no subject) (by yugami)
I didn't have much luck with the sample with dots. lines were working OK but I ran out of time to work on it. may have more after next week
Thu Sep 24 2015, 19:24:51
(no subject) (by Dave)
Hey yugami,
All I need is to be able to import dxf lines.. I'd love to try the version you created if you're sharing it? :)
Mon Jan 4 2016, 02:53:53
(no subject) (by yugami)
There's a little more to it (adding the menu item, and build system updates) but this is the bulk of the framework. Whitequark could probably get it integrated into his build pretty easy.

this uses dxflib.
Thu Jan 21 2016, 11:58:37, download attachment
(no subject) (by Dave)
that would be good if Whitequark could.... fingers crossed ;-)
Wed Jan 27 2016, 02:50:08
(no subject) (by whitequark)
@Dave, we use a different DXF library (libdxfrw, the one from LibreCAD), although it is not included in our main branch yet. Furthermore, it is not yet entirely clear to me whether importing DXF should link it to the sketch (like assembling does) or copy it to the sketch (like the proposed changes do).

Anyhow, I expect something like this will land soon.
Thu Jan 28 2016, 04:52:52
(no subject) (by yugami)
I think it would be a waste to not have it be directly editable after import. This will allow people with original DXF's to migrate away from them if they want to transition to solid modeling.

Simply linking in will ensure they are required to continue modeling in another tool.
Thu Jan 28 2016, 12:15:03
(no subject) (by whitequark)
> Simply linking in will ensure they are required to continue modeling in another tool.

That's kind of the point though. (And it's not "simple", implementing linking is much more effort...)

Bottom line is, I'm not sure what kind of workflow would people want, and whether linking is desired. I hardly ever have DXFs I would like to import myself.
Thu Jan 28 2016, 12:32:08
(no subject) (by yugami)
I don't think this is an either or scenario.

you can add import under file and if enough people want linking you can add that through the assembly interface.

I would go with the easiest first so theres some implementation and adapt later to other demands
Thu Feb 4 2016, 07:49:35
(no subject) (by James)
Any progress with the dxf import?
I would like to be able to insert existing 2d sketch blocks i have.
Thu Mar 31 2016, 04:49:16
(no subject) (by whitequark)
Not yet.
Sat Apr 2 2016, 05:57:28
Point import (by Chinmay)
I understand that DXF import is quite a task. Would it be easier to use a point import functionality as an intermediate step?
This would be similar to making a polyline or spline through points listed in a text file, say comma-delimited. The imported points would then need a "constrain where dragged" constraint tagged onto them.

Thank you for your work. Please don't let my suggestion derail your plan!
Fri Apr 8 2016, 13:51:17
(no subject) (by whitequark)
It's not that it is a very large task (it's fairly simple with the new DXF library), it's mostly that I haven't really scheduled it yet. Now I did:
Sun Apr 10 2016, 03:29:09
(no subject) (by whitequark)
Now implemented.
Sat May 7 2016, 00:42:46
(no subject) (by James)
How can I try it? will you release an .exe file?
Mon May 9 2016, 20:47:13
(no subject) (by whitequark)
Wed May 11 2016, 04:08:13
(no subject) (by Bep van Malde)
Thanks for making import op dxf and dwg files possible.
Mon May 23 2016, 07:46:26
import from Openscad (by nerosan)
openscad is very useful to manage functions.
It just exports in 3d STL files.
Is it possible to have an import from openscad files, or from STL as alternative, functionality?
Mon Aug 21 2017, 09:19:18
(no subject) (by whitequark)
@nerosan, this is not currently possible or planned.
Thu Aug 31 2017, 05:30:06
Line segment closed path exported from Illustrator comes in as a cubic bezier (by quaestor)
OSX Sierra, SolveSpace 2.3.
FIle attached.
I have a dead-simple DXF exported from Illustrator CC (actually tried a DWG as well), just a single closed path made up of (15, actually) straight segments, completely clean (no stray points etc.). All I get when I import it is a single cubic bezier curve.
I can "round-trip" it out of and then into Illustrator with no problem.
Mon Nov 6 2017, 14:23:55, download attachment big cheek.dxf
(no subject) (by SevDev)
Sorry for digging up this old thread, but it seems to be the best place.
I also had problems with importing dxf files into Solvespace 2.3 on a Raspi3. However, I think most people want that bc there's no import for stl files and so we're trying to get dxf i to it. I learned that programs to deal with mesh files are mesh editors, and I'm using Wing3d for some use cases now. I also read FreeCAD can import stl files and such, but didn't try.
Then again, there might be some use cases where I have a stl file and like to edit it in Solvespace. Let's just think about how to do that, and not about dxf import. If I could take a 2D slice out of a mesh file and import that somehow into Solvespace, it might help in many cases. Let say I have a bionic looking upper arm in stl with a connection to the shoulder or lower arm, and I would like to change the connector. I might cut it out in a mesh editor and just need to import the measurements of the connecting surface into Solvespace. If that would be possible easily, this would help a lot. In my example it might be a simple surface, but could be something complex. A variant of that would be the option of using a (svg?) picture as background in Solvespace's 2D modus, if I wanted to design something in relation to a mesh object.
I don't know if some of this is already possible, since I looked into how to import files before learning a lot about the program. I'm trying to find my workflow. If it isn't possible to import such connecting surfaces, I hope this will be some inspiration. I'm quite sure background images as pattern can't be used, yet. Of course Solvespace is already great, I'm going to use it to get into CAD anyways.
Thu Aug 20 2020, 01:43:25
(no subject) (by Garchomp)
Both QCAD and libreCAD are free 2d CAD software support DXF-Export.
there are some other freely available CAD software packages (mostly for non-commercial use) that might meet your needs better: Fusion360, OnShape, TinkerCAD.
more details here:
Tue Nov 22 2022, 04:17:40
Post a reply to this comment:
Your Name:
Your Email:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):
© 2008-2022 SolveSpace contributors. Most recent update June 2 2022.