|
|
> So I was hoping for a solution that would operate on mesh
// an object with 8 corners (clockwise front ABCD) (Clockwise rear EFGH)
#macro Free_Box(A B C D E F G H)
mesh {
triangle {A,B,C} //front
triangle {C,D A}
triangle {A,E,H} //left
triangle {A,D,H}
triangle {B,F,G} //right
triangle {B,C,G}
triangle {A,E,F} //top
triangle {A,B,F}
triangle {C,G,H} //bottom
triangle {C,D,H}
triangle {E,F,G} //back
triangle {G,H,E}
inside_vector <(A.x+G.x)/2,(A.y+G.y)/2,(A.z+G.z)/2>
}
#end
You might want to move the inside vector outside the box
to invert it, and it's up to you to keep the walls flat.
Post a reply to this message
|
|