DXF Import Not Working #55

Open
andrewjbarton opened this Issue Aug 18, 2012 · 7 comments

6 participants

@andrewjbarton

I was able to get basic linear_extrude example working, but as soon as I attempt to import a DXF file for extrusion I run into problems. I tried two approaches.

  1. linear_extrude(file = "path.dxf", height = 20);
    result:
    At line 7:Module linear_extrude gave the following warnings: unused arguments
    Nothing to render

  2. linear_extrude(height = 20) import("path.dxf");
    At line 7:module import is not in scope

Perhaps dxf import is not supported at this time. Is any other import format supported?

@colah
Owner

Sadly not. Import formats are something I really need to work on.

@andrewjbarton

Understood. ImplicitCAD looks great and is now part of my parametric modeling tool chest. The ability to create rounded extrusions of 2D objects is phenomenal. I look forward to import support but know you have lots to work on. Luckily, for OpenSCAD compatibility, there are not many formats to support. I believe just DXF for 2D path import and STL for 3D surface import (not that these are trivial). Good luck!

@colah
Owner

Understood. ImplicitCAD looks great and is now part of my parametric modeling tool chest. The ability to create rounded extrusions of 2D objects is phenomena

Thanks! :)

I look forward to import support but know you have lots to work on. Luckily, for OpenSCAD compatibility, there are not many formats to support. I believe just DXF for 2D path import and STL for 3D surface import (not that these are trivial).

Adding DXF support is really just a parsing issue at this point -- we can feed them into polygon. But parsing DXF is somewhat tricky. It's a fairly complicated format. On the other hand, STLs are pretty trivial to parse. But getting ImplicitCAD to support triangle mesh object descriptions would take some work...

Still, it will happen at some point!

@ArthurGibbs

Apart from Haskell, the lack of import is the only thing missing from this otherwise awesome functional 3D modelling tool.

@MarSik

DXF extrusion combined with the parametric twist and height is something that would make my life a lot easier as well.

@canadaduane

Yeah, I just came from OpenSCAD land trying to figure out why I can't import DXFs from Inkscape. It would be great if ImplicitCAD supported this :)

@wbrickner

I'm not good with Haskell - I'm a beginner.
I'm learning however.
Question:
What data really needs to be parsed from DXF or other formats?
Like, what data do you need to end up with in order to work with it inside ImplicitCAD?
I'd be interested in writing or collaborating on a library/class (or whatever) that was able to parse any given file format based on an installable extension. I hope what I'm saying is clear enough.
I'm imagining a parser that is modular. You would write a file which can be loaded by the library, which expresses how to convert some given file format into the one used by ImplicitCAD. That way there is no reason to hard code it, and the community can write the conversion modules instead of waiting, and hoping for a release that happens to support their filetype.

Please, let me know if you're interested in a collaboration!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment