[OpenSCAD] Minkowski difference shows up with F5 but not F6
NateTG
nate-openscadforum at pedantic.org
Tue Apr 17 00:46:44 EDT 2018
What are you trying to accomplish with the minkowski anyway?
Here's a "bigger hammer" approach to generating the shape. You might also
want to use str() to generate text1-text3.
<pre>
trayHeight = 1.4*25.4;
maxCutHeight = 0.4*25.4;
baseThickness = 2;
wallThickness = 2;
cornerRad = 2;
text1 = "1.4\"";
text2 = "Subtract 0.0\"";
text3 = "For 0 to 0.4\"";
textThickness = .6;
textHeight = 4;
topLength=5;
riserHeight = trayHeight-baseThickness;
baseLength = 2*riserHeight;
baseH=(baseLength/2+wallThickness)/sqrt(3);
baseL=(baseLength/2);
baseH=(baseLength/2+wallThickness)/sqrt(3);
baseL=(baseLength/2);
topH=(topLength/2+wallThickness)/sqrt(3);
topL=(topLength/2);
rWall=wallThickness/sqrt(3);
rot=[
[cos(120),sin(120),0],
[-sin(120), cos(120),0],
[0,0,1]
];
polyhedron(
points=[
[-baseL,-baseH,0],[baseL,-baseH,0],
[-baseL,-baseH,0]*rot,[baseL,-baseH,0]*rot,
[-baseL,-baseH,0]*rot*rot,[baseL,-baseH,0]*rot*rot,
[-baseL,-baseH,baseThickness],[baseL,-baseH,baseThickness],
[-baseL,-baseH,baseThickness]*rot,[baseL,-baseH,baseThickness]*rot,
[-baseL,-baseH,baseThickness]*rot*rot,[baseL,-baseH,baseThickness]*rot*rot,
[0,-rWall,baseThickness],[rWall*cos(30),rWall*sin(30),baseThickness],[rWall*cos(150),rWall*sin(150),baseThickness],
//15-20
[-topL,-topH,riserHeight],[topL,-topH,riserHeight],
[-topL,-topH,riserHeight]*rot,[topL,-topH,riserHeight]*rot,
[-topL,-topH,riserHeight]*rot*rot,[topL,-topH,riserHeight]*rot*rot,
//21-23
[0,-rWall,riserHeight],[rWall*cos(30),rWall*sin(30),riserHeight],[rWall*cos(150),rWall*sin(150),riserHeight],
],
faces=[
[0,1,2,3,4,5],
[1,0,6,7],[2,1,7,8],[3,2,8,9],[4,3,9,10],[5,4,10,11],[0,5,11,6],
[7,6,12],[9,8,13],[11,10,14],
[12,6,15,21],[7,12,21,16],[13,8,17,22],[9,13,22,18],[14,10,19,23],[11,14,23,20],
[6,11,20,15],[8,7,16,17],[10,9,18,19],
[20,23,19,18,22,17,16,21,15]
]
);
</pre>
--
Sent from: http://forum.openscad.org/
More information about the Discuss
mailing list