This is my version of something i have seen on www.liftarchitects.com. In addition to their solution, i come up with the possibility to choose my own vector for loft-rulings. I use one C# script component for the separation of lofts, along with another which just lets me choose between three methods (see below) of providing a generic list of vectors defining the directions of rulings, before they are passed through the component based on the status of an integer-slider. I didn't find an easier way to do this, although the script itself is piece of cake ;)
rulings are parallel to global z-direction (developable)
an appropriate ruling-direction can be chosen explicitly (developable)
rulings are surface-normals. general ruled surfaces. (non-developable)
Note that the third variant, the one based on surface normals, consists of non-torsal ruled surfaces, which in general are non-developable, meaning that they cannot be projected to a plane without distortion, and one will get some irregularities when trying to produce the structure this way.
What i didn't add yet is a method for the production of vertical slots at intersections of struts, but since i am going to lasercut such a construction soon, i will have to add it within the next days. I'm also planning to add a fourth method which will average rulings for each loft individually. This could come in handy if the input-surface is not too twisted. Watch out for that.
Posted by Heinz Schmiedhofer at 09:00
class Grasshopper_Custom_Script
{
#region members
private MRhinoApp app;
private MRhinoDoc doc;
public System.Object A;
#endregion
void RunScript(List<On3dPoint> myPts, int Uval, int Vval)
{
// Segmentation of UV Vertices into Quad Mesh Faces
// Heinz Schmiedhofer / TU Vienna / 2009
List<OnMesh> qfaces = new List<OnMesh>();
int face_count = 1;
int vertex_count = 4;
bool bVertexNormals = false;
bool bTextureCoordinates = false;
int upts = Uval + 1;
int vpts = Vval + 1;
for(int x = 0; x < Uval; x++){
for(int y = 0; y < Vval; y++){
int q1 = x * vpts + y;
int q2 = x * vpts + y + vpts;
int q3 = q2 + 1;
int q4 = q1 + 1;
OnMesh mesh = new OnMesh(face_count, vertex_count, bVertexNormals, bTextureCoordinates);
mesh.SetVertex(0, myPts[q1]);
mesh.SetVertex(1, myPts[q2]);
mesh.SetVertex(2, myPts[q3]);
mesh.SetVertex(3, myPts[q4]);
mesh.SetQuad(0, 0, 1, 2, 3);
mesh.ComputeVertexNormals();
mesh.Compact();
qfaces.Add(mesh);
}
}
A = qfaces.ToArray();
}
#region "Additional methods and Type declarations"
#endregion
}
原文地址:http://freeformfever.blogspot.com/2009/03/ruled-surfaces-with-grasshopper-2.html
gh图:[img=http://3.bp.blogspot.com/_zs4s_2i1_O8/SawNQxfRW8I/AAAAAAAACWA/SYrqhDrRvlY/s1600/lasercut04.jpg][lasercut04.jpg][/img]
源文件下载地址:http://rapidshare.com/files/205248607/parametric_openings.zip
欢迎光临 Rhino(犀牛)中国技术支持与推广中心 (http://bbs.rhino3d.asia/) | Powered by Discuz! X3.2 |