![]() For that reason I avoid this format as much as possible.īTW I was really impressed by that Inkscape trace bitmap function, which I tried for the first time. DXF is a closed-source, proprietary and undocumented format after R2000, which is why support on open source software is lacking. The nice thing with FreeCAD is it has good support for SVG now so the DXF conversion from Inkscape is unnecessary. Also if you ever want to have it laser cut in another material (steel, aluminum.) it won't look good. ![]() Granted it might not matter for 3D printing but I'm kind of a purist. Inkscape can convert those spline curves to line segments.Įxcept you loose much quality when converting from spline curves to line segments. It may sound tedious but it took me all of 5 minutes tops. When I finally got the whole face cut with all the holes, I extruded it with the Part Extrude tool. For that I used the Draft Downgrade tool, one at a time. Then I had to cut the larger face of the hotrod with all the other faces. To extrude this I needed to convert all the paths to faces using the Draft Upgrade tool. I was left with a series of paths which represent all the closed outlines making the hotrod. I got the large rectangle again and deleted it. So in FreeCAD I opened the SVG and got a series of "path" objects. The DXF was a no-go in FreeCAD because it is made out of spline curves and the DXF importer does not support splines. I use FreeCAD which has a complete GUI my non-programmer brain can understand. I do not use OpenSCAD as my brain is not wired for it. Then I selected the hotod and hit Ctrl+Shift_F to get the Fill and Stroke dialog in the Fill tab, I clicked on "no paint" to get rid of the black filling, then in the Stroke paint tab, I clicked on "Flat color" to show the outline. I got two objects, the filled black hotrod, and a white rectangle (when I hovered over it I could only see the selection rectangle). I right-clicked on it and chose "Ungroup". First I deleted the bitmap image and kept only the generated vector object. But some processing was required afterward. What worked best was Multiple scans/2 passes, in Greys (see capture). In the Trace Bitmap parameters, Brightness cutoff didn't work well, and Edge detection seemed to, but produced a double outline rather than a single one. I saved one jpeg with a filled hotrod, and one with an outline-only hotrod. I just tried with your hotrod image (cool shape by the way!) and it seems to work pretty well.įirst thing is to edit your jpeg first, crop it in your image editor (Gimp, Photoshop.) to keep only one shape, as your jpeg has 5 of them. See the Inkscape wiki page on how to do that: A raster (or bitmap) image such as JPEG cannot simply be imported into Inkscape and exported to DXF, it won't work, as it will still be a raster image. Sorry this isn't a one-size-fits-all answer - but hopefully it will give you some things to try.You are aware that DXF is a vector format? Meaning it consists of curves and/or lines. Gs -sDEVICE=png16m -dNOPAUSE -dBATCH -dSAFER -sOutputFile=jcsample.png jcsample-crop.pdf pdf libreoffice -headless -convert-to pdf jcsample.dxf However on the same sample file, the resulting images were scaled to fit centrally in a portrait page again, the solution may be to use an intermediate vector format e.g. Libreoffice -headless -convert-to jpg jcsample.dxf Libreoffice appears to work directly to either png or jpg libreoffice -headless -convert-to png jcsample.dxf The downside with inkscape is that the dxf import filter pops up a dialog to confirm the default scaling and encoding, making it not truly non-interactive: as far as I know there is not currently a way to prevent that, although there is an outstanding feature request for it (adding the -z or -without-gui switch doesn't seem to help). Or gs -sDEVICE=jpeg -dJPEGQ=100 -dNOPAUSE -dBATCH -dSAFER -r100 -sOutputFile=jcsample.jpg jcsample.eps What did work for inkscape was converting to Encapsulated PostScript first inkscape -f jcsample.dxf -export-eps=jcsample.epsĪnd then converting eps to png or jpeg, for example using Ghostscript gs -sDEVICE=png16m -dNOPAUSE -dBATCH -dSAFER -sOutputFile=jcsample.png jcsample.eps inkscape -f jcsample.dxf -export-png=jcsample.png Inkscape also appears to support the same functionality e.g. However the result was an empty file in the first case and corrupted in the second, on the sample file that I tried - you may have better luck. Or, with explicit output dimensions, dia jcsample.dxf -s 744x1052 -e jcsample.png There are a number of vector drawing programs that support DXF files to varying degrees, and have commandline convert capabilities, including dia, inkscape, and even libreoffice.ĭia appears to support dxf input and png output e.g.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |