Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// Module names are of the form poly_<inkscape-path-id>(). As a result,
// you can associate a polygon in this OpenSCAD program with the corresponding
// SVG element in the Inkscape document by looking for the XML element with
// the attribute id="inkscape-path-id".
// fudge value is used to ensure that subtracted solids are a tad taller
// in the z dimension than the polygon being subtracted from. This helps
// keep the resulting .stl file manifold.
fudge = 0.4;
module poly_path1948(h)
{
scale([25.4/90, -25.4/90, 1]) union()
{
difference()
{
linear_extrude(height=h)
polygon([[-0.661881,-56.192294],[-7.342665,-55.893006],[-13.474381,-55.098544],[-17.308036,-54.241509],[-20.355792,-53.163231],[-22.702332,-51.847880],[-24.432337,-50.279629],[-25.630487,-48.442648],[-26.381466,-46.321109],[-26.769953,-43.899184],[-26.880631,-41.161043],[-26.880631,-27.536043],[-36.943131,-27.536043],[-39.812608,-27.317388],[-42.547634,-26.664993],[-45.104617,-25.584221],[-47.439963,-24.080431],[-49.510080,-22.158983],[-51.271375,-19.825237],[-52.680257,-17.084554],[-53.693131,-13.942293],[-55.093260,-6.875508],[-55.580444,-0.486423],[-55.123972,5.987227],[-53.693131,13.307707],[-52.853229,16.170845],[-51.758319,18.780511],[-50.401428,21.097167],[-48.775579,23.081275],[-46.873800,24.693297],[-44.689115,25.893693],[-42.214550,26.642925],[-39.443131,26.901457],[-30.224381,26.901457],[-30.224381,14.651457],[-29.877604,11.394869],[-28.885876,8.315365],[-27.322107,5.492198],[-25.259202,3.004619],[-22.770070,0.931879],[-19.927617,-0.646771],[-16.804752,-1.652079],[-13.474381,-2.004793],[13.306869,-2.004793],[16.023305,-2.283165],[18.546653,-3.080863],[20.824793,-4.341761],[22.805602,-6.009730],[24.436960,-8.028645],[25.666746,-10.342378],[26.442840,-12.894803],[26.713119,-15.629793],[26.713119,-41.161043],[26.435510,-43.796414],[25.641618,-46.233725],[24.389846,-48.444410],[22.738595,-50.399900],[20.746270,-52.071626],[18.471272,-53.431021],[15.972004,-54.449516],[13.306869,-55.098544],[6.314119,-55.940927],[-0.661881,-56.192294]]);
}
}
}
module half_python(h) {
difference() {
translate([-(h * 4), -11, 0]) cube(size = [32, 32, 7]);
translate([0, 0, 2.1]) poly_path1948(5);
}
translate([-4, 12, 0]) {
cylinder(4, 0.75, 0.75, $fn=100);
}
translate([-8, 7.78, 1]) {
cube([7, 0.8, 4]);
}
}
half_python(5);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment