View Single Post
Old 08-12-2015, 03:30 PM   #29 (permalink)
Cycle
EcoModding Lurker
 
Join Date: Mar 2015
Location: California
Posts: 92
Thanks: 10
Thanked 19 Times in 17 Posts
My first polyhedron!

Code:
polyhedron(points =[[0,0,0],[0,10,0],[20,0,10],[20,10,10],[20,0,20],[20,10,20],[0,0,40],[0,10,40]], faces=[[0,4,2],[0,6,4],[1,3,5],[1,5,7],[0,7,6],[0,1,7],[0,3,1],[0,2,3],[2,4,5],[2,5,3],[4,6,7],[4,7,5]]);
In OpenSCAD, if you go to the 'View' menu and select 'Thrown Together', then click the 'Preview' button on the toolbar, any badly oriented polygons in the faces will be highlighted. It helps to draw on paper the shape you want, then label each corner, starting with zero. That makes it easy to order the face polygons such that the vertex ordering is correct.

Using this technique, I can create the odd shape I need for the frame gussets... imagine looking at a triangle with one corner lopped off flat. That creates a small space between the gusset and the tube joint. That way you're not welding all the way into the corner where the joint is, which is difficult to do and doesn't do much to transmit the stress in the frame anyway.
  Reply With Quote