Exemplo n.º 1
0
        public static BbListProperty Create(string name, bool value)
        {
            BbListProperty sp = new BbListProperty(name, value);

            BbInstanceDB.AddToExport(sp);
            return(sp);
        }
Exemplo n.º 2
0
        public static BbListProperty Create(string name, double value, Type type)
        {
            BbListProperty sp = new BbListProperty(name, value, type);

            BbInstanceDB.AddToExport(sp);
            return(sp);
        }
Exemplo n.º 3
0
        public void AddProperties(
            BbPropertySet bbPropertySet,
            string boltStandard, string boltType, string boltGrade,

            double?boltDiameter, double?boltLength, bool?boltFiledAssembled)
        {
            if (BbPropertySet == null)
            {
                BbPropertySet = bbPropertySet;
            }
            if (!string.IsNullOrWhiteSpace(boltStandard))
            {
                BoltStandard = boltStandard;
                bbPropertySet.AddProperty(BbSingleProperty.Create("BoltStandard", BoltStandard, true));
            }

            if (!string.IsNullOrEmpty(boltGrade))
            {
                BoltGrade.Add(boltGrade);
                bbPropertySet.AddProperty(BbListProperty.Create("BoltGrade", boltGrade, typeof(IfcLabel)));
            }


            if (!string.IsNullOrWhiteSpace(boltType))
            {
                BoltType = boltType;
                bbPropertySet.AddProperty(BbSingleProperty.Create("BoltType", BoltType, true));
            }


            if (boltDiameter != null)
            {
                BoltDiameter = boltDiameter.Value;
                bbPropertySet.AddProperty(BbSingleProperty.Create("BoltDiameter", BoltDiameter, typeof(IfcPositiveLengthMeasure)));
            }
            else
            {
                BoltDiameter = 0.0;
            }

            if (boltFiledAssembled != null)
            {
                BoltFiledAssembled = boltFiledAssembled.Value;
                bbPropertySet.AddProperty(BbSingleProperty.Create("BoltFiledAssembled", BoltFiledAssembled));
            }
            else
            {
                BoltDiameter = 0.0;
            }

            if (boltLength != null)
            {
                BoltLength = boltLength.Value;
                bbPropertySet.AddProperty(BbSingleProperty.Create("BoltLength", BoltLength, typeof(IfcPositiveLengthMeasure)));
            }
            else
            {
                BoltLength = 0.0;
            }
        }
Exemplo n.º 4
0
 protected BbDrawingNumber(
     BbPropertySet bbPropertySet,
     List <string> drawingNumbers)
 {
     BbPropertySet = bbPropertySet;
     foreach (var drawingNumber in drawingNumbers)
     {
         if (!string.IsNullOrWhiteSpace(drawingNumber))
         {
             DrawingNumber.Add(drawingNumber);
         }
     }
     bbPropertySet.AddProperty(BbListProperty.Create("Drawing Number", DrawingNumber, typeof(IfcIdentifier)));
 }
Exemplo n.º 5
0
        protected BbSurfaceTreatmentProperty(
            BbPropertySet bbPropertySet,
            List <string> sequentialOrders)
        {
            BbPropertySet = bbPropertySet;
            foreach (var sequentialOrder in sequentialOrders)
            {
                if (!string.IsNullOrWhiteSpace(sequentialOrder))
                {
                    SequentialOrder.Add(sequentialOrder);
                }
            }

            bbPropertySet.AddProperty(BbListProperty.Create("Sequential Order", SequentialOrder, typeof(IfcIdentifier)));
        }
Exemplo n.º 6
0
 public static BbListProperty Create(string name, bool value)
 {
     BbListProperty sp = new BbListProperty(name, value);
     BbInstanceDB.AddToExport(sp);
     return sp;
 }
Exemplo n.º 7
0
 public static BbListProperty Create(string name, IList<string> values, Type type)
 {
     BbListProperty sp = new BbListProperty(name, values, type);
     BbInstanceDB.AddToExport(sp);
     return sp;
 }
Exemplo n.º 8
0
        public void AddProperties(
            BbPropertySet bbPropertySet,
            string weldId, string weldDescription,
            string wpsCode, string weldCategory,
            string weldGrade,
            double?weldLength, bool?fieldWeld)
        {
            if (BbPropertySet == null)
            {
                BbPropertySet = bbPropertySet;
            }
            if (!string.IsNullOrWhiteSpace(weldId))
            {
                WeldID = weldId;
                bbPropertySet.AddProperty(BbSingleProperty.Create("WeldID", WeldID, true));
            }

            if (!string.IsNullOrWhiteSpace(weldDescription))
            {
                WeldDescription = weldDescription;
                bbPropertySet.AddProperty(BbSingleProperty.Create("WeldDescription", WeldDescription, true));
            }

            if (!string.IsNullOrWhiteSpace(wpsCode))
            {
                WPSCode = wpsCode;
                bbPropertySet.AddProperty(BbSingleProperty.Create("WPSCode", WPSCode, true));
            }

            if (!string.IsNullOrWhiteSpace(weldCategory))
            {
                WeldCategory = weldCategory;
                bbPropertySet.AddProperty(BbSingleProperty.Create("WeldCategory", WeldCategory, true));
            }

            if (!string.IsNullOrEmpty(weldGrade))
            {
                WeldGrade.Add(weldGrade);
                bbPropertySet.AddProperty(BbListProperty.Create("WeldGrade", weldGrade, typeof(IfcLabel)));
            }

            if (weldLength != null)
            {
                WeldLength = weldLength.Value;
                bbPropertySet.AddProperty(BbSingleProperty.Create("WeldLength", WeldLength, typeof(IfcPositiveLengthMeasure)));
            }
            else
            {
                WeldLength = 0.0;
            }

            if (fieldWeld != null)
            {
                FieldWeld = fieldWeld.Value;
                bbPropertySet.AddProperty(BbSingleProperty.Create("FieldWeld", FieldWeld));
            }
            else
            {
                WeldLength = 0.0;
            }
        }