コード例 #1
0
        public static string getFileSchemaFromHeader(Pointer paramPointer)
        {
            PointerByReference pointerByReference = new PointerByReference();

            IfcEngineInterface_Fields.INSTANCE.GetSPFFHeaderItem(paramPointer, 9, 0, 10, pointerByReference);
            return("" + pointerByReference.Value.getString(0L));
        }
コード例 #2
0
        public static string getStringAttributeBN(Pointer paramPointer, string paramString)
        {
            PointerByReference pointerByReference = new PointerByReference();

            IfcEngineInterface_Fields.INSTANCE.sdaiGetAttrBN(paramPointer, paramString, 10, pointerByReference);
            return((pointerByReference.Value == null) ? "" : pointerByReference.Value.getString(0L));
        }
コード例 #3
0
        public static string getPreprocessorVersionFromHeader(Pointer paramPointer)
        {
            PointerByReference pointerByReference = new PointerByReference();

            IfcEngineInterface_Fields.INSTANCE.GetSPFFHeaderItem(paramPointer, 6, 0, 10, pointerByReference);
            return("" + pointerByReference.Value.getString(0L));
        }
コード例 #4
0
        public static Pointer getInstanceAttributeBN(Pointer paramPointer, string paramString)
        {
            PointerByReference pointerByReference = new PointerByReference();

            IfcEngineInterface_Fields.INSTANCE.sdaiGetAttrBN(paramPointer, paramString, 6, pointerByReference);
            return(pointerByReference.Value);
        }
コード例 #5
0
        public static string getTypeNameOfInstance(Pointer paramPointer)
        {
            Pointer            pointer            = IfcEngineInterface_Fields.INSTANCE.sdaiGetInstanceType(paramPointer);
            PointerByReference pointerByReference = new PointerByReference();

            IfcEngineInterface_Fields.INSTANCE.engiGetEntityName(pointer, 10, pointerByReference);
            return(pointerByReference.Value.getString(0L));
        }
コード例 #6
0
        public static IList <Pointer> getContainedEntities(Pointer paramPointer1, Pointer paramPointer2, string paramString)
        {
            string str1 = IfcEngineInterface_Fields.INSTANCE.sdaiGetEntity(paramPointer1, "IFCRELCONTAINEDINSPATIALSTRUCTURE").ToString();
            string str2 = null;

            if (!string.ReferenceEquals(paramString, null))
            {
                str2 = IfcEngineInterface_Fields.INSTANCE.sdaiGetEntity(paramPointer1, paramString).ToString();
            }
            LinkedList         linkedList         = new LinkedList();
            PointerByReference pointerByReference = new PointerByReference();
            int i = 0;

            IfcEngineInterface_Fields.INSTANCE.sdaiGetAttrBN(paramPointer2, "ContainsElements", 2, pointerByReference);
            if (pointerByReference.Value != null)
            {
                i = IfcEngineInterface_Fields.INSTANCE.sdaiGetMemberCount(pointerByReference.Value);
                if (i != 0)
                {
                    for (sbyte b = 0; b < i; b++)
                    {
                        PointerByReference pointerByReference1 = new PointerByReference();
                        IfcEngineInterface_Fields.INSTANCE.engiGetAggrElement(pointerByReference.Value, b, 6, pointerByReference1);
                        if (IfcEngineInterface_Fields.INSTANCE.sdaiGetInstanceType(pointerByReference1.Value).ToString().Equals(str1))
                        {
                            PointerByReference pointerByReference2 = new PointerByReference();
                            int j = 0;
                            IfcEngineInterface_Fields.INSTANCE.sdaiGetAttrBN(pointerByReference1.Value, "RelatedElements", 2, pointerByReference2);
                            j = IfcEngineInterface_Fields.INSTANCE.sdaiGetMemberCount(pointerByReference2.Value);
                            for (sbyte b1 = 0; b1 < j; b1++)
                            {
                                PointerByReference pointerByReference3 = new PointerByReference();
                                IfcEngineInterface_Fields.INSTANCE.engiGetAggrElement(pointerByReference2.Value, b1, 6, pointerByReference3);
                                if (string.ReferenceEquals(str2, null))
                                {
                                    linkedList.AddLast(pointerByReference3.Value);
                                }
                                else if (IfcEngineInterface_Fields.INSTANCE.sdaiGetInstanceType(pointerByReference3.Value).ToString().Equals(str2))
                                {
                                    linkedList.AddLast(pointerByReference3.Value);
                                }
                            }
                        }
                        else
                        {
                            Console.Error.WriteLine("IFCWARN: getContainedElements found items not of " + pointerByReference + " type.");
                        }
                    }
                }
            }
            return(linkedList);
        }
コード例 #7
0
        public static IList <Pointer> getEntities(Pointer paramPointer, string paramString)
        {
            Pointer       pointer   = IfcEngineInterface_Fields.INSTANCE.sdaiGetEntityExtentBN(paramPointer, paramString);
            int           i         = IfcEngineInterface_Fields.INSTANCE.sdaiGetMemberCount(pointer);
            List <object> arrayList = new List <object>(i);

            if (i != 0)
            {
                Pointer pointer1 = IfcEngineInterface_Fields.INSTANCE.sdaiGetEntity(paramPointer, "IFCBUILDING");
                for (sbyte b = 0; b < i; b++)
                {
                    PointerByReference pointerByReference = new PointerByReference();
                    IfcEngineInterface_Fields.INSTANCE.engiGetAggrElement(pointer, b, 6, pointerByReference);
                    arrayList.Add(pointerByReference.Value);
                }
            }
            return(arrayList);
        }
コード例 #8
0
        public static double?getDoubleViaADBAsFirstElementInAGGRAttributeBN(Pointer paramPointer, string paramString)
        {
            PointerByReference pointerByReference = new PointerByReference();

            IfcEngineInterface_Fields.INSTANCE.sdaiGetAttrBN(paramPointer, paramString, 2, pointerByReference);
            if (pointerByReference.Value != null)
            {
                int i = IfcEngineInterface_Fields.INSTANCE.sdaiGetMemberCount(pointerByReference.Value);
                if (i > 0)
                {
                    PointerByReference pointerByReference1 = new PointerByReference();
                    IfcEngineInterface_Fields.INSTANCE.engiGetAggrElement(pointerByReference.Value, 0, 1, pointerByReference1);
                    DoubleByReference doubleByReference = new DoubleByReference();
                    IfcEngineInterface_Fields.INSTANCE.sdaiGetADBValue(pointerByReference1.Value, 9, doubleByReference);
                    return(Convert.ToDouble(doubleByReference.Value));
                }
            }
            return(Convert.ToDouble(0.0D));
        }
コード例 #9
0
        public static string getPathViaADBAsFirstElementInAGGRAttributeBN(Pointer paramPointer, string paramString)
        {
            PointerByReference pointerByReference = new PointerByReference();

            IfcEngineInterface_Fields.INSTANCE.sdaiGetAttrBN(paramPointer, paramString, 2, pointerByReference);
            if (pointerByReference.Value != null)
            {
                int i = IfcEngineInterface_Fields.INSTANCE.sdaiGetMemberCount(pointerByReference.Value);
                if (i > 0)
                {
                    PointerByReference pointerByReference1 = new PointerByReference();
                    IfcEngineInterface_Fields.INSTANCE.engiGetAggrElement(pointerByReference.Value, 0, 1, pointerByReference1);
                    PointerByReference pointerByReference2 = new PointerByReference();
                    IfcEngineInterface_Fields.INSTANCE.sdaiGetADBTypePathx(pointerByReference1.Value, 10, pointerByReference2);
                    return(pointerByReference2.Value.getString(0L));
                }
            }
            return(null);
        }
コード例 #10
0
        public static IList <Pointer> getSetAttributeOfADBBN(Pointer paramPointer, string paramString)
        {
            System.Collections.IList list = Collections.EMPTY_LIST;
            PointerByReference       pointerByReference = new PointerByReference();

            IfcEngineInterface_Fields.INSTANCE.sdaiGetAttrBN(paramPointer, paramString, 2, pointerByReference);
            if (pointerByReference.Value != null)
            {
                int i = IfcEngineInterface_Fields.INSTANCE.sdaiGetMemberCount(pointerByReference.Value);
                list = new List <object>(i);
                for (sbyte b = 0; b < i; b++)
                {
                    PointerByReference pointerByReference1 = new PointerByReference();
                    IfcEngineInterface_Fields.INSTANCE.engiGetAggrElement(pointerByReference.Value, b, 1, pointerByReference1);
                    if (pointerByReference1.Value != null)
                    {
                        list.Add(pointerByReference1.Value);
                    }
                }
            }
            return(list);
        }
コード例 #11
0
        public virtual BIMProperty getEnumeratedPropertyValue(Pointer paramPointer)
        {
            string str1 = IfcEngineUtils.getStringAttributeBN(paramPointer, "Name");

            System.Collections.IList list = IfcEngineUtils.getSetAttributeOfADBBN(paramPointer, "EnumerationValues");
            string str2 = null;

            foreach (Pointer pointer in list)
            {
                PointerByReference pointerByReference = new PointerByReference();
                IfcEngineInterface_Fields.INSTANCE.sdaiGetADBValue(pointer, 10, pointerByReference);
                if (!string.ReferenceEquals(str2, null))
                {
                    str2 = pointerByReference.Value.getString(0L);
                    continue;
                }
                str2 = str2 + ", " + pointerByReference.Value.getString(0L);
            }
            if (!string.ReferenceEquals(str2, null))
            {
                str2 = "";
            }
            return(new BIMProperty(str1, 0, false, str2, 0.0D));
        }
コード例 #12
0
        public static IList <IfcEngineUnit> loadIfcEngineUnits(Pointer paramPointer1, Pointer paramPointer2)
        {
            LinkedList         linkedList          = new LinkedList();
            PointerByReference pointerByReference1 = new PointerByReference();
            int i = IfcEngineInterface_Fields.INSTANCE.internalGetP21Line(paramPointer2);

            IfcEngineInterface_Fields.INSTANCE.sdaiGetAttrBN(paramPointer2, "UnitsInContext", 6, pointerByReference1);
            Pointer            pointer1            = IfcEngineInterface_Fields.INSTANCE.sdaiGetEntity(paramPointer1, "IFCCONVERSIONBASEDUNIT");
            Pointer            pointer2            = IfcEngineInterface_Fields.INSTANCE.sdaiGetEntity(paramPointer1, "IFCSIUNIT");
            PointerByReference pointerByReference2 = new PointerByReference();
            int j = 0;

            IfcEngineInterface_Fields.INSTANCE.sdaiGetAttrBN(pointerByReference1.Value, "Units", 2, pointerByReference2);
            j = IfcEngineInterface_Fields.INSTANCE.sdaiGetMemberCount(pointerByReference2.Value);
            for (sbyte b = 0; b < j; b++)
            {
                PointerByReference pointerByReference = new PointerByReference();
                IfcEngineInterface_Fields.INSTANCE.engiGetAggrElement(pointerByReference2.Value, b, 6, pointerByReference);
                if (IfcEngineInterface_Fields.INSTANCE.sdaiGetInstanceType(pointerByReference.Value).ToString().Equals(pointer1.ToString()))
                {
                    IfcEngineUnit      ifcEngineUnit       = new IfcEngineUnit();
                    PointerByReference pointerByReference3 = new PointerByReference();
                    IfcEngineInterface_Fields.INSTANCE.sdaiGetAttrBN(pointerByReference.Value, "ConversionFactor", 6, pointerByReference3);
                    if (pointerByReference3.Value != null)
                    {
                        PointerByReference pointerByReference4 = new PointerByReference();
                        PointerByReference pointerByReference5 = new PointerByReference();
                        IfcEngineInterface_Fields.INSTANCE.sdaiGetAttrBN(pointerByReference3.Value, "ValueComponent", 1, pointerByReference5);
                        DoubleByReference doubleByReference = new DoubleByReference();
                        IfcEngineInterface_Fields.INSTANCE.sdaiGetADBValue(pointerByReference5.Value, 9, doubleByReference);
                        double d = doubleByReference.Value;
                        IfcEngineInterface_Fields.INSTANCE.sdaiGetAttrBN(pointerByReference3.Value, "UnitComponent", 6, pointerByReference4);
                        if (IfcEngineInterface_Fields.INSTANCE.sdaiGetInstanceType(pointerByReference4.Value).ToString().Equals(pointer2.ToString()))
                        {
                            PointerByReference pointerByReference6 = new PointerByReference();
                            PointerByReference pointerByReference7 = new PointerByReference();
                            PointerByReference pointerByReference8 = new PointerByReference();
                            IfcEngineInterface_Fields.INSTANCE.sdaiGetAttrBN(pointerByReference4.Value, "UnitType", 10, pointerByReference6);
                            IfcEngineInterface_Fields.INSTANCE.sdaiGetAttrBN(pointerByReference4.Value, "Prefix", 10, pointerByReference7);
                            IfcEngineInterface_Fields.INSTANCE.sdaiGetAttrBN(pointerByReference4.Value, "Name", 10, pointerByReference8);
                            string str1 = (pointerByReference6 != null && pointerByReference6.Value != null) ? pointerByReference6.Value.getString(0L) : "";
                            string str2 = (pointerByReference7 != null && pointerByReference7.Value != null) ? pointerByReference7.Value.getString(0L) : "";
                            string str3 = (pointerByReference8 != null && pointerByReference8.Value != null) ? pointerByReference8.Value.getString(0L) : "";
                            setUnitType(ifcEngineUnit, str1);
                            setUnitPrefix(ifcEngineUnit, str2);
                            setUnitName(ifcEngineUnit, str3);
                            ifcEngineUnit.ConversionFactor = ifcEngineUnit.ConversionFactor * d;
                            linkedList.AddLast(ifcEngineUnit);
                        }
                        else
                        {
                            Console.Error.WriteLine("IFCERROR: Load Units 1");
                        }
                    }
                    else
                    {
                        Console.Error.WriteLine("IFCERROR: Load Units 2");
                    }
                }
                else if (IfcEngineInterface_Fields.INSTANCE.sdaiGetInstanceType(pointerByReference.Value).ToString().Equals(pointer2.ToString()))
                {
                    IfcEngineUnit      ifcEngineUnit       = new IfcEngineUnit();
                    PointerByReference pointerByReference3 = new PointerByReference();
                    PointerByReference pointerByReference4 = new PointerByReference();
                    PointerByReference pointerByReference5 = new PointerByReference();
                    IfcEngineInterface_Fields.INSTANCE.sdaiGetAttrBN(pointerByReference.Value, "UnitType", 10, pointerByReference3);
                    IfcEngineInterface_Fields.INSTANCE.sdaiGetAttrBN(pointerByReference.Value, "Prefix", 10, pointerByReference4);
                    IfcEngineInterface_Fields.INSTANCE.sdaiGetAttrBN(pointerByReference.Value, "Name", 10, pointerByReference5);
                    string str1 = (pointerByReference3 != null && pointerByReference3.Value != null) ? pointerByReference3.Value.getString(0L) : "";
                    string str2 = (pointerByReference4 != null && pointerByReference4.Value != null) ? pointerByReference4.Value.getString(0L) : "";
                    string str3 = (pointerByReference5 != null && pointerByReference5.Value != null) ? pointerByReference5.Value.getString(0L) : "";
                    setUnitType(ifcEngineUnit, str1);
                    setUnitPrefix(ifcEngineUnit, str2);
                    setUnitName(ifcEngineUnit, str3);
                    linkedList.AddLast(ifcEngineUnit);
                }
                else
                {
                    Console.Error.WriteLine("IFCERROR: Load Units 3");
                }
            }
            return(linkedList);
        }