- UID
- 658062
- 积分
- 2147
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2008-10-22
- 最后登录
- 1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
本帖最后由 csharp 于 2014-7-23 21:08 编辑
[LispFunction("Points_Box")]
public static ResultBuffer GetPointsBox(ResultBuffer rb)
{
TypedValue[] values = rb.AsArray();
Extents3d ext = new Extents3d();
for (int i = 1; i < values.Length - 1; i++)
{
ext.AddPoint((Point3d)values[i].Value);
}
Point3d p1 = ext.MinPoint;
Point3d p2 = ext.MaxPoint;
TypedValue[] val = new TypedValue[6];
val[0] = new TypedValue((int)LispDataType.ListBegin);
val[1] = new TypedValue((int)LispDataType.Point3d, p1);
val[2] = new TypedValue((int)LispDataType.Point3d, new Point3d(p2.X, p1.Y, p1.Z));
val[3] = new TypedValue((int)LispDataType.Point3d, p2);
val[4] = new TypedValue((int)LispDataType.Point3d, new Point3d(p1.X, p2.Y, p2.Z));
val[5] = new TypedValue((int)LispDataType.ListEnd);
return new ResultBuffer(val);
和 (apply 'mapcar (cons 'min pts)) 对比
命令: TT
选择对象: 指定对角点: 找到 119700 个
选择对象:
((-41231.6 -30413.4 0.0) (77723.2 -30413.4 0.0) (77723.2 83616.3 0.0) (-41231.6 83616.3 0.0))
0.057
((-41231.6 -30413.4 0.0) (77723.2 -30413.4 0.0) (77723.2 83616.3 0.0) (-41231.6 83616.3 0.0))
0.114 |
|