Ejemplo n.º 1
0
        public static ColumnSt GetColumnsSteelData(IIfcColumn columnSt)
        {
            Point location = new Point();

            location.X = ((columnSt.ObjectPlacement as IIfcLocalPlacement)
                          .RelativePlacement as IIfcAxis2Placement3D).Location.X;

            location.Y = ((columnSt.ObjectPlacement as IIfcLocalPlacement)
                          .RelativePlacement as IIfcAxis2Placement3D).Location.Y;
            location.Z = 0;

            Point refDir = new Point();

            refDir.X = ((columnSt.ObjectPlacement as IIfcLocalPlacement).RelativePlacement as IIfcAxis2Placement3D).RefDirection.X;

            refDir.Y = ((columnSt.ObjectPlacement as IIfcLocalPlacement).RelativePlacement as IIfcAxis2Placement3D).RefDirection.Y;

            refDir.Z = 0;

            ColumnSt col = new ColumnSt()
            {
                RefDirection = refDir,

                Location = location,

                Name = columnSt.Name.Value.ToString(),

                BottomLevel = ((columnSt.ObjectPlacement as IIfcLocalPlacement)
                               .RelativePlacement as IIfcAxis2Placement3D).Location.Z,

                TopLevel = ((columnSt.ObjectPlacement as IIfcLocalPlacement)
                            .RelativePlacement as IIfcAxis2Placement3D).Location.Z + ((columnSt.Representation.Representations.FirstOrDefault() as IIfcShapeRepresentation).Items.FirstOrDefault() as IIfcExtrudedAreaSolid).Depth,

                Width = (((columnSt.Representation.Representations.FirstOrDefault() as IIfcShapeRepresentation).Items.FirstOrDefault() as IIfcExtrudedAreaSolid)
                         .SweptArea as IIfcIShapeProfileDef).OverallWidth,

                Depth = (((columnSt.Representation.Representations.FirstOrDefault() as IIfcShapeRepresentation).Items.FirstOrDefault() as IIfcExtrudedAreaSolid)
                         .SweptArea as IIfcIShapeProfileDef).OverallDepth,

                FlangeTh = (((columnSt.Representation.Representations.FirstOrDefault() as IIfcShapeRepresentation).Items.FirstOrDefault() as IIfcExtrudedAreaSolid)
                            .SweptArea as IIfcIShapeProfileDef).FlangeThickness,

                WebTh = (((columnSt.Representation.Representations.FirstOrDefault() as IIfcShapeRepresentation).Items.FirstOrDefault() as IIfcExtrudedAreaSolid)
                         .SweptArea as IIfcIShapeProfileDef).WebThickness,
            };

            return(col);
        }
Ejemplo n.º 2
0
        public static Column GetColumnsData(IIfcColumn column)
        {
            Point location = new Point()
            {
                X = ((column.ObjectPlacement as IIfcLocalPlacement)
                     .RelativePlacement as IIfcAxis2Placement3D).Location.X,

                Y = ((column.ObjectPlacement as IIfcLocalPlacement)
                     .RelativePlacement as IIfcAxis2Placement3D).Location.Y,
                Z = 0
            };


            Point refDir = new Point()
            {
                X = ((column.ObjectPlacement as IIfcLocalPlacement).RelativePlacement as IIfcAxis2Placement3D).RefDirection.X,

                Y = ((column.ObjectPlacement as IIfcLocalPlacement).RelativePlacement as IIfcAxis2Placement3D).RefDirection.Y,

                Z = 0
            };

            Column col = new Column()
            {
                Location = location,

                Name = column.Name.Value.ToString(),

                BottomLevel = ((column.ObjectPlacement as IIfcLocalPlacement)
                               .RelativePlacement as IIfcAxis2Placement3D).Location.Z,

                TopLevel = ((column.ObjectPlacement as IIfcLocalPlacement)
                            .RelativePlacement as IIfcAxis2Placement3D).Location.Z + ((column.Representation.Representations.FirstOrDefault() as IIfcShapeRepresentation).Items.FirstOrDefault() as IIfcExtrudedAreaSolid).Depth,

                Width = (((column.Representation.Representations.FirstOrDefault() as IIfcShapeRepresentation).Items.FirstOrDefault() as IIfcExtrudedAreaSolid)
                         .SweptArea as IIfcRectangleProfileDef).XDim,

                Depth = (((column.Representation.Representations.FirstOrDefault() as IIfcShapeRepresentation).Items.FirstOrDefault() as IIfcExtrudedAreaSolid)
                         .SweptArea as IIfcRectangleProfileDef).YDim,

                RefDirection = refDir
            };

            return(col);
        }