public static IfcArbitraryOpenProfileDef MakeArbitraryOpenProfileDef(XbimModel m, IfcBoundedCurve curve)
 {
     var def = m.Instances.New<IfcArbitraryOpenProfileDef>();
     def.Curve = curve;
     def.ProfileType=IfcProfileTypeEnum.CURVE;
     return def;
 }
Exemple #2
0
        private IfcBeam GenerateIPE200(DatabaseIfc db, IfcBuilding building, bool tessellated)
        {
            if (tessellated)
            {
                List <Tuple <double, double, double> > coords = new List <Tuple <double, double, double> >()
                {
                    new Tuple <double, double, double>(1000.0, 50.0, -91.5), new Tuple <double, double, double>(1000.0, 14.8, -91.5), new Tuple <double, double, double>(1000.0, 50.0, -100.0), new Tuple <double, double, double>(1000.0, -50.0, -100.0), new Tuple <double, double, double>(1000.0, -50.0, -91.5), new Tuple <double, double, double>(1000.0, -14.8, -91.5), new Tuple <double, double, double>(1000.0, -2.8, 79.5), new Tuple <double, double, double>(1000.0, -2.8, -79.5), new Tuple <double, double, double>(1000.0, -50.0, 91.5), new Tuple <double, double, double>(1000.0, -14.8, 91.5), new Tuple <double, double, double>(1000.0, -50.0, 100.0), new Tuple <double, double, double>(1000.0, 50.0, 100.0), new Tuple <double, double, double>(1000.0, 50.0, 91.5), new Tuple <double, double, double>(1000.0, 14.8, 91.5), new Tuple <double, double, double>(1000.0, 2.8, -79.5), new Tuple <double, double, double>(1000.0, 2.8, 79.5), new Tuple <double, double, double>(0.0, 2.8, 79.5), new Tuple <double, double, double>(0.0, 2.8, -79.5), new Tuple <double, double, double>(0.0, 50.0, 91.5), new Tuple <double, double, double>(0.0, 14.8, 91.5), new Tuple <double, double, double>(0.0, 50.0, 100.0), new Tuple <double, double, double>(0.0, -50.0, 100.0), new Tuple <double, double, double>(0.0, -50.0, 91.5), new Tuple <double, double, double>(0.0, -14.8, 91.5), new Tuple <double, double, double>(0.0, -2.8, -79.5), new Tuple <double, double, double>(0.0, -2.8, 79.5), new Tuple <double, double, double>(0.0, -50.0, -91.5), new Tuple <double, double, double>(0.0, -14.8, -91.5), new Tuple <double, double, double>(0.0, -50.0, -100.0), new Tuple <double, double, double>(0.0, 50.0, -100.0), new Tuple <double, double, double>(0.0, 50.0, -91.5), new Tuple <double, double, double>(0.0, 14.8, -91.5), new Tuple <double, double, double>(0.0, 14.8, -91.5), new Tuple <double, double, double>(0.0, 2.8, -79.5), new Tuple <double, double, double>(1000.0, 14.8, -91.5), new Tuple <double, double, double>(1000.0, 2.8, -79.5), new Tuple <double, double, double>(500.0, 2.8, -79.5), new Tuple <double, double, double>(500.0, 14.8, -91.5), new Tuple <double, double, double>(0.0, 2.8, -79.5), new Tuple <double, double, double>(0.0, 2.8, 79.5), new Tuple <double, double, double>(1000.0, 2.8, -79.5), new Tuple <double, double, double>(1000.0, 2.8, 79.5), new Tuple <double, double, double>(500.0, 2.8, -79.5), new Tuple <double, double, double>(500.0, 2.8, 79.5), new Tuple <double, double, double>(0.0, 2.8, 79.5), new Tuple <double, double, double>(0.0, 14.8, 91.5), new Tuple <double, double, double>(1000.0, 2.8, 79.5), new Tuple <double, double, double>(1000.0, 14.8, 91.5), new Tuple <double, double, double>(500.0, 2.8, 79.5), new Tuple <double, double, double>(500.0, 14.8, 91.5), new Tuple <double, double, double>(0.0, 14.8, 91.5), new Tuple <double, double, double>(0.0, 50.0, 91.5), new Tuple <double, double, double>(1000.0, 14.8, 91.5), new Tuple <double, double, double>(1000.0, 50.0, 91.5), new Tuple <double, double, double>(500.0, 14.8, 91.5), new Tuple <double, double, double>(500.0, 50.0, 91.5), new Tuple <double, double, double>(0.0, 50.0, 91.5), new Tuple <double, double, double>(0.0, 50.0, 100.0), new Tuple <double, double, double>(1000.0, 50.0, 91.5), new Tuple <double, double, double>(1000.0, 50.0, 100.0), new Tuple <double, double, double>(500.0, 50.0, 91.5), new Tuple <double, double, double>(500.0, 50.0, 100.0), new Tuple <double, double, double>(0.0, 50.0, 100.0), new Tuple <double, double, double>(0.0, -50.0, 100.0), new Tuple <double, double, double>(1000.0, 50.0, 100.0), new Tuple <double, double, double>(1000.0, -50.0, 100.0), new Tuple <double, double, double>(500.0, 50.0, 100.0), new Tuple <double, double, double>(500.0, -50.0, 100.0), new Tuple <double, double, double>(0.0, -50.0, 100.0), new Tuple <double, double, double>(0.0, -50.0, 91.5), new Tuple <double, double, double>(1000.0, -50.0, 100.0), new Tuple <double, double, double>(1000.0, -50.0, 91.5), new Tuple <double, double, double>(500.0, -50.0, 100.0), new Tuple <double, double, double>(500.0, -50.0, 91.5), new Tuple <double, double, double>(0.0, -50.0, 91.5), new Tuple <double, double, double>(0.0, -14.8, 91.5), new Tuple <double, double, double>(1000.0, -50.0, 91.5), new Tuple <double, double, double>(1000.0, -14.8, 91.5), new Tuple <double, double, double>(500.0, -50.0, 91.5), new Tuple <double, double, double>(500.0, -14.8, 91.5), new Tuple <double, double, double>(0.0, -14.8, 91.5), new Tuple <double, double, double>(0.0, -2.8, 79.5), new Tuple <double, double, double>(1000.0, -14.8, 91.5), new Tuple <double, double, double>(1000.0, -2.8, 79.5), new Tuple <double, double, double>(500.0, -14.8, 91.5), new Tuple <double, double, double>(500.0, -2.8, 79.5), new Tuple <double, double, double>(0.0, -2.8, 79.5), new Tuple <double, double, double>(0.0, -2.8, -79.5), new Tuple <double, double, double>(1000.0, -2.8, 79.5), new Tuple <double, double, double>(1000.0, -2.8, -79.5), new Tuple <double, double, double>(500.0, -2.8, 79.5), new Tuple <double, double, double>(500.0, -2.8, -79.5), new Tuple <double, double, double>(0.0, -2.8, -79.5), new Tuple <double, double, double>(0.0, -14.8, -91.5), new Tuple <double, double, double>(1000.0, -2.8, -79.5), new Tuple <double, double, double>(1000.0, -14.8, -91.5), new Tuple <double, double, double>(500.0, -2.8, -79.5), new Tuple <double, double, double>(500.0, -14.8, -91.5), new Tuple <double, double, double>(0.0, -14.8, -91.5), new Tuple <double, double, double>(0.0, -50.0, -91.5), new Tuple <double, double, double>(1000.0, -14.8, -91.5), new Tuple <double, double, double>(1000.0, -50.0, -91.5), new Tuple <double, double, double>(500.0, -14.8, -91.5), new Tuple <double, double, double>(500.0, -50.0, -91.5), new Tuple <double, double, double>(0.0, -50.0, -91.5), new Tuple <double, double, double>(0.0, -50.0, -100.0), new Tuple <double, double, double>(1000.0, -50.0, -91.5), new Tuple <double, double, double>(1000.0, -50.0, -100.0), new Tuple <double, double, double>(500.0, -50.0, -91.5), new Tuple <double, double, double>(500.0, -50.0, -100.0), new Tuple <double, double, double>(0.0, -50.0, -100.0), new Tuple <double, double, double>(0.0, 50.0, -100.0), new Tuple <double, double, double>(1000.0, -50.0, -100.0), new Tuple <double, double, double>(1000.0, 50.0, -100.0), new Tuple <double, double, double>(500.0, -50.0, -100.0), new Tuple <double, double, double>(500.0, 50.0, -100.0), new Tuple <double, double, double>(0.0, 50.0, -100.0), new Tuple <double, double, double>(0.0, 50.0, -91.5), new Tuple <double, double, double>(1000.0, 50.0, -100.0), new Tuple <double, double, double>(1000.0, 50.0, -91.5), new Tuple <double, double, double>(500.0, 50.0, -100.0), new Tuple <double, double, double>(500.0, 50.0, -91.5), new Tuple <double, double, double>(0.0, 50.0, -91.5), new Tuple <double, double, double>(0.0, 14.8, -91.5), new Tuple <double, double, double>(1000.0, 50.0, -91.5), new Tuple <double, double, double>(1000.0, 14.8, -91.5), new Tuple <double, double, double>(500.0, 50.0, -91.5), new Tuple <double, double, double>(500.0, 14.8, -91.5)
                };
                IfcCartesianPointList3D cartesianPointList3D = new IfcCartesianPointList3D(db, coords);
                cartesianPointList3D.Comments.Add("the geometric representation of the beam is provided as a triangulated face set");
                cartesianPointList3D.Comments.Add("the meshing depends on the creating software system");

                List <CoordIndex> coordIndex = new List <CoordIndex>()
                {
                    new CoordIndex(6, 5, 4), new CoordIndex(15, 8, 6), new CoordIndex(6, 4, 3), new CoordIndex(10, 11, 9), new CoordIndex(16, 10, 7), new CoordIndex(14, 11, 10), new CoordIndex(7, 8, 16), new CoordIndex(6, 2, 15), new CoordIndex(2, 3, 1), new CoordIndex(3, 2, 6), new CoordIndex(10, 16, 14), new CoordIndex(14, 13, 12), new CoordIndex(11, 14, 12), new CoordIndex(8, 15, 16), new CoordIndex(24, 23, 22), new CoordIndex(17, 26, 24), new CoordIndex(22, 21, 20), new CoordIndex(28, 29, 27), new CoordIndex(32, 28, 25), new CoordIndex(30, 29, 28), new CoordIndex(18, 25, 26), new CoordIndex(24, 20, 17), new CoordIndex(20, 21, 19), new CoordIndex(32, 31, 30), new CoordIndex(28, 32, 30), new CoordIndex(33, 34, 37), new CoordIndex(36, 35, 38), new CoordIndex(40, 44, 43), new CoordIndex(41, 43, 44), new CoordIndex(46, 50, 49), new CoordIndex(47, 49, 50), new CoordIndex(56, 55, 51), new CoordIndex(55, 56, 54), new CoordIndex(57, 58, 62), new CoordIndex(60, 59, 61), new CoordIndex(63, 64, 68), new CoordIndex(66, 65, 67), new CoordIndex(69, 70, 74), new CoordIndex(72, 71, 73), new CoordIndex(80, 79, 75), new CoordIndex(79, 80, 78), new CoordIndex(81, 82, 86), new CoordIndex(84, 83, 85), new CoordIndex(88, 92, 91), new CoordIndex(89, 91, 92), new CoordIndex(94, 98, 97), new CoordIndex(95, 97, 98), new CoordIndex(104, 103, 99), new CoordIndex(103, 104, 102), new CoordIndex(105, 106, 110), new CoordIndex(108, 107, 109), new CoordIndex(111, 112, 116), new CoordIndex(114, 113, 115), new CoordIndex(117, 118, 122), new CoordIndex(120, 119, 121), new CoordIndex(128, 127, 123), new CoordIndex(127, 128, 126), new CoordIndex(22, 20, 24), new CoordIndex(32, 25, 18), new CoordIndex(18, 26, 17), new CoordIndex(33, 37, 38), new CoordIndex(36, 38, 37), new CoordIndex(40, 43, 39), new CoordIndex(41, 44, 42), new CoordIndex(46, 49, 45), new CoordIndex(47, 50, 48), new CoordIndex(56, 51, 52), new CoordIndex(55, 54, 53), new CoordIndex(57, 62, 61), new CoordIndex(60, 61, 62), new CoordIndex(63, 68, 67), new CoordIndex(66, 67, 68), new CoordIndex(69, 74, 73), new CoordIndex(72, 73, 74), new CoordIndex(80, 75, 76), new CoordIndex(79, 78, 77), new CoordIndex(81, 86, 85), new CoordIndex(84, 85, 86), new CoordIndex(88, 91, 87), new CoordIndex(89, 92, 90), new CoordIndex(94, 97, 93), new CoordIndex(95, 98, 96), new CoordIndex(104, 99, 100), new CoordIndex(103, 102, 101), new CoordIndex(105, 110, 109), new CoordIndex(108, 109, 110), new CoordIndex(111, 116, 115), new CoordIndex(114, 115, 116), new CoordIndex(117, 122, 121), new CoordIndex(120, 121, 122), new CoordIndex(128, 123, 124), new CoordIndex(127, 126, 125)
                };
                IfcTriangulatedFaceSet triangulatedFaceSet = new IfcTriangulatedFaceSet(cartesianPointList3D, true, coordIndex);

                return(new IfcBeam(building, null, new IfcProductDefinitionShape(new IfcShapeRepresentation(triangulatedFaceSet)))
                {
                    GlobalId = "0EF5_zZRv0pQPddeofU3KT", Name = "ExampleBeamName", Description = "ExampleBeamDescription", Tag = "Tag"
                });
            }

            List <Coord2d> points = new List <Coord2d>()
            {
                new Coord2d(2.8, -79.5), new Coord2d(2.8, 79.5), new Coord2d(6.314719, 87.985281), new Coord2d(14.8, 91.5), new Coord2d(50.0, 91.5), new Coord2d(50.0, 100.0), new Coord2d(-50.0, 100.0), new Coord2d(-50.0, 91.5), new Coord2d(-14.8, 91.5), new Coord2d(-6.314719, 87.985281), new Coord2d(-2.8, 79.5), new Coord2d(-2.8, -79.5), new Coord2d(-6.314719, -87.985281), new Coord2d(-14.8, -91.5), new Coord2d(-50.0, -91.5), new Coord2d(-50.0, -100.0), new Coord2d(50.0, -100.0), new Coord2d(50.0, -91.5), new Coord2d(14.8, -91.5), new Coord2d(6.314719, -87.985281)
            };
            List <IfcSegmentIndexSelect> segments = new List <IfcSegmentIndexSelect>();

            segments.Add(new IfcLineIndex(1, 2));
            segments.Add(new IfcArcIndex(2, 3, 4));
            segments.Add(new IfcLineIndex(4, 5));
            segments.Add(new IfcLineIndex(5, 6));
            segments.Add(new IfcLineIndex(6, 7));
            segments.Add(new IfcLineIndex(7, 8));
            segments.Add(new IfcLineIndex(8, 9));
            segments.Add(new IfcArcIndex(9, 10, 11));
            segments.Add(new IfcLineIndex(11, 12));
            segments.Add(new IfcArcIndex(12, 13, 14));
            segments.Add(new IfcLineIndex(14, 15));
            segments.Add(new IfcLineIndex(15, 16));
            segments.Add(new IfcLineIndex(16, 17));
            segments.Add(new IfcLineIndex(17, 18));
            segments.Add(new IfcLineIndex(18, 19));
            segments.Add(new IfcArcIndex(19, 20, 1));
            IfcBoundedCurve boundedCurve = IfcBoundedCurve.Generate(db, points, segments);
            IfcArbitraryClosedProfileDef arbitraryClosedProfileDef = new IfcArbitraryClosedProfileDef("IPE200", boundedCurve);
            IfcAxis2Placement3D          axis2Placement3D          = new IfcAxis2Placement3D(new IfcCartesianPoint(db, 0, 0, 0), new IfcDirection(db, 0, 1, 0), new IfcDirection(db, 1, 0, 0));
            IfcExtrudedAreaSolid         extrudedAreaSolid         = new IfcExtrudedAreaSolid(arbitraryClosedProfileDef, axis2Placement3D, new IfcDirection(db, 0, 0, 1), 1000);
            IfcBeam beam = new IfcBeam(building, null, new IfcProductDefinitionShape(new IfcShapeRepresentation(extrudedAreaSolid)))
            {
                Name = "ExampleBeamName", Description = "ExampleBeamDescription", Tag = "Tag"
            };

            //Unique ids assigned to generate constant IfcScript  sample files, remove otherwise
            beam.GlobalId = "0EF5_zZRv0pQPddeofU3KT";

            return(beam);
        }
 public static IfcCenterLineProfileDef MakeCenterLineProfile(IfcStore m, IfcBoundedCurve curve, double thickness)
 {
     return(m.Instances.New <IfcCenterLineProfileDef>(c =>
     {
         c.Thickness = thickness;
         c.Curve = curve;
     }));
 }
        public static IfcCenterLineProfileDef MakeCenterLineProfileDef(XbimModel m, IfcBoundedCurve curve, int thickness)
        {
            var cl = m.Instances.New <IfcCenterLineProfileDef>();

            cl.Thickness = thickness;
            cl.Curve     = curve;
            return(cl);
        }
Exemple #5
0
        private IfcBeam GenerateIPE200(STPModelData md, IfcBuilding building, bool tessellated)
        {
            if (tessellated)
            {
                List <Point3d> coords = new List <Point3d>()
                {
                    new Point3d(1000.0, 50.0, -91.5), new Point3d(1000.0, 14.8, -91.5), new Point3d(1000.0, 50.0, -100.0), new Point3d(1000.0, -50.0, -100.0), new Point3d(1000.0, -50.0, -91.5), new Point3d(1000.0, -14.8, -91.5), new Point3d(1000.0, -2.8, 79.5), new Point3d(1000.0, -2.8, -79.5), new Point3d(1000.0, -50.0, 91.5), new Point3d(1000.0, -14.8, 91.5), new Point3d(1000.0, -50.0, 100.0), new Point3d(1000.0, 50.0, 100.0), new Point3d(1000.0, 50.0, 91.5), new Point3d(1000.0, 14.8, 91.5), new Point3d(1000.0, 2.8, -79.5), new Point3d(1000.0, 2.8, 79.5), new Point3d(0.0, 2.8, 79.5), new Point3d(0.0, 2.8, -79.5), new Point3d(0.0, 50.0, 91.5), new Point3d(0.0, 14.8, 91.5), new Point3d(0.0, 50.0, 100.0), new Point3d(0.0, -50.0, 100.0), new Point3d(0.0, -50.0, 91.5), new Point3d(0.0, -14.8, 91.5), new Point3d(0.0, -2.8, -79.5), new Point3d(0.0, -2.8, 79.5), new Point3d(0.0, -50.0, -91.5), new Point3d(0.0, -14.8, -91.5), new Point3d(0.0, -50.0, -100.0), new Point3d(0.0, 50.0, -100.0), new Point3d(0.0, 50.0, -91.5), new Point3d(0.0, 14.8, -91.5), new Point3d(0.0, 14.8, -91.5), new Point3d(0.0, 2.8, -79.5), new Point3d(1000.0, 14.8, -91.5), new Point3d(1000.0, 2.8, -79.5), new Point3d(500.0, 2.8, -79.5), new Point3d(500.0, 14.8, -91.5), new Point3d(0.0, 2.8, -79.5), new Point3d(0.0, 2.8, 79.5), new Point3d(1000.0, 2.8, -79.5), new Point3d(1000.0, 2.8, 79.5), new Point3d(500.0, 2.8, -79.5), new Point3d(500.0, 2.8, 79.5), new Point3d(0.0, 2.8, 79.5), new Point3d(0.0, 14.8, 91.5), new Point3d(1000.0, 2.8, 79.5), new Point3d(1000.0, 14.8, 91.5), new Point3d(500.0, 2.8, 79.5), new Point3d(500.0, 14.8, 91.5), new Point3d(0.0, 14.8, 91.5), new Point3d(0.0, 50.0, 91.5), new Point3d(1000.0, 14.8, 91.5), new Point3d(1000.0, 50.0, 91.5), new Point3d(500.0, 14.8, 91.5), new Point3d(500.0, 50.0, 91.5), new Point3d(0.0, 50.0, 91.5), new Point3d(0.0, 50.0, 100.0), new Point3d(1000.0, 50.0, 91.5), new Point3d(1000.0, 50.0, 100.0), new Point3d(500.0, 50.0, 91.5), new Point3d(500.0, 50.0, 100.0), new Point3d(0.0, 50.0, 100.0), new Point3d(0.0, -50.0, 100.0), new Point3d(1000.0, 50.0, 100.0), new Point3d(1000.0, -50.0, 100.0), new Point3d(500.0, 50.0, 100.0), new Point3d(500.0, -50.0, 100.0), new Point3d(0.0, -50.0, 100.0), new Point3d(0.0, -50.0, 91.5), new Point3d(1000.0, -50.0, 100.0), new Point3d(1000.0, -50.0, 91.5), new Point3d(500.0, -50.0, 100.0), new Point3d(500.0, -50.0, 91.5), new Point3d(0.0, -50.0, 91.5), new Point3d(0.0, -14.8, 91.5), new Point3d(1000.0, -50.0, 91.5), new Point3d(1000.0, -14.8, 91.5), new Point3d(500.0, -50.0, 91.5), new Point3d(500.0, -14.8, 91.5), new Point3d(0.0, -14.8, 91.5), new Point3d(0.0, -2.8, 79.5), new Point3d(1000.0, -14.8, 91.5), new Point3d(1000.0, -2.8, 79.5), new Point3d(500.0, -14.8, 91.5), new Point3d(500.0, -2.8, 79.5), new Point3d(0.0, -2.8, 79.5), new Point3d(0.0, -2.8, -79.5), new Point3d(1000.0, -2.8, 79.5), new Point3d(1000.0, -2.8, -79.5), new Point3d(500.0, -2.8, 79.5), new Point3d(500.0, -2.8, -79.5), new Point3d(0.0, -2.8, -79.5), new Point3d(0.0, -14.8, -91.5), new Point3d(1000.0, -2.8, -79.5), new Point3d(1000.0, -14.8, -91.5), new Point3d(500.0, -2.8, -79.5), new Point3d(500.0, -14.8, -91.5), new Point3d(0.0, -14.8, -91.5), new Point3d(0.0, -50.0, -91.5), new Point3d(1000.0, -14.8, -91.5), new Point3d(1000.0, -50.0, -91.5), new Point3d(500.0, -14.8, -91.5), new Point3d(500.0, -50.0, -91.5), new Point3d(0.0, -50.0, -91.5), new Point3d(0.0, -50.0, -100.0), new Point3d(1000.0, -50.0, -91.5), new Point3d(1000.0, -50.0, -100.0), new Point3d(500.0, -50.0, -91.5), new Point3d(500.0, -50.0, -100.0), new Point3d(0.0, -50.0, -100.0), new Point3d(0.0, 50.0, -100.0), new Point3d(1000.0, -50.0, -100.0), new Point3d(1000.0, 50.0, -100.0), new Point3d(500.0, -50.0, -100.0), new Point3d(500.0, 50.0, -100.0), new Point3d(0.0, 50.0, -100.0), new Point3d(0.0, 50.0, -91.5), new Point3d(1000.0, 50.0, -100.0), new Point3d(1000.0, 50.0, -91.5), new Point3d(500.0, 50.0, -100.0), new Point3d(500.0, 50.0, -91.5), new Point3d(0.0, 50.0, -91.5), new Point3d(0.0, 14.8, -91.5), new Point3d(1000.0, 50.0, -91.5), new Point3d(1000.0, 14.8, -91.5), new Point3d(500.0, 50.0, -91.5), new Point3d(500.0, 14.8, -91.5)
                };
                IfcCartesianPointList3D cartesianPointList3D = new IfcCartesianPointList3D(md, coords);
                cartesianPointList3D.Comments.Add("the geometric representation of the beam is provided as a triangulated face set");
                cartesianPointList3D.Comments.Add("the meshing depends on the creating software system");

                List <CoordIndex> coordIndex = new List <CoordIndex>()
                {
                    new CoordIndex(6, 5, 4), new CoordIndex(15, 8, 6), new CoordIndex(6, 4, 3), new CoordIndex(10, 11, 9), new CoordIndex(16, 10, 7), new CoordIndex(14, 11, 10), new CoordIndex(7, 8, 16), new CoordIndex(6, 2, 15), new CoordIndex(2, 3, 1), new CoordIndex(3, 2, 6), new CoordIndex(10, 16, 14), new CoordIndex(14, 13, 12), new CoordIndex(11, 14, 12), new CoordIndex(8, 15, 16), new CoordIndex(24, 23, 22), new CoordIndex(17, 26, 24), new CoordIndex(22, 21, 20), new CoordIndex(28, 29, 27), new CoordIndex(32, 28, 25), new CoordIndex(30, 29, 28), new CoordIndex(18, 25, 26), new CoordIndex(24, 20, 17), new CoordIndex(20, 21, 19), new CoordIndex(32, 31, 30), new CoordIndex(28, 32, 30), new CoordIndex(33, 34, 37), new CoordIndex(36, 35, 38), new CoordIndex(40, 44, 43), new CoordIndex(41, 43, 44), new CoordIndex(46, 50, 49), new CoordIndex(47, 49, 50), new CoordIndex(56, 55, 51), new CoordIndex(55, 56, 54), new CoordIndex(57, 58, 62), new CoordIndex(60, 59, 61), new CoordIndex(63, 64, 68), new CoordIndex(66, 65, 67), new CoordIndex(69, 70, 74), new CoordIndex(72, 71, 73), new CoordIndex(80, 79, 75), new CoordIndex(79, 80, 78), new CoordIndex(81, 82, 86), new CoordIndex(84, 83, 85), new CoordIndex(88, 92, 91), new CoordIndex(89, 91, 92), new CoordIndex(94, 98, 97), new CoordIndex(95, 97, 98), new CoordIndex(104, 103, 99), new CoordIndex(103, 104, 102), new CoordIndex(105, 106, 110), new CoordIndex(108, 107, 109), new CoordIndex(111, 112, 116), new CoordIndex(114, 113, 115), new CoordIndex(117, 118, 122), new CoordIndex(120, 119, 121), new CoordIndex(128, 127, 123), new CoordIndex(127, 128, 126), new CoordIndex(22, 20, 24), new CoordIndex(32, 25, 18), new CoordIndex(18, 26, 17), new CoordIndex(33, 37, 38), new CoordIndex(36, 38, 37), new CoordIndex(40, 43, 39), new CoordIndex(41, 44, 42), new CoordIndex(46, 49, 45), new CoordIndex(47, 50, 48), new CoordIndex(56, 51, 52), new CoordIndex(55, 54, 53), new CoordIndex(57, 62, 61), new CoordIndex(60, 61, 62), new CoordIndex(63, 68, 67), new CoordIndex(66, 67, 68), new CoordIndex(69, 74, 73), new CoordIndex(72, 73, 74), new CoordIndex(80, 75, 76), new CoordIndex(79, 78, 77), new CoordIndex(81, 86, 85), new CoordIndex(84, 85, 86), new CoordIndex(88, 91, 87), new CoordIndex(89, 92, 90), new CoordIndex(94, 97, 93), new CoordIndex(95, 98, 96), new CoordIndex(104, 99, 100), new CoordIndex(103, 102, 101), new CoordIndex(105, 110, 109), new CoordIndex(108, 109, 110), new CoordIndex(111, 116, 115), new CoordIndex(114, 115, 116), new CoordIndex(117, 122, 121), new CoordIndex(120, 121, 122), new CoordIndex(128, 123, 124), new CoordIndex(127, 126, 125)
                };
                IfcTriangulatedFaceSet triangulatedFaceSet = new IfcTriangulatedFaceSet(md, cartesianPointList3D, null, true, coordIndex, null);

                return(new IfcBeam(building, triangulatedFaceSet)
                {
                    GlobalId = "0EF5_zZRv0pQPddeofU3KT", Name = "ExampleBeamName", Description = "ExampleBeamDescription", Tag = "Tag"
                });
            }

            List <Point3d> points = new List <Point3d>()
            {
                new Point3d(2.8, -79.5, 0), new Point3d(2.8, 79.5, 0), new Point3d(6.314719, 87.985281, 0), new Point3d(14.8, 91.5, 0), new Point3d(50.0, 91.5, 0), new Point3d(50.0, 100.0, 0), new Point3d(-50.0, 100.0, 0), new Point3d(-50.0, 91.5, 0), new Point3d(-14.8, 91.5, 0), new Point3d(-6.314719, 87.985281, 0), new Point3d(-2.8, 79.5, 0), new Point3d(-2.8, -79.5, 0), new Point3d(-6.314719, -87.985281, 0), new Point3d(-14.8, -91.5, 0), new Point3d(-50.0, -91.5, 0), new Point3d(-50.0, -100.0, 0), new Point3d(50.0, -100.0, 0), new Point3d(50.0, -91.5, 0), new Point3d(14.8, -91.5, 0), new Point3d(6.314719, -87.985281, 0)
            };
            PolyCurve pc = new PolyCurve();

            pc.Append(new Line(points[0], points[1]));
            pc.Append(new Arc(points[1], points[2], points[3]));
            pc.Append(new Line(points[3], points[4]));
            pc.Append(new Line(points[4], points[5]));
            pc.Append(new Line(points[5], points[6]));
            pc.Append(new Line(points[6], points[7]));
            pc.Append(new Line(points[7], points[8]));
            pc.Append(new Arc(points[8], points[9], points[10]));
            pc.Append(new Line(points[10], points[11]));
            pc.Append(new Arc(points[11], points[12], points[13]));
            pc.Append(new Line(points[13], points[14]));
            pc.Append(new Line(points[14], points[15]));
            pc.Append(new Line(points[15], points[16]));
            pc.Append(new Line(points[16], points[17]));
            pc.Append(new Line(points[17], points[18]));
            pc.Append(new Arc(points[18], points[19], points[0]));
            IfcBoundedCurve boundedCurve = IfcBoundedCurve.ConvertCurve(md, pc);
            IfcArbitraryClosedProfileDef arbitraryClosedProfileDef = new IfcArbitraryClosedProfileDef("IPE200", boundedCurve);
            IfcAxis2Placement3D          axis2Placement3D          = new IfcAxis2Placement3D(new IfcCartesianPoint(md, 0, 0, 0), new IfcDirection(md, 0, 1, 0), new IfcDirection(md, 1, 0, 0));
            IfcExtrudedAreaSolid         extrudedAreaSolid         = new IfcExtrudedAreaSolid(arbitraryClosedProfileDef, axis2Placement3D, new IfcDirection(md, 0, 0, 1), 1000);

            return(new IfcBeam(building, extrudedAreaSolid)
            {
                GlobalId = "0EF5_zZRv0pQPddeofU3KT", Name = "ExampleBeamName", Description = "ExampleBeamDescription", Tag = "Tag"
            });
        }
 public override void IfcParse(int propIndex, IPropertyValue value)
 {
     switch (propIndex)
     {
         case 0:
         case 1:
             base.IfcParse(propIndex, value);
             break;
         case 2:
             _curve = (IfcBoundedCurve) value.EntityVal;
             break;
         default:
             this.HandleUnexpectedAttribute(propIndex, value); break;
     }
 }
        public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex)
        {
            switch (propIndex)
            {
            case 0:
            case 1:
                base.Parse(propIndex, value, nestedIndex);
                return;

            case 2:
                _curve = (IfcBoundedCurve)(value.EntityVal);
                return;

            default:
                throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper()));
            }
        }
        public override void IfcParse(int propIndex, IPropertyValue value)
        {
            switch (propIndex)
            {
            case 0:
            case 1:
                base.IfcParse(propIndex, value);
                break;

            case 2:
                _curve = (IfcBoundedCurve)value.EntityVal;
                break;

            default:
                this.HandleUnexpectedAttribute(propIndex, value); break;
            }
        }
        public override void IfcParse(int propIndex, IPropertyValue value)
        {
            switch (propIndex)
            {
            case 0:
            case 1:
                base.IfcParse(propIndex, value);
                break;

            case 2:
                _position = (IfcAxis2Placement3D)value.EntityVal;
                break;

            case 3:
                _polygonalBoundary = (IfcBoundedCurve)value.EntityVal;
                break;

            default:
                this.HandleUnexpectedAttribute(propIndex, value); break;
            }
        }
 public IfcCenterLineProfileDef(IfcProfileTypeEnum __ProfileType, IfcLabel?__ProfileName, IfcBoundedCurve __Curve, IfcPositiveLengthMeasure __Thickness)
     : base(__ProfileType, __ProfileName, __Curve)
 {
     this.Thickness = __Thickness;
 }
Exemple #11
0
        internal static void GenerateInstance(IfcBuilding building, bool openings)
        {
            DatabaseIfc db       = building.Database;
            IfcMaterial concrete = new IfcMaterial(db, "Concrete")
            {
                Category = "Concrete"
            };
            int thickness = 200;
            IfcMaterialLayer    materialLayer    = new IfcMaterialLayer(concrete, thickness, "Core");
            string              name             = thickness + "mm Concrete";
            IfcMaterialLayerSet materialLayerSet = new IfcMaterialLayerSet(materialLayer, name);

            db.NextObjectRecord = 300;
            IfcSlabType slabType = new IfcSlabType(name, materialLayerSet, IfcSlabTypeEnum.FLOOR);

            db.Context.AddDeclared(slabType);
            List <Coord2d> points = new List <Coord2d>()
            {
                new Coord2d(0, 0), new Coord2d(1000, 0), new Coord2d(1400, 2000), new Coord2d(1000, 4000), new Coord2d(0, 4000), new Coord2d(-400, 2000)
            };

            List <IfcSegmentIndexSelect> segments = new List <IfcSegmentIndexSelect>();

            segments.Add(new IfcLineIndex(1, 2));
            segments.Add(new IfcArcIndex(2, 3, 4));
            segments.Add(new IfcLineIndex(4, 5));
            segments.Add(new IfcArcIndex(5, 6, 1));
            IfcBoundedCurve          boundedCurve  = IfcBoundedCurve.Generate(db, points, segments);
            IfcMaterialLayerSetUsage layerSetUsage = new IfcMaterialLayerSetUsage(materialLayerSet, IfcLayerSetDirectionEnum.AXIS3, IfcDirectionSenseEnum.NEGATIVE, 0);
            IfcSlab slabStandardCase = new IfcSlabStandardCase(building, layerSetUsage, new IfcAxis2Placement3D(new IfcCartesianPoint(db, 0, 0, 0)), new IfcArbitraryClosedProfileDef("Slab Perimeter", boundedCurve))
            {
                RelatingType = slabType
            };

            slabStandardCase.RelatingType = slabType;
            if (openings)
            {
                IfcCircleProfileDef    cpd     = new IfcCircleProfileDef(db, "100DIA", 50);
                IfcExtrudedAreaSolid   eas     = new IfcExtrudedAreaSolid(cpd, new IfcAxis2Placement3D(new IfcCartesianPoint(db, 100, 300, -200)), new IfcDirection(db, 0, 0, 1), thickness);
                IfcOpeningStandardCase opening = new IfcOpeningStandardCase(slabStandardCase, null, eas)
                {
                    Name = "Opening"
                };
                IfcRectangleProfileDef rpd = new IfcRectangleProfileDef(db, "RecessRectangle", 500, 1000);
                eas = new IfcExtrudedAreaSolid(rpd, new IfcAxis2Placement3D(new IfcCartesianPoint(db, 500, 1000, -50)), new IfcDirection(db, 0, 0, 1), 50);
                IfcOpeningElement recess = new IfcOpeningElement(slabStandardCase, null, new IfcProductDefinitionShape(new IfcShapeRepresentation(eas)))
                {
                    Name = "Recess", PredefinedType = IfcOpeningElementTypeEnum.RECESS
                };

                //Unique ids assigned to generate constant IfcScript  sample files, remove otherwise
                opening.GlobalId = "15RSTHd8nFVQWMRE7og7sd";
                opening.VoidsElement.GlobalId = "0gqEDsyEzFXvY$fc_rUxyO";
                recess.GlobalId = "0w93HZ19H2D99zbAVNb4o2";
                recess.VoidsElement.GlobalId = "3iUkij4q1DmxlXuHzQVJaM";
            }

            //Unique ids assigned to generate constant IfcScript  sample files, remove otherwise
            slabType.GlobalId                    = "0RSW$KKbzCZ9QaSm3GoEan";
            slabStandardCase.GlobalId            = "1wAj$J2Az2V8wnBiVYd3bU";
            materialLayerSet.Associates.GlobalId = "2l_enLhI93reVwnim9gXUq";
            slabType.ObjectTypeOf.GlobalId       = "3wwDcmW5T3HfafURQewdD0";
            slabStandardCase.MaterialSelect.Associates.GlobalId = "3ESAzibgr9BvK9M75iV84w";
        }
Exemple #12
0
        internal static void GenerateInstance(IfcBuilding building, bool assembly)
        {
            DatabaseIfc          db = building.Database;
            IfcDocumentReference documentReference = new IfcDocumentReference(db)
            {
                Name = "MyReinforcementCode", Identification = "MyCodeISO3766"
            };
            IfcRelAssociatesDocument associatesDocument = new IfcRelAssociatesDocument(db.Project, documentReference)
            {
                GlobalId = "1R7R97$uLAAv4wci$KGwn8"
            };
            IfcMaterial material = new IfcMaterial(db, "ReinforcingSteel");
            List <Tuple <double, double, double> > points = new List <Tuple <double, double, double> >()
            {
                new Tuple <double, double, double>(-69.0, 0.0, -122.0), new Tuple <double, double, double>(-69.0, 0.0, -79.0), new Tuple <double, double, double>(-54.9411254969541, 0.0, -45.0588745030455), new Tuple <double, double, double>(-21.0, 0.0, -31.0), new Tuple <double, double, double>(21.0, 0.0, -31.0), new Tuple <double, double, double>(54.9411254969541, 0.0, -45.0588745030455), new Tuple <double, double, double>(69.0, 0.0, -78.9999999999999), new Tuple <double, double, double>(69.0, 0.00000000000000089, -321.0), new Tuple <double, double, double>(54.9939785957165, 1.21791490472034, -354.941125496954), new Tuple <double, double, double>(21.1804517666074, 4.15822158551252, -369.0), new Tuple <double, double, double>(-20.6616529376114, 7.79666547283599, -369.0), new Tuple <double, double, double>(-54.4751797667207, 10.7369721536282, -354.941125496954), new Tuple <double, double, double>(-68.4812011710042, 11.9548870583485, -321.0), new Tuple <double, double, double>(-69.0, 12.0, -79.0), new Tuple <double, double, double>(-54.9411254969541, 12.0, -45.0588745030455), new Tuple <double, double, double>(-21.0, 12.0, -31.0), new Tuple <double, double, double>(21.0, 12.0, -31.0), new Tuple <double, double, double>(54.9411254969541, 12.0, -45.0588745030455), new Tuple <double, double, double>(69.0, 12.0, -78.9999999999999), new Tuple <double, double, double>(69.0, 12.0, -122.0),
            };
            IfcBoundedCurve directrix = null;

            if (db.Release == ReleaseVersion.IFC2x3)
            {
                directrix = new IfcPolyline(db, points);
            }
            else
            {
                List <IfcSegmentIndexSelect> segments = new List <IfcSegmentIndexSelect>();
                segments.Add(new IfcLineIndex(1, 2));
                segments.Add(new IfcArcIndex(2, 3, 4));
                segments.Add(new IfcLineIndex(4, 5));
                segments.Add(new IfcArcIndex(5, 6, 7));
                segments.Add(new IfcLineIndex(7, 8));
                segments.Add(new IfcArcIndex(8, 9, 10));
                segments.Add(new IfcLineIndex(10, 11));
                segments.Add(new IfcArcIndex(11, 12, 13));
                segments.Add(new IfcLineIndex(13, 14));
                segments.Add(new IfcArcIndex(14, 15, 16));
                segments.Add(new IfcLineIndex(16, 17));
                segments.Add(new IfcArcIndex(17, 18, 19));
                segments.Add(new IfcLineIndex(19, 20));
                directrix = new IfcIndexedPolyCurve(new IfcCartesianPointList3D(db, points), segments);
            }
            double                barDiameter = 12, area = Math.PI * Math.Pow(barDiameter, 2) / 4;
            IfcSweptDiskSolid     sweptDiskSolid     = new IfcSweptDiskSolid(directrix, barDiameter / 2.0);
            IfcRepresentationMap  representationMap  = new IfcRepresentationMap(sweptDiskSolid);
            string                shapeCode          = ""; //Todo
            IfcReinforcingBarType reinforcingBarType = new IfcReinforcingBarType(db, "12 Diameter Ligature", IfcReinforcingBarTypeEnum.LIGATURE, barDiameter, area, 1150, IfcReinforcingBarSurfaceEnum.TEXTURED, shapeCode, null)
            {
                GlobalId = "0jMRtfHYXE7u4s_CQ2uVE9", MaterialSelect = material
            };

            reinforcingBarType.RepresentationMaps.Add(representationMap);
            db.Context.AddDeclared(reinforcingBarType);
            if (assembly)
            {
                IfcMaterial concrete = new IfcMaterial(db, "Concrete")
                {
                    Category = "Concrete"
                };
                string name = "400x200RC";
                IfcRectangleProfileDef rectangleProfileDef = new IfcRectangleProfileDef(db, name, 200, 400);
                IfcMaterialProfile     materialProfile     = new IfcMaterialProfile(name, concrete, rectangleProfileDef);

                IfcBeamType beamType = new IfcBeamType(name, materialProfile, IfcBeamTypeEnum.BEAM);
                db.Context.AddDeclared(beamType);
                IfcMaterialProfileSet materialProfileSet = beamType.MaterialSelect as IfcMaterialProfileSet;
                IfcBeam beam = new IfcBeam(building, new IfcLocalPlacement(building.Placement, new IfcAxis2Placement3D(new IfcCartesianPoint(db, 0, 0, 0))), null)
                {
                    Description = "Reinforced Beam"
                };
                IfcBeamStandardCase beamStandardCase = new IfcBeamStandardCase(beam, new IfcMaterialProfileSetUsage(materialProfileSet, IfcCardinalPointReference.TOPMID), new IfcAxis2Placement3D(new IfcCartesianPoint(db, 0, 0, 0), new IfcDirection(db, 0, 1, 0), new IfcDirection(db, -1, 0, 0)), 5000)
                {
                    GlobalId = "1yjQ2DwLnCC8k3i3X6D_ut", RelatingType = beamType
                };
                IfcElementAssembly elementAssembly = new IfcElementAssembly(beam, IfcAssemblyPlaceEnum.FACTORY, IfcElementAssemblyTypeEnum.REINFORCEMENT_UNIT);
                List <string>      ids             = new List <string>()
                {
                    "0ohBfsArr3ruXYxacT4yl5", "3YrK7RbE122fNRsP5djFAe", "0wxAc63nj5AezFhfks7wLL", "0bsov2wZL6tRRZmKy4vuUU", "3qrgfIBb92ZegJTle7jou3", "16m6R3JeT83fJPCze2yU$a", "2SGIIYjSbCuu3HVwoLt1yh", "0PsLby6eL8_hVEt4QwK0lZ", "1325VJou5AngWp1djcV0hL", "20zj_$BcH74xRgR4bDrLNb", "3M4SfEMtHEJukgZR4hw$eV", "23BYnIaOLBZPVTrKVEDJiy", "2XulRByDL8ugyo4Uqv9rJr", "2xvQMSga96XOT3VeCS6ZsK", "2gUE6_w3j77f8YJGz_2RMl", "0J0dRL4tT93REAabfASDom", "048RJ151b81PqODsTMD4EA", "3hXx9Kb6b5bvjgr9pwvpz0", "0FmUHg8ZX0ZfY$0f5nkM2l", "2_zvpwRdvAuRiTlHXX$Qp8", "1mhkXHKfX6PxdS2vZn17wX", "0CeIQzUqP5qOOeAjMtH2OX", "3shtoAQL5BAhvwA_1Ph$lC", "22j4RNKqD2IBRDGig5eaCF", "3Wvu6qGJH4ChhTV3pl9CGh", "37Qrf07Iz3tRMbSxEA4ynH", "2gelqZ1Wv8BvCy6TstVGkd", "1Q21dHc_X7eRppCHrT69Vb", "0e6Wc08NLD59ueqCAK1gxp", "3xdMOSZMj3cBOV_QTbXZha", "1r_U9JTkHDWwkv_nfWFHVe", "29I7_S2fT3WRD4zPH4YjmD", "0$ciATTaP17PJMHQD0$N3Y", "1irBeCCUf82wdGg7qTPCbW"
                };
                int jcounter = 0;
                for (int icounter = 25; icounter < 5000; icounter += 150)
                {
                    IfcElement element = reinforcingBarType.GenerateMappedItemElement(elementAssembly, new IfcCartesianTransformationOperator3D(db)
                    {
                        LocalOrigin = new IfcCartesianPoint(db, 0, icounter, 0)
                    });
                    //Unique ids assigned to generate constant IfcScript  sample files, remove otherwise
                    element.GlobalId = ids[jcounter++];
                }

                //Unique ids assigned to generate constant IfcScript  sample files, remove otherwise
                beam.GlobalId     = "1_KSmTR8T8bO37iRs24GkM";
                beamType.GlobalId = "3bdpqVuWTCbxJ2S3ODYv6q";
                beamType.ObjectTypeOf.GlobalId = "2oaQVVf79BrwRouvtRuQVg";
                beamType.MaterialSelect.Associates.GlobalId         = "2ZEgyI2v184hwa$_diRqS9";
                beamStandardCase.MaterialSelect.Associates.GlobalId = "3DWeleqqjEG9KshbOZXUdY";
                elementAssembly.GlobalId = "0Q1tCJWdj4kOkZUg7rkf2h";
                elementAssembly.IsDecomposedBy[0].GlobalId = "1WdB196Kb72f_pKgj5rklU";
                beam.IsDecomposedBy[0].GlobalId            = "1b1SnKocD0WRevlg8Aqhj5";
            }
            else
            {
                IfcElement element = reinforcingBarType.GenerateMappedItemElement(building, new IfcCartesianTransformationOperator3D(db));

                //Unique ids assigned to generate constant IfcScript  sample files, remove otherwise
                element.GlobalId = "0WUveBtSTDbunNjDLsuRn$";
            }

            //Unique ids assigned to generate constant IfcScript  sample files, remove otherwise

            reinforcingBarType.ObjectTypeOf.GlobalId = "1iAfl2ERbFmwi7uniy1H7j";
            reinforcingBarType.MaterialSelect.Associates.GlobalId = "3gfVO40P5EfQyKZ_bF0R$6";
        }
 public static IfcCenterLineProfileDef MakeCenterLineProfileDef(XbimModel m, IfcBoundedCurve curve, int thickness)
 {
     var cl = m.Instances.New<IfcCenterLineProfileDef>();
     cl.Thickness = thickness;
     cl.Curve = curve;
     return cl;
 }
Exemple #14
0
        internal static void GenerateData(STPModelData md, IfcBuilding building, bool assembly)
        {
            IfcDocumentReference     documentReference  = new IfcDocumentReference(md, "", "MyReinforcementCode", "MyCodeISO3766", "", null);
            IfcRelAssociatesDocument associatesDocument = new IfcRelAssociatesDocument(md.Project, documentReference);

            associatesDocument.GlobalId = "1R7R97$uLAAv4wci$KGwn8";
            IfcMaterial    material = new IfcMaterial(md, "ReinforcingSteel", "", "");
            List <Point3d> points   = new List <Point3d>()
            {
                new Point3d(-69.0, 0.0, -122.0), new Point3d(-69.0, 0.0, -79.0), new Point3d(-54.9411254969541, 0.0, -45.0588745030455), new Point3d(-21.0, 0.0, -31.0), new Point3d(21.0, 0.0, -31.0), new Point3d(54.9411254969541, 0.0, -45.0588745030455), new Point3d(69.0, 0.0, -78.9999999999999), new Point3d(69.0, 0.00000000000000089, -321.0), new Point3d(54.9939785957165, 1.21791490472034, -354.941125496954), new Point3d(21.1804517666074, 4.15822158551252, -369.0), new Point3d(-20.6616529376114, 7.79666547283599, -369.0), new Point3d(-54.4751797667207, 10.7369721536282, -354.941125496954), new Point3d(-68.4812011710042, 11.9548870583485, -321.0), new Point3d(-69.0, 12.0, -79.0), new Point3d(-54.9411254969541, 12.0, -45.0588745030455), new Point3d(-21.0, 12.0, -31.0), new Point3d(21.0, 12.0, -31.0), new Point3d(54.9411254969541, 12.0, -45.0588745030455), new Point3d(69.0, 12.0, -78.9999999999999), new Point3d(69.0, 12.0, -122.0),
            };
            PolyCurve pc = new PolyCurve();

            pc.Append(new Line(points[0], points[1]));
            pc.Append(new Arc(points[1], points[2], points[3]));
            pc.Append(new Line(points[3], points[4]));
            pc.Append(new Arc(points[4], points[5], points[6]));
            pc.Append(new Line(points[6], points[7]));
            pc.Append(new Arc(points[7], points[8], points[9]));
            pc.Append(new Line(points[9], points[10]));
            pc.Append(new Arc(points[10], points[11], points[12]));
            pc.Append(new Line(points[12], points[13]));
            pc.Append(new Arc(points[13], points[14], points[15]));
            pc.Append(new Line(points[15], points[16]));
            pc.Append(new Arc(points[16], points[17], points[18]));
            pc.Append(new Line(points[18], points[19]));
            IfcBoundedCurve directrix = IfcBoundedCurve.ConvertCurve(md, pc);

            double                barDiameter = 12, area = Math.PI * Math.Pow(barDiameter, 2) / 4;
            IfcSweptDiskSolid     sweptDiskSolid     = new IfcSweptDiskSolid(directrix, barDiameter / 2.0, 0);
            IfcRepresentationMap  representationMap  = new IfcRepresentationMap(sweptDiskSolid);
            string                shapeCode          = ""; //Todo
            IfcReinforcingBarType reinforcingBarType = new IfcReinforcingBarType(md, new IfcElemTypeParams("0jMRtfHYXE7u4s_CQ2uVE9", "12 Diameter Ligature", "", "", ""), material, representationMap, null, IfcReinforcingBarTypeEnum.LIGATURE, barDiameter, area, 1150, IfcReinforcingBarSurfaceEnum.TEXTURED, shapeCode, null);

            reinforcingBarType.ObjectTypeOf.GlobalId        = "1iAfl2ERbFmwi7uniy1H7j";
            reinforcingBarType.Material.Associates.GlobalId = "3gfVO40P5EfQyKZ_bF0R$6";
            if (assembly)
            {
                IfcMaterial            concrete            = new IfcMaterial(md, "Concrete", "", "Concrete");
                string                 name                = "400x200RC";
                IfcRectangleProfileDef rectangleProfileDef = new IfcRectangleProfileDef(md, IfcProfileTypeEnum.AREA, name, null, 400, 200);
                IfcMaterialProfile     materialProfile     = new IfcMaterialProfile(md, name, "", concrete, rectangleProfileDef, 0, "");

                IfcBeamType beamType = new IfcBeamType(md, new IfcElemTypeParams("3bdpqVuWTCbxJ2S3ODYv6q", name, "", "", ""), materialProfile, null, IfcBeamTypeEnum.BEAM);
                beamType.ObjectTypeOf.GlobalId        = "2oaQVVf79BrwRouvtRuQVg";
                beamType.Material.Associates.GlobalId = "2ZEgyI2v184hwa$_diRqS9";
                IfcBeamStandardCase beamStandardCase = new IfcBeamStandardCase(building, new IfcElemParams("1yjQ2DwLnCC8k3i3X6D_ut", "", "", "", ""), beamType, new Line(0, 0, 0, 0, 5000, 0), Vector3d.ZAxis, IfcCardinalPointReference.TOPMID, null);
                beamStandardCase.Material.Associates.GlobalId = "3DWeleqqjEG9KshbOZXUdY";
                IfcElementAssembly elementAssembly = new IfcElementAssembly(beamStandardCase, new IfcElemParams("0Q1tCJWdj4kOkZUg7rkf2h", "", "", "", ""), IfcAssemblyPlaceEnum.FACTORY, IfcElementAssemblyTypeEnum.REINFORCEMENT_UNIT);
                List <string>      ids             = new List <string>()
                {
                    "0ohBfsArr3ruXYxacT4yl5", "3YrK7RbE122fNRsP5djFAe", "0wxAc63nj5AezFhfks7wLL", "0bsov2wZL6tRRZmKy4vuUU", "3qrgfIBb92ZegJTle7jou3", "16m6R3JeT83fJPCze2yU$a", "2SGIIYjSbCuu3HVwoLt1yh", "0PsLby6eL8_hVEt4QwK0lZ", "1325VJou5AngWp1djcV0hL", "20zj_$BcH74xRgR4bDrLNb", "3M4SfEMtHEJukgZR4hw$eV", "23BYnIaOLBZPVTrKVEDJiy", "2XulRByDL8ugyo4Uqv9rJr", "2xvQMSga96XOT3VeCS6ZsK", "2gUE6_w3j77f8YJGz_2RMl", "0J0dRL4tT93REAabfASDom", "048RJ151b81PqODsTMD4EA", "3hXx9Kb6b5bvjgr9pwvpz0", "0FmUHg8ZX0ZfY$0f5nkM2l", "2_zvpwRdvAuRiTlHXX$Qp8", "1mhkXHKfX6PxdS2vZn17wX", "0CeIQzUqP5qOOeAjMtH2OX", "3shtoAQL5BAhvwA_1Ph$lC", "22j4RNKqD2IBRDGig5eaCF", "3Wvu6qGJH4ChhTV3pl9CGh", "37Qrf07Iz3tRMbSxEA4ynH", "2gelqZ1Wv8BvCy6TstVGkd", "1Q21dHc_X7eRppCHrT69Vb", "0e6Wc08NLD59ueqCAK1gxp", "3xdMOSZMj3cBOV_QTbXZha", "1r_U9JTkHDWwkv_nfWFHVe", "29I7_S2fT3WRD4zPH4YjmD", "0$ciATTaP17PJMHQD0$N3Y", "1irBeCCUf82wdGg7qTPCbW"
                };
                int jcounter = 0;
                for (int icounter = 25; icounter < 5000; icounter += 150)
                {
                    IfcElemParams ep = new IfcElemParams(ids[jcounter++], "", "", "", "");
                    reinforcingBarType.GenerateMappedItemElement(elementAssembly, new Plane(new Point3d(0, icounter, 0), Vector3d.XAxis, Vector3d.YAxis), ep);
                }
                elementAssembly.IsDecomposedBy[0].GlobalId = "1WdB196Kb72f_pKgj5rklU";
            }
            else
            {
                reinforcingBarType.GenerateMappedItemElement(building, Plane.WorldXY, new IfcElemParams("0WUveBtSTDbunNjDLsuRn$", "", "", "", ""));
            }
        }
Exemple #15
0
 public IfcPolygonalBoundedHalfSpace(IfcSurface __BaseSurface, Boolean __AgreementFlag, IfcAxis2Placement3D __Position, IfcBoundedCurve __PolygonalBoundary)
     : base(__BaseSurface, __AgreementFlag)
 {
     this._Position          = __Position;
     this._PolygonalBoundary = __PolygonalBoundary;
 }
 public override void IfcParse(int propIndex, IPropertyValue value)
 {
     switch (propIndex)
     {
         case 0:
         case 1:
             base.IfcParse(propIndex, value);
             break;
         case 2:
             _position = (IfcAxis2Placement3D) value.EntityVal;
             break;
         case 3:
             _polygonalBoundary = (IfcBoundedCurve) value.EntityVal;
             break;
         default:
             this.HandleUnexpectedAttribute(propIndex, value); break;
     }
 }
 public IfcArbitraryOpenProfileDef(IfcProfileTypeEnum __ProfileType, IfcLabel?__ProfileName, IfcBoundedCurve __Curve)
     : base(__ProfileType, __ProfileName)
 {
     this._Curve = __Curve;
 }
        public static IfcArbitraryOpenProfileDef MakeArbitraryOpenProfileDef(MemoryModel m, IfcBoundedCurve curve)
        {
            var def = m.Instances.New <IfcArbitraryOpenProfileDef>();

            def.Curve       = curve;
            def.ProfileType = IfcProfileTypeEnum.CURVE;
            return(def);
        }