/// <summary> /// Process IfcTriangulatedFaceSet instance /// </summary> /// <param name="ifcTriangulatedFaceSet">the handle</param> protected override void Process(IFCAnyHandle ifcTriangulatedFaceSet) { base.Process(ifcTriangulatedFaceSet); IList <IList <double> > normals = IFCImportHandleUtil.GetListOfListOfDoubleAttribute(ifcTriangulatedFaceSet, "Normals"); if (normals != null) { if (normals.Count > 0) { Normals = normals; } } bool?closed = IFCAnyHandleUtil.GetBooleanAttribute(ifcTriangulatedFaceSet, "Closed"); if (closed != null) { Closed = closed; } IList <IList <int> > coordIndex = IFCImportHandleUtil.GetListOfListOfIntegerAttribute(ifcTriangulatedFaceSet, "CoordIndex"); if (coordIndex != null) { if (coordIndex.Count > 0) { CoordIndex = coordIndex; } } // Note that obsolete IFC4 files had a "NormalIndex". // We ignore this because we can't actually distinguish between these files. // "PnIndex" is new to IFC4Add2, so we'll protect here in case we see an obsolete file. try { if (IFCImportFile.TheFile.SchemaVersionAtLeast(IFCSchemaVersion.IFC4)) { IList <int> pnIndex = IFCAnyHandleUtil.GetAggregateIntAttribute <List <int> >(ifcTriangulatedFaceSet, "PnIndex"); if (pnIndex != null) { if (pnIndex.Count > 0) { PnIndex = pnIndex; } } } } catch (Exception ex) { if (IFCImportFile.HasUndefinedAttribute(ex)) { IFCImportFile.TheFile.DowngradeIFC4SchemaTo(IFCSchemaVersion.IFC4Add1Obsolete); } else { throw ex; } } }
protected override void Process(IFCAnyHandle ifcIndexPolygonalFace) { base.Process(ifcIndexPolygonalFace); IList <int> coordIndex = IFCAnyHandleUtil.GetAggregateIntAttribute <List <int> >(ifcIndexPolygonalFace, "CoordIndex"); if (coordIndex != null) { if (coordIndex.Count >= 3) { CoordIndex = coordIndex; } } if (IFCAnyHandleUtil.IsTypeOf(ifcIndexPolygonalFace, IFCEntityType.IfcIndexedPolygonalFaceWithVoids)) { IList <IList <int> > innerCoordIndices = IFCImportHandleUtil.GetListOfListOfIntegerAttribute(ifcIndexPolygonalFace, "InnerCoordIndices"); if (innerCoordIndices != null) { if (innerCoordIndices.Count > 0) { InnerCoordIndices = innerCoordIndices; } } } }
/// <summary> /// Process IfcTriangulatedFaceSet instance /// </summary> /// <param name="ifcTriangulatedFaceSet">the handle</param> protected override void Process(IFCAnyHandle ifcTriangulatedFaceSet) { base.Process(ifcTriangulatedFaceSet); // Process the IFCCartesianPointLIst3D IFCAnyHandle coordinates = IFCImportHandleUtil.GetRequiredInstanceAttribute(ifcTriangulatedFaceSet, "Coordinates", true); if (IFCAnyHandleUtil.IsSubTypeOf(coordinates, IFCEntityType.IfcCartesianPointList3D)) { IFCCartesianPointList3D coordList = IFCCartesianPointList3D.processIFCCartesianPointList3D(coordinates); if (coordList != null) { Coordinates = coordList; } } IList <IList <double> > normals = IFCImportHandleUtil.GetListOfListOfDoubleAttribute(ifcTriangulatedFaceSet, "Normals"); if (normals != null) { if (normals.Count > 0) { Normals = normals; } } bool?closed = IFCAnyHandleUtil.GetBooleanAttribute(ifcTriangulatedFaceSet, "Closed"); if (closed != null) { Closed = closed; } IList <IList <int> > coordIndex = IFCImportHandleUtil.GetListOfListOfIntegerAttribute(ifcTriangulatedFaceSet, "CoordIndex"); if (coordIndex != null) { if (coordIndex.Count > 0) { CoordIndex = coordIndex; } } IList <IList <int> > normalIndex = IFCImportHandleUtil.GetListOfListOfIntegerAttribute(ifcTriangulatedFaceSet, "NormalIndex"); if (normalIndex != null) { if (normalIndex.Count > 0) { NormalIndex = normalIndex; } } }
/// <summary> /// Process IfcTriangulatedFaceSet instance /// </summary> /// <param name="ifcTriangulatedFaceSet">the handle</param> protected override void Process(IFCAnyHandle ifcTriangulatedFaceSet) { base.Process(ifcTriangulatedFaceSet); IList <IList <double> > normals = IFCImportHandleUtil.GetListOfListOfDoubleAttribute(ifcTriangulatedFaceSet, "Normals"); if (normals != null) { if (normals.Count > 0) { Normals = normals; } } bool?closed = IFCAnyHandleUtil.GetBooleanAttribute(ifcTriangulatedFaceSet, "Closed"); if (closed != null) { Closed = closed; } IList <IList <int> > coordIndex = IFCImportHandleUtil.GetListOfListOfIntegerAttribute(ifcTriangulatedFaceSet, "CoordIndex"); if (coordIndex != null) { if (coordIndex.Count > 0) { CoordIndex = coordIndex; } } IList <IList <int> > normalIndex; if (IFCImportFile.TheFile.SchemaVersion >= IFCSchemaVersion.IFC4Add2) { normalIndex = coordIndex; } else { normalIndex = IFCImportHandleUtil.GetListOfListOfIntegerAttribute(ifcTriangulatedFaceSet, "NormalIndex"); } if (normalIndex != null) { if (normalIndex.Count > 0) { NormalIndex = normalIndex; } } if (IFCImportFile.TheFile.SchemaVersion >= IFCSchemaVersion.IFC4Add2) { IList <int> pnIndex = IFCAnyHandleUtil.GetAggregateIntAttribute <List <int> >(ifcTriangulatedFaceSet, "PnIndex"); if (pnIndex != null) { if (pnIndex.Count > 0) { PnIndex = pnIndex; } } } }