当前位置: 首页> 汽车> 报价 > 怎么自己设计logo_营销方案策划书_百度客服怎么转人工_网站测试

怎么自己设计logo_营销方案策划书_百度客服怎么转人工_网站测试

时间:2025/7/11 0:35:12来源:https://blog.csdn.net/liqian_ken/article/details/143867404 浏览次数: 0次
怎么自己设计logo_营销方案策划书_百度客服怎么转人工_网站测试

基础

基础回顾

效果图

在这里插入图片描述

简单的工具类

using System.Collections.Generic;
using System.Linq;
using Xbim.Common.Step21;
using Xbim.Ifc;
using Xbim.Ifc4.GeometricConstraintResource;
using Xbim.Ifc4.GeometricModelResource;
using Xbim.Ifc4.GeometryResource;
using Xbim.Ifc4.Interfaces;
using Xbim.Ifc4.Kernel;
using Xbim.Ifc4.MeasureResource;
using Xbim.Ifc4.PresentationAppearanceResource;
using Xbim.Ifc4.ProductExtension;
using Xbim.Ifc4.ProfileResource;
using Xbim.Ifc4.RepresentationResource;
using Xbim.Ifc4.SharedBldgElements;namespace TestXbim
{public class IfcUtil{public static IfcStore MakeIfcStore(){return IfcStore.Create(IfcSchemaVersion.Ifc4, XbimStoreType.InMemoryModel);}public static IfcProject CreateProject(IfcStore model){return model.Instances.New<IfcProject>(p =>{p.UnitsInContext = model.Instances.New<IfcUnitAssignment>(a =>a.SetOrChangeSiUnit(IfcUnitEnum.LENGTHUNIT, IfcSIUnitName.METRE, IfcSIPrefix.MILLI));});}public static IfcSite CreateSite(IfcStore model){return model.Instances.New<IfcSite>();}public static IfcBuilding CreateBuilding(IfcStore model){return  model.Instances.New<IfcBuilding>();  }public static IfcWall CreateWall(IfcStore model){return model.Instances.New<IfcWall>();  }       public static IfcProductDefinitionShape CreateExtrudedShape(IfcStore model, List<double[]> points, double depth, double elevation){//基于点坐标序列,创建折线IfcPolyline polyline = model.Instances.New<IfcPolyline>(L =>{foreach (var point in points){IfcCartesianPoint p = model.Instances.New<IfcCartesianPoint>(cp => cp.SetXY(point[0], point[1]));L.Points.Add(p);}});//基于折线创建切面var profileDef = model.Instances.New<IfcArbitraryClosedProfileDef>(p =>{p.ProfileType = IfcProfileTypeEnum.AREA;p.OuterCurve = polyline;});//基于切面创建拉伸体var solid = model.Instances.New<IfcExtrudedAreaSolid>(s =>{s.Position = model.Instances.New<IfcAxis2Placement3D>(p =>p.Location = model.Instances.New<IfcCartesianPoint>(c => c.SetXYZ(0, 0, elevation)));s.Depth = depth;s.ExtrudedDirection = model.Instances.New<IfcDirection>(d => d.SetXYZ(0, 0, 1));s.SweptArea = profileDef;});//基于拉伸体,创建形状var rep = model.Instances.New<IfcShapeRepresentation>(r =>{r.Items.Add(solid);});//基于形状,创建产品形状var shape = model.Instances.New<IfcProductDefinitionShape>(s => s.Representations.Add(rep));return shape;}        }
}

示例代码

public void TestMethod1()
{var pts = new List<double[]>(){new double[]{0,0},new double[]{0,1000},new double[]{2000,1000},new double[]{2000,0},};var pts2 = new List<double[]>(){new double[]{0,1500},new double[]{0,2500},new double[]{1000,2500},new double[]{1000,1500},};var model = IfcUtil.MakeIfcStore();using (var tran = model.BeginTransaction()){var color = new double[] { 0.5, 0, 0, 2 };var wallShape = IfcUtil.CreateExtrudedShape(model, pts, 500, 0);var wall = IfcUtil.CreateWall(model);wall.Representation = wallShape;var wallShape2 = IfcUtil.CreateExtrudedShape(model, pts2, 500, 0);var wall2 = IfcUtil.CreateWall(model);wall2.Representation = wallShape2;var building = IfcUtil.CreateBuilding(model);building.AddElement(wall);building.AddElement(wall2);var site = IfcUtil.CreateSite(model);site.AddBuilding(building);var project = IfcUtil.CreateProject(model);project.AddSite(site);tran.Commit();}model.SaveAs("./wall.ifc");
}
关键字:怎么自己设计logo_营销方案策划书_百度客服怎么转人工_网站测试

版权声明:

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

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

责任编辑: