[OpenSCAD] import() .dxf image format to OpenSCAD

Mark Schafer mschafer at wireframe.biz
Mon Apr 16 18:25:12 EDT 2018


Its a bit of a redo for you but can I suggest this process instead:
- Download Inkscape (OS vector draw program) (now on 0.92)
- go here and get the openSCAD extension and install as directed:
    - https://www.thingiverse.com/thing:1065500
- dragNdrop your image onto the canvas - select it and
- use the Trace Bitmap tool under the Path menu to make a 2D shape from it.
- select that shape and use the extension under:
   - Extensions/Generate from Paths/ Paths to openSCAD
to export it to a scad file.
Edit the scad file to change the height...

Cheers...


On 4/17/2018 10:05 AM, Still_learning wrote:
> I am running OpenSCAD version 2017.01.20 on a Windows 7 laptop
> that is current on updates.
>
> I am attempting to get a 2D image converted into a 3D extrusion
> so that I may subtract it from a cube() face.
>
> To that end I downloaded an open source .png of the image I am
> want to use.  Converted that image in into paths using GIMP 2.8.8
> and exported it to an .svg file.
>
> Opened the .svg file in LibreCAD (looked good and right) and exported
> it as a .dxf file.
>
> I am trying to get the .dxf file recognized and displayed by OpenSCAD
> but keep drawing a blank screen, even though following a preview
> command or file save, the console tells me I have created an object
> with 8 geometries and 592 bytes in one normalized CSG tree.
>
> No error messages are generated when previewed or saved.
>
> So, apparently "Something" is being recognized, but the final result
> is not being displayed.
>
> Nothing appears to want to display because the display progress indicator
> is not activated.  Calculation time is 0 and 0.
>
> Since I am not running Linux, Inkscape does not seem a particularly good
> option.
>
> code used is:
>
> 	linear_extrude(height = 2, center = true, convexity = 10)
>          translate([0,0,0])
> 	import(file = "image-foo.dxf");
>
> File also previously referenced in "use <image-foo.dxf>" statement
> earlier in commands file.  File resides among .scad files in same dir.
>
> Thoughts on why this might not be working are appreciated.
>
> Recommendations for how to make it work are appreciated more so.
>
> SJ
>
>
>
> -----
> The more I learn, the more I get curious about.
> --
> Sent from: http://forum.openscad.org/
>
> _______________________________________________
> OpenSCAD mailing list
> Discuss at lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>




More information about the Discuss mailing list