discuss@lists.openscad.org

OpenSCAD general discussion

View all threads

Re post 'SVG failure'

T
Terry
Thu, Jul 15, 2021 9:51 AM

The subject message was posted in the old forum on 13th July. Presumably
the OP is unaware of the current issues so I'll paste its text below for
wider visibility. Not sure of currently recommended method to ensure
khackbarth sees any answers though.

Terry


The raised shape in the following image is based on an SVG file:

When the model is rendered (on several computers) I see this:

Everything but the raised image is rendered.  Sometimes OpenSCAD will
just close.

http://forum.openscad.org/file/n33523/render.png

It appears that the failure is associated with the technique I use to
simulate a chamfer around the top edge of the shape:

http://forum.openscad.org/file/n33523/chamfer.png

I add a couple of "offset" layers to the top of the shape with this
code:
module graphic(){
if (path_and_filename != ""){
scale_factor = (graphic_scale_factor == 1) ? 0.122 :
0.036;

            translate([0,slide_Bliss_graphic_vertically,sd/2])
            scale([scale_factor,scale_factor,1])
            union(){
                    translate([0,0,-1])
                    linear_extrude(height=graphic_height+1)
                    offset(delta = 2)
                    import(file = path_and_filename,center=true);
                   
                    translate([0,0,graphic_height])
                    linear_extrude(height=.1)
                    offset(delta = 1)
                    import(file = path_and_filename,center=true);
                   
                    translate([0,0,graphic_height+.1])
                    linear_extrude(height=.1)
                    offset(delta = .005)
                    import(file = path_and_filename,center=true);
            }
    }

}

When 3D printed, this method is indistinguishable from a modeled
chamfer.

If I comment the last two chunks in the union(), the model renders
quickly and completely.  Note that I see the following in the console
window (on this machine - I can't remember if I saw something similar on
the other PCs):
console.pdf

Any thoughts on why this is occurring?  Any alternatives for chamfering
the top edge of a raised SVG image?

It seems to be a function of the size and complexity of the SVG file.  I
use PowerPoint to modify the original SVG file so that it will 3D print
well.  I didn't have any problem until a couple of weeks ago when
PowerPoint started producing SVG images that were huge and I needed to
scale them smaller in the code.
I use Office 360 so there may have been an update to PowerPoint's SVG
production at that time.  I've tried post processing the image with
Inkscape but the render still fails.

Thanks,
Ken

The subject message was posted in the old forum on 13th July. Presumably the OP is unaware of the current issues so I'll paste its text below for wider visibility. Not sure of currently recommended method to ensure khackbarth sees any answers though. Terry -------------------- The raised shape in the following image is based on an SVG file: When the model is rendered (on several computers) I see this: Everything but the raised image is rendered. Sometimes OpenSCAD will just close. http://forum.openscad.org/file/n33523/render.png It appears that the failure is associated with the technique I use to simulate a chamfer around the top edge of the shape: http://forum.openscad.org/file/n33523/chamfer.png I add a couple of "offset" layers to the top of the shape with this code: module graphic(){ if (path_and_filename != ""){ scale_factor = (graphic_scale_factor == 1) ? 0.122 : 0.036; translate([0,slide_Bliss_graphic_vertically,sd/2]) scale([scale_factor,scale_factor,1]) union(){ translate([0,0,-1]) linear_extrude(height=graphic_height+1) offset(delta = 2) import(file = path_and_filename,center=true); translate([0,0,graphic_height]) linear_extrude(height=.1) offset(delta = 1) import(file = path_and_filename,center=true); translate([0,0,graphic_height+.1]) linear_extrude(height=.1) offset(delta = .005) import(file = path_and_filename,center=true); } } } When 3D printed, this method is indistinguishable from a modeled chamfer. If I comment the last two chunks in the union(), the model renders quickly and completely. Note that I see the following in the console window (on this machine - I can't remember if I saw something similar on the other PCs): console.pdf Any thoughts on why this is occurring? Any alternatives for chamfering the top edge of a raised SVG image? It seems to be a function of the size and complexity of the SVG file. I use PowerPoint to modify the original SVG file so that it will 3D print well. I didn't have any problem until a couple of weeks ago when PowerPoint started producing SVG images that were huge and I needed to scale them smaller in the code. I use Office 360 so there may have been an update to PowerPoint's SVG production at that time. I've tried post processing the image with Inkscape but the render still fails. Thanks, Ken