明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1296|回复: 1

[几何] BoundaryRepresentation怎么获取边界

[复制链接]
发表于 2016-7-29 22:41 | 显示全部楼层 |阅读模式
  1.                 ObjectId[] ids = new ObjectId[] { solid.ObjectId };
  2.                 SubentityId subentId = new SubentityId();
  3.                 FullSubentityPath path = new FullSubentityPath(ids, subentId);
  4.                 List<SubentityId> edgePath = new List<SubentityId>();
  5.                 using (Brep brep = new Brep(path))
  6.                 {
  7.                     foreach (Edge edge in brep.Edges)
  8.                     {
  9.                         edgePath.Add(edge.SubentityPath.SubentId);
  10.                     }
  11.                     
  12.                 }
  13.                 for (int i = 1; i < edgePath.Count; i++)
  14.                 {
  15.                     Autodesk.AutoCAD.Colors.Color col = Autodesk.AutoCAD.Colors.Color.FromColorIndex(Autodesk.AutoCAD.Colors.ColorMethod.ByColor, (short)i);
  16.                     solid.SetSubentityColor(edgePath, col);
  17.                 }

根据教程上的,倒是能给边界改颜色了,怎么能获取边界的类型,是直线还是曲线,然后创建实体呢?
 楼主| 发表于 2016-7-29 23:00 | 显示全部楼层
本帖最后由 taocitc 于 2016-7-29 23:06 编辑

好像可以了,用CopyEdge就行
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-4-16 17:49 , Processed in 0.199532 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表