public RectangularCrossSection(ModelOptions modelOption, double x, double y, double depth)
        {
            //Position of the 2D rectangular section (Will remain fixed).
            CartesianPoint2D  p           = CartesianPoint2D.Origin(modelOption.Model);
            DirectionVector2D v           = DirectionVector2D.UnitX(modelOption.Model);
            PlacementAxis2D   postion     = new PlacementAxis2D(modelOption.Model, p, v);
            RectangleProfile  rectProfile = new RectangleProfile(modelOption.Model, x, y, Xbim.Ifc2x3.ProfileResource.IfcProfileTypeEnum.AREA, postion);


            //Local placement of the 3D definition shape of the column(Will remain fixed).
            CartesianPoint3D    Expoint        = CartesianPoint3D.Origin(modelOption.Model);
            DirectionVector3D   exMain         = DirectionVector3D.UnitZ(modelOption.Model);
            DirectionVector3D   exReff         = DirectionVector3D.UnitX(modelOption.Model);
            PlacementAxis3D     Exaxis         = new PlacementAxis3D(modelOption.Model, Expoint, exMain, exReff);
            DirectionVector3D   extVec         = DirectionVector3D.UnitZ(modelOption.Model);
            ExtrudedAreaSolid   solid          = new ExtrudedAreaSolid(modelOption.Model, depth, rectProfile, extVec, Exaxis);
            ShapeRepresentation representation = new ShapeRepresentation(modelOption.Model, modelOption.Environment.SubContext, new List <ExtrudedAreaSolid>()
            {
                solid
            });

            ProductShape = new ProductionDefinitionShape(modelOption.Model, new List <ShapeRepresentation>()
            {
                representation
            });



            //Local placement of the object placement of the column (This will be manipulated according to Autodesk Revit readings).
            CartesianPoint3D  point     = CartesianPoint3D.Origin(modelOption.Model);
            DirectionVector3D main      = DirectionVector3D.UnitZ(modelOption.Model);
            DirectionVector3D reff      = DirectionVector3D.UnitX(modelOption.Model);
            PlacementAxis3D   axis      = new PlacementAxis3D(modelOption.Model, point, main, reff);
            LocalPlacement    placement = new LocalPlacement(modelOption.Model, modelOption.Environment.Stories.FirstOrDefault().LocalPlacement, axis);
        }
        public RectangleProfile(IfcStore model, double x, double y, IfcProfileTypeEnum profileType, PlacementAxis2D position)
        {
            this.Model       = model;
            this.xDim        = x;
            this.yDim        = y;
            this.profileName = $"PL{x}*{y}";
            this.profileType = profileType;
            this.position    = position;


            IfcProfileDef result = model.Instances.OfType <IfcRectangleProfileDef>().Where(rect =>
            {
                if (rect.ProfileName == profileName && rect.ProfileType == profileType && rect.XDim == x && rect.YDim == y && rect.ProfileType == profileType && rect.Position.Equals(position.IfcAxis2Placement2D))
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }).FirstOrDefault();

            if (result == null)
            {
                ifcRectangleProfile = model.Instances.New <IfcRectangleProfileDef>(rect =>
                {
                    rect.ProfileName = profileName;
                    rect.ProfileType = profileType;
                    rect.XDim        = x;
                    rect.YDim        = y;
                    rect.Position    = position.IfcAxis2Placement2D;
                }
                                                                                   );
            }

            else
            {
                ifcRectangleProfile = result;
            }
        }