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);
        }
예제 #2
0
        public TeklaPlate(ModelOptions modelOption, LocalPlacement objectPlacement, double xDimension, double yDimension, double depth, string name = "COLUMN")
        {
            this.Model = modelOption.Model;
            RectangularCrossSection section = new RectangularCrossSection(modelOption, xDimension, yDimension, depth);

            this.productRepresentation = section.ProductShape;
            this.name            = name;
            this.description     = productRepresentation.Representations[0].ExtrudedSolidList[0].Profile.ProfileName;
            this.objectType      = description;
            this.objectPlacement = objectPlacement;


            ifcColumn = Model.Instances.New <IfcColumn>(c =>
            {
                c.Name            = name;
                c.Representation  = productRepresentation.IfcProductionDefShape;
                c.ObjectPlacement = ObjectPlacement.IfcLocalPlacement;
                c.ObjectType      = objectType;
                c.Description     = description;
            }
                                                        );
        }