您的位置:首页 > 科技 > 能源 > 旅游网站首页设计大概图_如何自己做微信小程序_怎么做盲盒_成都外贸seo

旅游网站首页设计大概图_如何自己做微信小程序_怎么做盲盒_成都外贸seo

2024/12/23 10:11:50 来源:https://blog.csdn.net/liqian_ken/article/details/143868478  浏览:    关键词:旅游网站首页设计大概图_如何自己做微信小程序_怎么做盲盒_成都外贸seo
旅游网站首页设计大概图_如何自己做微信小程序_怎么做盲盒_成都外贸seo

基础回顾

https://blog.csdn.net/liqian_ken/article/details/143867404
https://blog.csdn.net/liqian_ken/article/details/114851319

效果图

在这里插入图片描述

在这里插入图片描述

代码示例

  1. 在前文基础上,增加一个工具方法:
public static IfcProductDefinitionShape CreateDiskSolidShape(IfcStore model)
{IfcSweptDiskSolid solid = model.Instances.New<IfcSweptDiskSolid>(so =>{// 为扫描模型创建扫描曲线so.Directrix = model.Instances.New<IfcTrimmedCurve>(c =>{c.SenseAgreement = false;c.MasterRepresentation = IfcTrimmingPreference.CARTESIAN;c.Trim1.Add(model.Instances.New<IfcCartesianPoint>(pt => pt.SetXYZ(0, 2000, 0)));c.Trim2.Add(model.Instances.New<IfcCartesianPoint>(pt => pt.SetXYZ(2000, 0, 0)));c.BasisCurve = model.Instances.New<IfcCircle>(x =>{x.Radius = 1000;x.Position = model.Instances.New<IfcAxis2Placement3D>(a =>{a.Location = model.Instances.New<IfcCartesianPoint>(pt => pt.SetXYZ(0, 0, 0));});});});so.Radius = 100;so.InnerRadius = 100;});var rep = model.Instances.New<IfcShapeRepresentation>(r =>{r.Items.Add(solid);});return model.Instances.New<IfcProductDefinitionShape>(s => s.Representations.Add(rep));
}

关于IFC裁剪线IfcTrimmedCurve的参数理解可以参考:https://blog.csdn.net/liyazhen2011/article/details/82259083

涉及了扫掠方向、圆心、半径的设置。


  1. 调用:
public void TestMethod1()
{var model = IfcUtil.MakeIfcStore();using (var tran = model.BeginTransaction()){var shape = IfcUtil.CreateDiskSolidShape(model);var arch = IfcUtil.CreateFlowFitting(model);arch.Representation = shape;var building = IfcUtil.CreateBuilding(model);building.AddElement(arch);var site = IfcUtil.CreateSite(model);site.AddBuilding(building);var project = IfcUtil.CreateProject(model);project.AddSite(site);tran.Commit();}model.SaveAs("./B.ifc");
}

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com