}                                                                 // optional


        /// <summary>
        /// Construct a IfcMaterialLayerSetUsage with all required attributes.
        /// </summary>
        public IfcMaterialLayerSetUsage(IfcMaterialLayerSet forLayerSet, IfcLayerSetDirectionEnum layerSetDirection, IfcDirectionSenseEnum directionSense, IfcLengthMeasure offsetFromReferenceLine) : base()
        {
            ForLayerSet             = forLayerSet;
            LayerSetDirection       = layerSetDirection;
            DirectionSense          = directionSense;
            OffsetFromReferenceLine = offsetFromReferenceLine;
        }
Beispiel #2
0
        public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex)
        {
            switch (propIndex)
            {
            case 0:
                _forLayerSet = (IfcMaterialLayerSet)(value.EntityVal);
                return;

            case 1:
                _layerSetDirection = (IfcLayerSetDirectionEnum)System.Enum.Parse(typeof(IfcLayerSetDirectionEnum), value.EnumVal, true);
                return;

            case 2:
                _directionSense = (IfcDirectionSenseEnum)System.Enum.Parse(typeof(IfcDirectionSenseEnum), value.EnumVal, true);
                return;

            case 3:
                _offsetFromReferenceLine = value.RealVal;
                return;

            case 4:
                _referenceExtent = value.RealVal;
                return;

            default:
                throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper()));
            }
        }
 public IfcMaterialLayerSetUsage(IfcMaterialLayerSet __ForLayerSet, IfcLayerSetDirectionEnum __LayerSetDirection, IfcDirectionSenseEnum __DirectionSense, IfcLengthMeasure __OffsetFromReferenceLine)
 {
     this._ForLayerSet             = __ForLayerSet;
     this._LayerSetDirection       = __LayerSetDirection;
     this._DirectionSense          = __DirectionSense;
     this._OffsetFromReferenceLine = __OffsetFromReferenceLine;
 }
        public virtual void IfcParse(int propIndex, IPropertyValue value)
        {
            switch (propIndex)
            {
            case 0:
                _forLayerSet = (IfcMaterialLayerSet)value.EntityVal;
                break;

            case 1:
                _layerSetDirection =
                    (IfcLayerSetDirectionEnum)Enum.Parse(typeof(IfcLayerSetDirectionEnum), value.EnumVal, true);
                break;

            case 2:
                _directionSense =
                    (IfcDirectionSenseEnum)Enum.Parse(typeof(IfcDirectionSenseEnum), value.EnumVal, true);
                break;

            case 3:
                _offsetFromReferenceLine = value.RealVal;
                break;

            default:
                this.HandleUnexpectedAttribute(propIndex, value); break;
            }
        }
        /// <summary>
        ///   Set Material set usage and creates it if it doesn't exist.
        /// </summary>
        /// <param name = "forLayerSet">Material layer set for the usage</param>
        /// <param name = "layerSetDirection">Direction of the material layer set in the usage</param>
        /// <param name = "directionSense">Sense of the direction of the usage</param>
        /// <param name = "offsetFromReferenceLine">Offset from the reference line of the element</param>
        public static void SetMaterialLayerSetUsage(this IfcRoot element, IfcMaterialLayerSet forLayerSet,
                                                    IfcLayerSetDirectionEnum layerSetDirection,
                                                    IfcDirectionSenseEnum directionSense,
                                                    IfcLengthMeasure offsetFromReferenceLine)
        {
            IModel model = element.ModelOf;

            element.SetMaterialLayerSetUsage(model, forLayerSet, layerSetDirection, directionSense,
                                             offsetFromReferenceLine);
        }
        /// <summary>
        ///   Set Material set usage parameters and creates it if it doesn't exist.
        /// </summary>
        /// <param name = "model">Model of the element</param>
        /// <param name = "forLayerSet">Material layer set for the usage</param>
        /// <param name = "layerSetDirection">Direction of the material layer set in the usage</param>
        /// <param name = "directionSense">Sense of the direction of the usage</param>
        /// <param name = "offsetFromReferenceLine">Offset from the reference line of the element</param>
        public static void SetMaterialLayerSetUsage(this IfcRoot element, IModel model,
                                                    IfcMaterialLayerSet forLayerSet,
                                                    IfcLayerSetDirectionEnum layerSetDirection,
                                                    IfcDirectionSenseEnum directionSense,
                                                    IfcLengthMeasure offsetFromReferenceLine)
        {
            //if some input is not correct, material layer set usage is not created or changed
            if (element == null || forLayerSet == null)
            {
                return;
            }

            IfcMaterialLayerSetUsage materialUsage = element.GetOrCreateLayerSetUsage(model);

            materialUsage.ForLayerSet             = forLayerSet;
            materialUsage.LayerSetDirection       = layerSetDirection;
            materialUsage.DirectionSense          = directionSense;
            materialUsage.OffsetFromReferenceLine = offsetFromReferenceLine;
        }
 /// <summary>
 ///   Set Material set usage and creates it if it doesn't exist.
 /// </summary>
 /// <param name = "forLayerSet">Material layer set for the usage</param>
 /// <param name = "layerSetDirection">Direction of the material layer set in the usage</param>
 /// <param name = "directionSense">Sense of the direction of the usage</param>
 /// <param name = "offsetFromReferenceLine">Offset from the reference line of the element</param>
 public static void SetMaterialLayerSetUsage(this IfcRoot element, IfcMaterialLayerSet forLayerSet,
                                             IfcLayerSetDirectionEnum layerSetDirection,
                                             IfcDirectionSenseEnum directionSense,
                                             IfcLengthMeasure offsetFromReferenceLine)
 {
     IModel model = element.ModelOf;
     element.SetMaterialLayerSetUsage(model, forLayerSet, layerSetDirection, directionSense,
                                      offsetFromReferenceLine);
 }
        /// <summary>
        ///   Set Material set usage parameters and creates it if it doesn't exist.
        /// </summary>
        /// <param name = "model">Model of the element</param>
        /// <param name = "forLayerSet">Material layer set for the usage</param>
        /// <param name = "layerSetDirection">Direction of the material layer set in the usage</param>
        /// <param name = "directionSense">Sense of the direction of the usage</param>
        /// <param name = "offsetFromReferenceLine">Offset from the reference line of the element</param>
        public static void SetMaterialLayerSetUsage(this IfcRoot element, IModel model,
                                                    IfcMaterialLayerSet forLayerSet,
                                                    IfcLayerSetDirectionEnum layerSetDirection,
                                                    IfcDirectionSenseEnum directionSense,
                                                    IfcLengthMeasure offsetFromReferenceLine)
        {
            //if some input is not correct, material layer set usage is not created or changed
            if (element == null || forLayerSet == null) return;

            IfcMaterialLayerSetUsage materialUsage = element.GetOrCreateLayerSetUsage(model);
            materialUsage.ForLayerSet = forLayerSet;
            materialUsage.LayerSetDirection = layerSetDirection;
            materialUsage.DirectionSense = directionSense;
            materialUsage.OffsetFromReferenceLine = offsetFromReferenceLine;
        }
 public virtual void IfcParse(int propIndex, IPropertyValue value)
 {
     switch (propIndex)
     {
         case 0:
             _forLayerSet = (IfcMaterialLayerSet) value.EntityVal;
             break;
         case 1:
             _layerSetDirection =
                 (IfcLayerSetDirectionEnum) Enum.Parse(typeof (IfcLayerSetDirectionEnum), value.EnumVal, true);
             break;
         case 2:
             _directionSense =
                 (IfcDirectionSenseEnum) Enum.Parse(typeof (IfcDirectionSenseEnum), value.EnumVal, true);
             break;
         case 3:
             _offsetFromReferenceLine = value.RealVal;
             break;
         default:
             this.HandleUnexpectedAttribute(propIndex, value); break;
     }
 }
Beispiel #10
0
		internal IfcMaterialLayerSetUsage(DatabaseIfc m, IfcMaterialLayerSet ls, IfcLayerSetDirectionEnum dir, IfcDirectionSenseEnum sense, double offset) : base(m)
		{
			mForLayerSet = ls.mIndex;
			mLayerSetDirection = dir;
			mDirectionSense = sense;
			mOffsetFromReferenceLine = offset;
		}
Beispiel #11
0
		internal IfcMaterialLayerSetUsage(IfcMaterialLayerSetUsage m) : base(m) { mForLayerSet = m.mForLayerSet; mLayerSetDirection = m.mLayerSetDirection; mDirectionSense = m.mDirectionSense; mOffsetFromReferenceLine = m.mOffsetFromReferenceLine; mReferenceExtent = m.mReferenceExtent; }
Beispiel #12
0
 public IfcMaterialLayerSetUsage(IfcMaterialLayerSet __ForLayerSet, IfcLayerSetDirectionEnum __LayerSetDirection, IfcDirectionSenseEnum __DirectionSense, IfcLengthMeasure __OffsetFromReferenceLine, IfcPositiveLengthMeasure?__ReferenceExtent)
 {
     this.ForLayerSet             = __ForLayerSet;
     this.LayerSetDirection       = __LayerSetDirection;
     this.DirectionSense          = __DirectionSense;
     this.OffsetFromReferenceLine = __OffsetFromReferenceLine;
     this.ReferenceExtent         = __ReferenceExtent;
 }