Пример #1
0
        public static IfcValue GetPropertyTableItemValue(this Xbim.Ifc2x3.Kernel.IfcObject obj, string pSetName, string propertyTableName, IfcValue definingValue)
        {
            IfcPropertyTableValue table = GetPropertyTableValue(obj, pSetName, propertyTableName);

            if (table == null)
            {
                return(null);
            }
            XbimList <IfcValue> definingValues = table.DefiningValues;

            if (definingValues == null)
            {
                return(null);
            }
            if (!definingValues.Contains(definingValue))
            {
                return(null);
            }
            int index = definingValues.IndexOf(definingValue);

            if (table.DefinedValues.Count < index + 1)
            {
                return(null);
            }
            return(table.DefinedValues[index]);
        }
        public override void IfcParse(int propIndex, IPropertyValue value)
        {
            switch (propIndex)
            {
            case 0:
                base.IfcParse(propIndex, value);
                break;

            case 1:
                if (_fontFamily == null)
                {
                    _fontFamily = new XbimList <IfcTextFontName>(this);
                }
                if (value.Type == IfcParserType.String)
                {
                    _fontFamily.Add(new IfcTextFontName(value.StringVal));
                }
                else
                {
                    _fontFamily.Add((IfcTextFontName)value.EntityVal);
                }
                break;

            case 2:
                _fontStyle = value.StringVal;
                break;

            case 3:
                _fontVariant = value.StringVal;
                break;

            case 4:
                _fontWeight = value.StringVal;
                break;

            case 5:
                _fontSize = (IfcSizeSelect)value.EntityVal;
                break;

            default:
                this.HandleUnexpectedAttribute(propIndex, value); break;
            }
        }
Пример #3
0
        public static Dictionary <IfcValue, IfcValue> GetAsDictionary(this IfcPropertyTableValue table)
        {
            Dictionary <IfcValue, IfcValue> result         = new Dictionary <IfcValue, IfcValue>();
            XbimList <IfcValue>             definingValues = table.DefiningValues;
            XbimList <IfcValue>             definedValues  = table.DefinedValues;

            if (definedValues == null || definingValues == null)
            {
                return(result);
            }
            int count = definingValues.Count;

            if (count != definedValues.Count)
            {
                throw new Exception(
                          "Inconsistent properties table. Number of defined and defining values are different.");
            }

            for (int i = 0; i < count; i++)
            {
                result.Add(definingValues[i], definedValues[i]);
            }
            return(result);
        }
 public IfcRelConnectsPathElements()
 {
     _relatingPriorities = new XbimList<long>(this);
     _relatedPriorities = new XbimList<long>(this);
 }
 public IfcRegularTimeSeries()
 {
     _values = new XbimList<IfcTimeSeriesValue>(this);
 }
Пример #6
0
 public IfcMaterialList()
 {
     _materials = new XbimList <IfcMaterial>(this);
 }
 public IfcProductRepresentation()
 {
     _representations = new XbimList<IfcRepresentation>(this);
 }
 public IfcPropertyTableValue()
 {
     _definingValues = new XbimList<IfcValue>(this);
     _definedValues = new XbimList<IfcValue>(this);
 }
 public IfcIrregularTimeSeriesValue()
 {
     _listValues = new XbimList<IfcValue>(this);
 }
 public IfcPropertyListValue(IfcIdentifier name)
     : base(name)
 {
     _listValues = new XbimList<IfcValue>(this);
 }
Пример #11
0
 public IfcCurveStyleFont()
 {
     _patternList = new XbimList<IfcCurveStyleFontPattern>(this);
 }
Пример #12
0
 public IfcTableRow()
 {
     _rowCells = new XbimList <IfcValue>(this);
 }
Пример #13
0
 public IfcSectionedSpine()
 {
     _crossSections         = new XbimList <IfcProfileDef>(this);
     _crossSectionPositions = new XbimList <IfcAxis2Placement3D>(this);
 }
Пример #14
0
 public IfcProductRepresentation()
 {
     _representations = new XbimList <IfcRepresentation>(this);
 }
 public IfcPropertyEnumeration()
 {
     _enumerationValues = new XbimList <IfcValue>(this);
 }
 public IfcSurfaceStyleWithTextures()
 {
     _textures = new XbimList <IfcSurfaceTexture>(this);
 }
Пример #17
0
 public IfcMaterialList()
 {
     _materials = new XbimList<IfcMaterial>(this);
 }
 public IfcReinforcementDefinitionProperties()
 {
     _reinforcementSectionDefinitions = new XbimList <IfcSectionReinforcementProperties>(this);
 }
Пример #19
0
 public IfcRationalBezierCurve()
 {
     _weightsData = new XbimList <double>(this);
 }
 public IfcStructuralSurfaceMemberVarying()
 {
     _subsequentThickness = new XbimList<IfcPositiveLengthMeasure>(this);
 }
Пример #21
0
 public IfcEdgeLoop()
 {
     _edgeList = new XbimList <IfcOrientedEdge>(this, 4);
 }
Пример #22
0
 public IfcTable()
 {
     _rows = new XbimList <IfcTableRow>(this);
 }
 public IfcReinforcementDefinitionProperties()
 {
     _reinforcementSectionDefinitions = new XbimList<IfcSectionReinforcementProperties>(this);
 }
 public IfcRelServicesBuildings()
 {
     _relatedBuildings = new XbimList <IfcSpatialStructureElement>(this);
 }
 public IfcVirtualGridIntersection()
 {
     _intersectingAxes = new XbimListUnique<IfcGridAxis>(this);
     _offsetDistances = new XbimList<IfcLengthMeasure>(this);
 }
Пример #26
0
 public IfcPropertyTableValue()
 {
     _definingValues = new XbimList <IfcValue>(this);
     _definedValues  = new XbimList <IfcValue>(this);
 }
        public override void IfcParse(int propIndex, IPropertyValue value)
        {
            switch (propIndex)
            {
                case 0:
                    base.IfcParse(propIndex, value);
                    break;
                case 1:
                    if (_fontFamily == null) _fontFamily = new XbimList<IfcTextFontName>(this);
                    if (value.Type == IfcParserType.String)
                        _fontFamily.Add(new IfcTextFontName(value.StringVal));
                    else

                        _fontFamily.Add((IfcTextFontName)value.EntityVal);
                    break;
                case 2:
                    _fontStyle = value.StringVal;
                    break;
                case 3:
                    _fontVariant = value.StringVal;
                    break;
                case 4:
                    _fontWeight = value.StringVal;
                    break;
                case 5:
                    _fontSize = (IfcSizeSelect) value.EntityVal;
                    break;
                default:
                    this.HandleUnexpectedAttribute(propIndex, value); break;
            }
        }
 public IfcRelServicesBuildings()
 {
     _relatedBuildings = new XbimList<IfcSpatialStructureElement>(this);
 }
 public IfcRationalBezierCurve()
 {
     _weightsData = new XbimList<double>(this);
 }
Пример #30
0
 public IfcSectionedSpine()
 {
     _crossSections = new XbimList<IfcProfileDef>(this);
     _crossSectionPositions = new XbimList<IfcAxis2Placement3D>(this);
 }
 public IfcSurfaceStyleWithTextures()
 {
     _textures = new XbimList<IfcSurfaceTexture>(this);
 }
 public IfcVirtualGridIntersection()
 {
     _intersectingAxes = new XbimListUnique <IfcGridAxis>(this);
     _offsetDistances  = new XbimList <IfcLengthMeasure>(this);
 }
Пример #33
0
 public IfcTableRow()
 {
     _rowCells = new XbimList<IfcValue>(this);
 }
Пример #34
0
 public IfcIrregularTimeSeriesValue()
 {
     _listValues = new XbimList <IfcValue>(this);
 }
 public IfcPropertyListValue()
 {
     _listValues = new XbimList<IfcValue>(this);
 }
Пример #36
0
 public IfcPropertyListValue()
 {
     _listValues = new XbimList <IfcValue>(this);
 }
 public IfcStructuralSurfaceMemberVarying()
 {
     _subsequentThickness = new XbimList <IfcPositiveLengthMeasure>(this);
 }
Пример #38
0
 public IfcPropertyListValue(IfcIdentifier name)
     : base(name)
 {
     _listValues = new XbimList <IfcValue>(this);
 }
Пример #39
0
 public IfcEdgeLoop()
 {
     _edgeList = new XbimList<IfcOrientedEdge>(this, 4);
 }
Пример #40
0
 public IfcTimeSeriesValue()
 {
     _listValues = new XbimList<object>(this);
 }
Пример #41
0
 public IfcTimeSeriesValue()
 {
     _listValues = new XbimList <object>(this);
 }
Пример #42
0
 public IfcCurveStyleFont()
 {
     _patternList = new XbimList <IfcCurveStyleFontPattern>(this);
 }
Пример #43
0
 public IfcPropertyEnumeration()
 {
     _enumerationValues = new XbimList<IfcValue>(this);
 }
Пример #44
0
 public IfcRegularTimeSeries()
 {
     _values = new XbimList <IfcTimeSeriesValue>(this);
 }
Пример #45
0
 public IfcTable()
 {
     _rows = new XbimList<IfcTableRow>(this);
 }
 public IfcRelConnectsPathElements()
 {
     _relatingPriorities = new XbimList <long>(this);
     _relatedPriorities  = new XbimList <long>(this);
 }