讨论 --- 请教一下 这种表皮怎么做?

[复制链接]
跳转到指定楼层
36791 qiancy88 发表于 2009-3-7 20:26:59 楼主
[img=http://2.bp.blogspot.com/_zs4s_2i1_O8/SawFIcEOOcI/AAAAAAAACVw/VD5auDDqxWE/s1600/lasercut02.jpg][lasercut02.jpg][/img]

在这个blog:freeformfever.blogspot.com上看到的 他能让网架沿垂直于曲面的方向延伸,求解怎样用grasshopper实现这种效果。作者是这样说的:
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



作者称他是用一段c++代码实现的。这篇文章没有放源文件的下载链接,我在别的文章中找到一个链接,下载下来后效果与此有些类似。我在gh文件中就找到一个c++组件,代码如下


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
}



有点看不太懂,而且我自己也不会写c++代码,大家来研究一下怎么用gh实现吧……


附上:
   原文地址: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

[ 本帖最后由 qiancy88 于 2009-3-7 20:29 编辑 ]
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享分享
关于大陆地区Rhino原厂培训中心
saintsc 发表于 2009-3-12 22:20:26
2
顶一下。谢谢!
您需要登录后才可以回帖 登录 | 注册成为会员

本版积分规则