private static IfcRectangleProfileDef AssignRectangularProfile(XbimModel model, HndzStructuralElement genericProducthndz, IfcProduct genericProductIfc, IfcBuildingElementType elementType, HndzRectangularProfile genericProfilehndz) { #region Type & Material &Tags string typeText = genericProducthndz.ToString() + (int)genericProfilehndz.Rectangle.Width + " x " + (int)genericProfilehndz.Rectangle.Height + " mm"; elementType.Tag = typeText; elementType.Name = typeText; IfcLabel columnLabel = new IfcLabel(typeText); elementType.ElementType = columnLabel; elementType.ApplicableOccurrence = columnLabel; //genericProductIfc.Tag = typeText; genericProductIfc.Name = typeText; genericProductIfc.Description = typeText; genericProductIfc.SetDefiningType(elementType, model); #endregion //represent column as a rectangular profile IfcRectangleProfileDef ifcGenericProfile = model.Instances.New <IfcRectangleProfileDef>(); ifcGenericProfile.ProfileType = IfcProfileTypeEnum.AREA; ifcGenericProfile.XDim = genericProfilehndz.Rectangle.Height; ifcGenericProfile.YDim = genericProfilehndz.Rectangle.Width; ifcGenericProfile.Position = model.Instances.New <IfcAxis2Placement2D>(); ifcGenericProfile.Position.RefDirection = model.Instances.New <IfcDirection>(); ifcGenericProfile.Position.RefDirection.SetXY(genericProfilehndz.OrientationInPlane.X, genericProfilehndz.OrientationInPlane.Y); ifcGenericProfile.Position.Location = model.Instances.New <IfcCartesianPoint>(); ifcGenericProfile.Position.Location.SetXY(0, 0); return(ifcGenericProfile); }
private static IfcCShapeProfileDef AssignCsectionProfile(XbimModel model, HndzStructuralElement genericProducthndz, IfcProduct genericProductIfc, IfcBuildingElementType elementType, HndzCSectionProfile genericProfilehndz) { #region Type & Material &Tags string typeText = genericProducthndz.ToString() + " C-Chanel (flange " + genericProfilehndz.C_Section.b_f + " x " + genericProfilehndz.C_Section.t_f + " and web " + genericProfilehndz.C_Section.d + " x " + genericProfilehndz.C_Section.t_w + " mm"; elementType.Tag = typeText; elementType.Name = typeText; IfcLabel columnLabel = new IfcLabel(typeText); elementType.ElementType = columnLabel; elementType.ApplicableOccurrence = columnLabel; //genericProductIfc.Tag = typeText; genericProductIfc.Name = typeText; genericProductIfc.Description = typeText; genericProductIfc.SetDefiningType(elementType, model); #endregion IfcCShapeProfileDef ifcGenericProfile = model.Instances.New <IfcCShapeProfileDef>(); ifcGenericProfile.ProfileType = IfcProfileTypeEnum.AREA; ifcGenericProfile.WallThickness = genericProfilehndz.C_Section.t_f; //MyColumnPofile.WebThickness = Iprofile.C_Section.t_w; //ToDo:purlin web and flange thickness are the same!!!! ifcGenericProfile.Width = genericProfilehndz.C_Section.b_f; ifcGenericProfile.Depth = genericProfilehndz.C_Section.d; ifcGenericProfile.Girth = 5;//ToDo:What's that ifcGenericProfile.InternalFilletRadius = 10; ifcGenericProfile.Position = model.Instances.New <IfcAxis2Placement2D>(); ifcGenericProfile.Position.RefDirection = model.Instances.New <IfcDirection>(); ifcGenericProfile.Position.RefDirection.SetXY(genericProfilehndz.OrientationInPlane.X, genericProfilehndz.OrientationInPlane.Y); ifcGenericProfile.Position.Location = model.Instances.New <IfcCartesianPoint>(); ifcGenericProfile.Position.Location.SetXY(0, 0); return(ifcGenericProfile); }
private static IfcIShapeProfileDef AssignIProfile(XbimModel model, HndzStructuralElement genericProducthndz, IfcProduct genericProductIfc, IfcBuildingElementType elementType, HndzISectionProfile gnericProfileHndz) { #region Type & Material &Tags string typeText = genericProducthndz.ToString() + "I beam (flange " + gnericProfileHndz.I_Section.b_f + " x " + gnericProfileHndz.I_Section.t_fTop + " and web " + gnericProfileHndz.I_Section.d + " x " + gnericProfileHndz.I_Section.t_w + " mm"; elementType.Tag = typeText; elementType.Name = typeText; IfcLabel columnLabel = new IfcLabel(typeText); elementType.ElementType = columnLabel; elementType.ApplicableOccurrence = columnLabel; //genericProductIfc.Tag = typeText; genericProductIfc.Name = typeText; genericProductIfc.Description = typeText; genericProductIfc.SetDefiningType(elementType, model); #endregion IfcIShapeProfileDef ifcGenericProfile = model.Instances.New <IfcIShapeProfileDef>(); ifcGenericProfile.FlangeThickness = gnericProfileHndz.I_Section.tf; ifcGenericProfile.WebThickness = gnericProfileHndz.I_Section.t_w; ifcGenericProfile.OverallWidth = gnericProfileHndz.I_Section.b_f; ifcGenericProfile.OverallDepth = gnericProfileHndz.I_Section.d; ifcGenericProfile.FilletRadius = 10;//ToDo:make it zero after explore ISection ifcGenericProfile.ProfileType = IfcProfileTypeEnum.AREA; ifcGenericProfile.Position = model.Instances.New <IfcAxis2Placement2D>(); ifcGenericProfile.Position.RefDirection = model.Instances.New <IfcDirection>(); ifcGenericProfile.Position.RefDirection.SetXY(gnericProfileHndz.OrientationInPlane.X, gnericProfileHndz.OrientationInPlane.Y); ifcGenericProfile.Position.Location = model.Instances.New <IfcCartesianPoint>(); ifcGenericProfile.Position.Location.SetXY(0, 0); //ifcGenericProfile.Position.Location.SetXY(genericProducthndz.ExtrusionLine.baseNode.Point.X, // genericProducthndz.ExtrusionLine.baseNode.Point.Y); return(ifcGenericProfile); }