Engraving SVG logo
by dezzi ·
This works perfectly well with proper SVGs - clean, smaller ones. Just paste SVG as text into chatbox. Not every SVG is good. Be careful with bad or just complex ones, these might require additional cleanup and processing!
Interactive Preview & Customizer
3D STL viewer with browser-based OpenSCAD rendering on parameter changes.
Loading preview...
Parameters
step 0.5
step 0.1
step 0.1
step 0.1
step 0.1
WASM compiler loads on first parameter change.
Prompt
create a 100mm diameter, 10mm thick rectangle, extrude this logo on it (logo should take approx 50% of plane dimensions):
====
<svg viewBox="-7 -7 750 862" role="img" aria-label="ModelRift logo"> <title>ModelRift logo</title> <g stroke="currentColor" stroke-width="14" stroke-linecap="round" stroke-linejoin="round"> <line x1="366" y1="1" x2="2" y2="210"></line> <line x1="2" y1="210" x2="1" y2="637"></line> <line x1="1" y1="637" x2="371" y2="847"></line> <line x1="371" y1="847" x2="734" y2="637"></line> <line x1="734" y1="637" x2="735" y2="212"></line> <line x1="735" y1="212" x2="366" y2="1"></line> <line x1="366" y1="1" x2="367.6" y2="157.6"></line> <line x1="2" y1="210" x2="367.6" y2="157.6"></line> <line x1="367.6" y1="157.6" x2="735" y2="212"></line> <line x1="2" y1="210" x2="143.7" y2="547"></line> <line x1="1" y1="637" x2="143.7" y2="547"></line> <line x1="735" y1="212" x2="591.0" y2="547"></line> <line x1="734" y1="637" x2="591.0" y2="547"></line> <line x1="367.6" y1="157.6" x2="143.7" y2="547"></line> <line x1="367.6" y1="157.6" x2="591.0" y2="547"></line> <line x1="143.7" y1="547" x2="591.0" y2="547"></line> <line x1="143.7" y1="547" x2="371" y2="847"></line> <line x1="591.0" y1="547" x2="371" y2="847"></line> <line x1="143.7" y1="547" x2="269.3" y2="326.2"></line> <line x1="269.3" y1="326.2" x2="366.5" y2="547"></line> <line x1="366.5" y1="547" x2="462.2" y2="323.2"></line> <line x1="462.2" y1="323.2" x2="591.0" y2="547"></line> <line x1="269.3" y1="547" x2="269.3" y2="326.2"></line> <line x1="462.2" y1="547" x2="462.2" y2="323.2"></line> </g> </svg>
OpenSCAD Code
// ModelRift Engraved Logo Plate
// Parameters
base_size = 100; // 100mm square
base_thickness = 10; // 10mm thick
engrave_depth = 2; // Depth of the engraving (4mm)
line_width = 1.5; // Thickness of the logo lines
logo_scale = 0.06; // Scaled to fit ~50% of the 100mm base
// Centering offset for the logo based on SVG viewbox (approx 735x847)
logo_offset_x = -367 * logo_scale;
logo_offset_y = 423 * logo_scale;
module line_segment(p1, p2, weight) {
hull() {
translate(p1) circle(d = weight, $fn=12);
translate(p2) circle(d = weight, $fn=12);
}
}
module modelrift_logo(weight) {
// Array of [x1, y1, x2, y2] from SVG lines
segments = [
[366, 1, 2, 210], [2, 210, 1, 637], [1, 637, 371, 847],
[371, 847, 734, 637], [734, 637, 735, 212], [735, 212, 366, 1],
[366, 1, 367.6, 157.6], [2, 210, 367.6, 157.6], [367.6, 157.6, 735, 212],
[2, 210, 143.7, 547], [1, 637, 143.7, 547], [735, 212, 591.0, 547],
[734, 637, 591.0, 547], [367.6, 157.6, 143.7, 547], [367.6, 157.6, 591.0, 547],
[143.7, 547, 591.0, 547], [143.7, 547, 371, 847], [591.0, 547, 371, 847],
[143.7, 547, 269.3, 326.2], [269.3, 326.2, 366.5, 547],
[366.5, 547, 462.2, 323.2], [462.2, 323.2, 591.0, 547],
[269.3, 547, 269.3, 326.2], [462.2, 547, 462.2, 323.2]
];
for (s = segments) {
line_segment([s[0], -s[1]], [s[2], -s[3]], weight/logo_scale);
}
}
// Construction
difference() {
// The Base Plate
color("DimGray")
translate([0, 0, base_thickness/2])
cube([base_size, base_size, base_thickness], center = true);
// The Engraving Cutter
// Positioned at the top surface, extending 'engrave_depth' down
// We add 0.1mm to the top to ensure a clean boolean cut
translate([logo_offset_x, logo_offset_y, base_thickness - engrave_depth])
linear_extrude(height = engrave_depth + 0.1)
scale([logo_scale, logo_scale, 1])
modelrift_logo(line_width);
}