Пример #1
0
 public override void IfcParse(int propIndex, IPropertyValue value)
 {
     switch (propIndex)
     {
         case 0:
             _sizeInX = value.RealVal;
             break;
         case 1:
             _sizeInY = value.RealVal;
             break;
         default:
             this.HandleUnexpectedAttribute(propIndex, value); break;
     }
 }
Пример #2
0
 public override void IfcParse(int propIndex, IPropertyValue value)
 {
     switch (propIndex)
     {
         case 0:
         case 1:
         case 2:
             base.IfcParse(propIndex, value);
             break;
         case 3:
             _lengthValue = value.RealVal;
             break;
         default:
             this.HandleUnexpectedAttribute(propIndex, value); break;
     }
 }
Пример #3
0
 public IfcVector(double x, double y, IfcLengthMeasure magnitude)
 {
     _orientation = new IfcDirection(x, y);
     _magnitude = magnitude;
 }
Пример #4
0
 public IfcVector(IfcDirection dir, IfcLengthMeasure magnitude)
 {
     _orientation = dir;
     _magnitude = magnitude;
 }
Пример #5
0
 public override void IfcParse(int propIndex, IPropertyValue value)
 {
     switch (propIndex)
     {
         case 0:
             _orientation = (IfcDirection) value.EntityVal;
             break;
         case 1:
             _magnitude = value.RealVal;
             break;
         default:
             this.HandleUnexpectedAttribute(propIndex, value); break;
     }
 }
Пример #6
0
 /// <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);
 }
Пример #7
0
        /// <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;
     }
 }
        public override void IfcParse(int propIndex, IPropertyValue value)
        {
            switch (propIndex)
            {
                case 0:
                case 1:
                case 2:
                    base.IfcParse(propIndex, value);
                    break;
                case 3:
                    _bottomXDim = value.RealVal;
                    break;
                case 4:
                    _topXDim = value.RealVal;
                    break;
                case 5:
                    _yDim = value.RealVal;
                    break;
                case 6:
                    _topXOffset = value.RealVal;
                    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:
             _extrudedDirection = (IfcDirection) value.EntityVal;
             break;
         case 3:
             _depth = value.RealVal;
             break;
         default:
             this.HandleUnexpectedAttribute(propIndex, value); break;
     }
 }
        public virtual void IfcParse(int propIndex, IPropertyValue value)
        {
            switch (propIndex)
            {
                case 0:
                    _visibleSegmentLength = value.RealVal;
                    break;
                case 1:
                    _invisibleSegmentLength = value.RealVal;
                    break;

                default:
                    this.HandleUnexpectedAttribute(propIndex, value); break;
            }
        }
 public virtual void IfcParse(int propIndex, IPropertyValue value)
 {
     switch (propIndex)
     {
         case 0:
             _longitudinalStartPosition = value.RealVal;
             break;
         case 1:
             _longitudinalEndPosition = value.RealVal;
             break;
         case 2:
             _transversePosition = value.RealVal;
             break;
         case 3:
             _reinforcementRole =
                 (IfcReinforcingBarRoleEnum)
                 Enum.Parse(typeof (IfcReinforcingBarRoleEnum), value.EnumVal, true);
             break;
         case 4:
             _crossSectionArea = (IfcSectionProperties) value.EntityVal;
             break;
         case 5:
             ((IXbimNoNotifyCollection)_crossSectionReinforcementDefinitions).Add((IfcReinforcementBarProperties) value.EntityVal);
             break;
         default:
             this.HandleUnexpectedAttribute(propIndex, value); break;
     }
 }
Пример #13
0
 public override void IfcParse(int propIndex, IPropertyValue value)
 {
     switch (propIndex)
     {
         case 0:
             _basisCurve = (IfcCurve) value.EntityVal;
             break;
         case 1:
             _distance = value.RealVal;
             break;
         case 2:
             _selfIntersect = value.BooleanVal;
             break;
         case 3:
             _refDirection = (IfcDirection) value.EntityVal;
             break;
         default:
             this.HandleUnexpectedAttribute(propIndex, value); break;
     }
 }
 private static double pita(IfcPositiveLengthMeasure cat1, IfcLengthMeasure cat2)
 {
     return Math.Sqrt(Math.Pow(cat1, 2) + Math.Pow(cat2, 2)); 
 }