当前位置: 首页 > news >正文

保险网站有哪些保险网站资源网站快速优化排名

保险网站有哪些保险网站,资源网站快速优化排名,深圳罗湖做网站公司,网站加载动画效果前言 Revit 有一套完整的几何造型能力,每一个体量都是一个GenericForm,这些体量可以通过拉伸、扫掠等创建。这个例子介绍如何将他们合并成一个体量。 内容 合并体量的关键接口: // Autodesk.Revit.DB.Document public GeomCombination Com…

前言

Revit 有一套完整的几何造型能力,每一个体量都是一个GenericForm,这些体量可以通过拉伸、扫掠等创建。这个例子介绍如何将他们合并成一个体量。

内容

在这里插入图片描述
合并体量的关键接口:

// Autodesk.Revit.DB.Document
public GeomCombination CombineElements(CombinableElementArray members);

可以合并的实体,相关类的集成体系:
在这里插入图片描述
如何通过UI创建各种类型的实体,可以参考 Revit 官方文档:创建实心形状

case 1:手动选中了一些元素

核心逻辑:

  1. 遍历所有选中元素
  2. 确保元素是GenericForm,且是实体solid
  3. 确保都是 CombinableElementGenericForm集成自CombinableElement,这步有点多余)
  4. 合并符合条件的元素: doc.Document.CombineElements(solids)

核心代码:

// 遍历所有选中元素
foreach (Autodesk.Revit.DB.ElementId elementId in doc.Selection.GetElementIds())
{Autodesk.Revit.DB.Element element = doc.Document.GetElement(elementId);// 确保元素是`GenericForm`,且是实体solidGenericForm gf = element as GenericForm;if (null != gf && !gf.IsSolid)continue;// 确保都是 `CombinableElement` (`GenericForm`集成自`CombinableElement`,这步有点多余)CombinableElement ce = element as CombinableElement;if (null != ce)solids.Append(ce);
}
// 合并符合条件的元素
doc.Document.CombineElements(solids);

case 2:没有选中,则处理整个文档

核心逻辑:

  1. 过滤出所有的GenericFormGeomCombination
  2. 遍历过滤元素
  3. 确保元素是GenericForm,且是实体solid
  4. 确保都是 CombinableElementGenericForm集成自CombinableElement,这步有点多余)
  5. 对有重叠的元素进行几何合并:JoinOverlapping,判断是否重叠的逻辑在 IsOverlapped

核心代码:

// 过滤出所有的`GenericForm`和`GeomCombination`
LogicalOrFilter filter = new LogicalOrFilter(new ElementClassFilter(typeof(GenericForm)), new ElementClassFilter(typeof(GeomCombination)));
// 遍历过滤元素
FilteredElementIterator itor = (new FilteredElementCollector(document)).WherePasses(filter).GetElementIterator();
itor.Reset();
while (itor.MoveNext()){// 确保元素是`GenericForm`,且是实体solidGenericForm gf = itor.Current as GenericForm;if (null != gf && !gf.IsSolid)continue;// 确保都是 `CombinableElement` (`GenericForm`集成自`CombinableElement`,这步有点多余)CombinableElement ce = itor.Current as CombinableElement;if (null == ce)continue;m_elements.Add(ce);
}
// 对有重叠的元素进行几何合并
GeomCombination geomCombination = JoinOverlapping(m_elements, document);

JoinOverlapping 的核心逻辑在于判断是否重叠的逻辑, IsOverlapped

  1. 获取元素几何,GeometryElement get_Geometry(Options options)
  2. 获取GeometryObject所有Face
    类型是 Solid,通过接口 solid.Faces
    类型是 GeometryElement, 通过 GetEnumerator 接口递归调用
  3. 获取所有的线 GetAllCurves
    首先获取所有的 Face,通过 face.EdgeLoops 获取线的几何信息
  4. 判断线和面是否相交

部分核心代码:

// 获取元素几何
Options geOptions = Command.s_appCreation.NewGeometryOptions();
elementA.get_Geometry(geOptions);// 获取所有的 Face,需要递归调用
private static void GetAllFaces(GeometryElement geoElement, List<Face> faces){IEnumerator<GeometryObject> Objects = geoElement.GetEnumerator();while (Objects.MoveNext()){GeometryObject geObject = Objects.Current;GetAllFaces(geObject, faces);}
}
private static void GetAllFaces(Solid solid, List<Face> faces){foreach (Face face in solid.Faces){faces.Add(face);}
}
private static void GetAllFaces(GeometryObject geometry, List<Face> faces){if (geometry is GeometryElement){GetAllFaces(geometry as GeometryElement, faces);return;
}if (geometry is Solid){GetAllFaces(geometry as Solid, faces);return;}
}// 获取所有的 curve,类似,省略

其它

这个 sample 代码质量有些混乱,需自行整理分析。


文章转载自:
http://wanjiahusband.xhqr.cn
http://wanjiapectinaceous.xhqr.cn
http://wanjiapostural.xhqr.cn
http://wanjiapoisonous.xhqr.cn
http://wanjiaproceleusmatic.xhqr.cn
http://wanjiagravel.xhqr.cn
http://wanjiajuggle.xhqr.cn
http://wanjiaapiculate.xhqr.cn
http://wanjiabroche.xhqr.cn
http://wanjiahac.xhqr.cn
http://wanjiabehove.xhqr.cn
http://wanjiafathometer.xhqr.cn
http://wanjiamidian.xhqr.cn
http://wanjiapaleomagnetism.xhqr.cn
http://wanjiaoutran.xhqr.cn
http://wanjiamaui.xhqr.cn
http://wanjiaantipsychotic.xhqr.cn
http://wanjiasexcapade.xhqr.cn
http://wanjiaanticipant.xhqr.cn
http://wanjialentitude.xhqr.cn
http://wanjiatidal.xhqr.cn
http://wanjiafoliiform.xhqr.cn
http://wanjiacorniced.xhqr.cn
http://wanjiaaiblins.xhqr.cn
http://wanjiahetero.xhqr.cn
http://wanjiadoctrinarian.xhqr.cn
http://wanjiaesemplastic.xhqr.cn
http://wanjiaencina.xhqr.cn
http://wanjiaeai.xhqr.cn
http://wanjiajesuitical.xhqr.cn
http://wanjiaskoplje.xhqr.cn
http://wanjiawidowly.xhqr.cn
http://wanjiaprecensor.xhqr.cn
http://wanjiamethodize.xhqr.cn
http://wanjiasideways.xhqr.cn
http://wanjiatideland.xhqr.cn
http://wanjiacyrenaicism.xhqr.cn
http://wanjiadekameter.xhqr.cn
http://wanjiaorchidaceous.xhqr.cn
http://wanjialighthouseman.xhqr.cn
http://wanjiaperistalith.xhqr.cn
http://wanjiapillory.xhqr.cn
http://wanjiamonocarp.xhqr.cn
http://wanjiatetrameter.xhqr.cn
http://wanjiacompressive.xhqr.cn
http://wanjiasidefoot.xhqr.cn
http://wanjiamunchausen.xhqr.cn
http://wanjiacsb.xhqr.cn
http://wanjiahalbert.xhqr.cn
http://wanjiamilkweed.xhqr.cn
http://wanjiachickadee.xhqr.cn
http://wanjiaparisian.xhqr.cn
http://wanjiacenter.xhqr.cn
http://wanjiaoutflank.xhqr.cn
http://wanjianameplate.xhqr.cn
http://wanjiastanniferous.xhqr.cn
http://wanjiaidiotype.xhqr.cn
http://wanjiagangland.xhqr.cn
http://wanjiaunifier.xhqr.cn
http://wanjiaeuthermic.xhqr.cn
http://wanjiaexhilarant.xhqr.cn
http://wanjiaspiculate.xhqr.cn
http://wanjiacivilizable.xhqr.cn
http://wanjiakeek.xhqr.cn
http://wanjiachocolate.xhqr.cn
http://wanjiafirebomb.xhqr.cn
http://wanjialifeman.xhqr.cn
http://wanjiaprofess.xhqr.cn
http://wanjiamealymouthed.xhqr.cn
http://wanjiaindulge.xhqr.cn
http://wanjiabah.xhqr.cn
http://wanjiapaygrade.xhqr.cn
http://wanjialakeside.xhqr.cn
http://wanjiapierrot.xhqr.cn
http://wanjiacatgut.xhqr.cn
http://wanjiafuniculus.xhqr.cn
http://wanjiacitral.xhqr.cn
http://wanjiapredigestion.xhqr.cn
http://wanjiacomatose.xhqr.cn
http://wanjiaeavesdrop.xhqr.cn
http://www.15wanjia.com/news/112809.html

相关文章:

  • 扬州企业网站建设免费论坛建站系统
  • 如何制作自己的app关键词优化
  • 广州做网站的企业冯耀宗seo教程
  • 网站备案名称中南建设集团有限公司
  • MATLAB 做网站公司网站建设需要注意什么
  • 国内有哪些做卡通素材的网站推广方法
  • 设计比较好的网站广东企业网站seo报价
  • 河南做网站联系电话今日国内新闻最新消息10条新闻
  • 李笑来做的一个网站宁波网站seo诊断工具
  • 做网站英文怎么写windows优化大师在哪里
  • wordpress看不到主题福州排名seo公司
  • 电子商务网站建设系统功能技术优化seo
  • 汕头网站建设stqhcx精准防恶意点击软件
  • 现在写博客还是做网站制作网页的软件有哪些
  • wordpress好用的插件上海关键词优化按天计费
  • app下载网站建设sem是什么意思?
  • 全球网站建设品牌网络推广具体内容
  • 湖南移动网站建设福建企业seo推广
  • 四川 网站建设友情链接是什么
  • 网站行业百度小程序seo
  • b2c网站建设平台今日十大新闻
  • 网站怎么申请百度小程序做公司网站的公司
  • 男女生做羞羞网站seo中国官网
  • 四川住房和城乡建设部官方网站千锋教育官网
  • 网站做视频好不好网络广告营销对应案例
  • 网站邮箱后台子域名域名注册 万网
  • 网站建设公司苏州培训方案模板
  • 建站之星网站百度网页版浏览器
  • 陈村建网站吉林百度seo公司
  • 想转行做网站千锋培训学费多少钱