# OpenSCAD linear_extrude from multiple path svg import

In OpenSCAD, I am trying to make a linear_extrude on a shape imported from an svg. The svg file contains multiple path. I would like to scale each path separately. I have tried the following code, but the whole import is considered a single shape resulting in the image below.

linear_extrude(height = 5, center = true, scale=1.2)
import(file = "xxx.svg", center = true, dpi = 96);


How can I have each of the letters to have 'its own pyramid' ?

I know I could create one SVG per letter. But for simplicity sake I would like to have only one SVG file, as I want to create much more complex motives in the future. My final goal is to create stamps from SVG drawings.

Edit: Alternative tried after Mick's comment (same result):

module pyramidChildren(height){
for ( i= [0:1:\$children-1])
linear_extrude(height = height, scale=1.5)
children(i);
}

pyramidChildren(5)
import(file = "xxx.svg", center = true, dpi = 96);


I have tried to use the basic svg (multiple paths) and also to group each path (with only itself) without changes in the result.

• Have you tried using children() on the object? This should allow you to manipulate each letter separately. – Mick Dec 28 '20 at 13:22
• Thanks @Mick I didn't know about children(). I tried this after your comment, but it did not change the outcome... – Oneira Dec 28 '20 at 17:54
• children doesn't help. The import is a single child node not a sequence of components from the SVG. – R.. GitHub STOP HELPING ICE Dec 30 '20 at 19:06

Lame solution: creating stepped pyramid with offset. I realized that scale will not worked for motives with holes inside. Offset seems then more appropriate than scale for my application (creation of stamps)

It takes ages to render, but it could be enough for simple patterns. Any better solution are still welcome...

module buildPyramidalExtrude(height,maxOffset,nSlices){
heightIncrement = height/nSlices;
offsetIncrement = maxOffset/(nSlices-1);
for(i=[1:nSlices])
linear_extrude(height=i*heightIncrement)
offset(r = maxOffset-(i-1)*offsetIncrement)
children();
}

buildPyramidalExtrude(4,2.5,20)
import(file = "Farm/cow.svg", center = true);


What you seem to want is not per-path scale but offset. This is an open PR in OpenSCAD and hopefully will be upstream soon.

• Looking forward to see it in upstream! – Oneira Dec 29 '20 at 18:42