首先,很开心的告诉大家,E拓参数化板块有自己的独立域名啦!以后大家可以输入csh.eeeetop.com即可访问参数化板块。
大家没有发现参数化板块的UI比主页要简洁一些了吗?UI会慢慢进行更加简洁化设计,有好的建议的朋友,
有喜欢学习参数化知识的朋友,欢迎加群83296128一起讨论。备注E拓即可。
原帖内容由微信公众账号【SecondEffectGroup】 【江河梦】小组发布,由【DanielJin】获得授权,进行重新整理和编辑后发布。转载请保留此行信息。欢迎大家下载由【Second Effect Group】出品的gh插件seg,其在幕墙行业,数据存储,曲线等分,数据优化等方面具有非常大的用途,并提供中文版支持。插件将不断更新,更新日志将会在本论坛同步推出。下载地址:http://www.food4rhino.com/project/segghcommon
感谢各位关注。新加入成员可以查看之前的帖子教程。由于用户基础不一,我们要由浅入深,先讲基础操作,再讲工程实例,再到深入GHA开发,以及各种复杂算法。期间可能会穿插着来讲。 今天我们介绍一点简单的代码。 四种方法是用vb脚本创建一条直线。 1, Public Sub New(x0 As Double, y0 As Double, z0 As Double, x1 As Double, y1 As Double, z1 As Double)
Rhino.Geometry.Line 的成员
摘要:
Constructs a new line segment between two points. 参数:
x0: The X coordinate of the first point.
y0: The Y coordinate of the first point.
z0: The Z coordinate of the first point.
x1: The X coordinate of the second point.
y1: The Y coordinate of the second point.
z1: The Z coordinate of the second point.
2, Public Sub New(from As Rhino.Geometry.Point3d, to As Rhino.Geometry.Point3d)
Rhino.Geometry.Line 的成员
摘要:
Constructs a new line segment between two points. 参数:
from: Start point of line.
to: End point of line. 3, Public Sub New(start As Rhino.Geometry.Point3d, span As Rhino.Geometry.Vector3d)
Rhino.Geometry.Line 的成员
摘要:
Constructs a new line segment from start point and span vector. 参数:
start: Start point of line segment.
span: Direction and length of line segment. 4, Public Sub New(start As Rhino.Geometry.Point3d, direction As Rhino.Geometry.Vector3d, length As Double)
Rhino.Geometry.Line 的成员
摘要:
Constructs a new line segment from start point, direction and length. 参数:
start: Start point of line segment.
direction: Direction of line segment.
length: Length of line segment.
我们编写如下代码: Private Sub RunScript(ByVal x As Object, ByVal y As Object, ByRef A As Object)
a = New line(New point3d(0, 0, 0), New point3d(1, 1, 1))
a = New line(New point3d(0, 0, 0), New vector3d(1, 1, 1))
a = New line(New point3d(0, 0, 0), New vector3d(1, 1, 1), 2)
a = New line(0, 0, 0, 1, 1, 1)
End Sub 上面我们对a进行了四次赋值,肯定是最后一次的值为a的值。如果我们想输出四条直线,要么增加三个输出端参数,要么使用一个列表存储四条直线,再将列表赋值给a。 我们的点也可以是由输入端输入,注意将x,y设置成item,Point3d Private Sub RunScript(ByVal x As Point3d, ByVal y As Point3d, ByRef A As Object)
Dim Myline1 As New Line(x, y)
a = Myline1
End Sub
OK今天就讲到这里,明天将继续基础篇操作。
|