public static IFCTopologicalRepresentationItem ProcessIFCTopologicalRepresentationItem(IFCAnyHandle ifcTopologicalRepresentationItem) { if (IFCAnyHandleUtil.IsSubTypeOf(ifcTopologicalRepresentationItem, IFCEntityType.IfcConnectedFaceSet)) { return(IFCConnectedFaceSet.ProcessIFCConnectedFaceSet(ifcTopologicalRepresentationItem)); } if (IFCAnyHandleUtil.IsSubTypeOf(ifcTopologicalRepresentationItem, IFCEntityType.IfcEdge)) { return(IFCEdge.ProcessIFCEdge(ifcTopologicalRepresentationItem)); } if (IFCAnyHandleUtil.IsSubTypeOf(ifcTopologicalRepresentationItem, IFCEntityType.IfcFace)) { return(IFCFace.ProcessIFCFace(ifcTopologicalRepresentationItem)); } if (IFCAnyHandleUtil.IsSubTypeOf(ifcTopologicalRepresentationItem, IFCEntityType.IfcLoop)) { return(IFCLoop.ProcessIFCLoop(ifcTopologicalRepresentationItem)); } if (IFCAnyHandleUtil.IsSubTypeOf(ifcTopologicalRepresentationItem, IFCEntityType.IfcVertex)) { return(IFCVertex.ProcessIFCVertex(ifcTopologicalRepresentationItem)); } Importer.TheLog.LogUnhandledSubTypeError(ifcTopologicalRepresentationItem, IFCEntityType.IfcTopologicalRepresentationItem, true); return(null); }
override protected void Process(IFCAnyHandle ifcConnectedFaceSet) { base.Process(ifcConnectedFaceSet); HashSet <IFCAnyHandle> ifcCfsFaces = IFCAnyHandleUtil.GetValidAggregateInstanceAttribute <HashSet <IFCAnyHandle> >(ifcConnectedFaceSet, "CfsFaces"); if (ifcCfsFaces == null || ifcCfsFaces.Count == 0) { throw new InvalidOperationException("#" + ifcConnectedFaceSet.StepId + ": no faces in connected face set, aborting."); } foreach (IFCAnyHandle ifcCfsFace in ifcCfsFaces) { try { Faces.Add(IFCFace.ProcessIFCFace(ifcCfsFace)); } catch { Importer.TheLog.LogWarning(ifcCfsFace.StepId, "Invalid face, ignoring.", false); } } if (Faces.Count == 0) { throw new InvalidOperationException("#" + ifcConnectedFaceSet.StepId + ": no faces, aborting."); } }
/// <summary> /// Create an IFCFace object from a handle of type IfcFace. /// </summary> /// <param name="ifcFace">The IFC handle.</param> /// <returns>The IFCFace object.</returns> public static IFCFace ProcessIFCFace(IFCAnyHandle ifcFace) { if (IFCAnyHandleUtil.IsNullOrHasNoValue(ifcFace)) { IFCImportFile.TheLog.LogNullError(IFCEntityType.IfcFace); return(null); } IFCEntity face; if (!IFCImportFile.TheFile.EntityMap.TryGetValue(ifcFace.StepId, out face)) { face = new IFCFace(ifcFace); } return(face as IFCFace); }
/// <summary> /// Create an IFCFace object from a handle of type IfcFace. /// </summary> /// <param name="ifcFace">The IFC handle.</param> /// <returns>The IFCFace object.</returns> public static IFCFace ProcessIFCFace(IFCAnyHandle ifcFace) { if (IFCAnyHandleUtil.IsNullOrHasNoValue(ifcFace)) { Importer.TheLog.LogNullError(IFCEntityType.IfcFace); return null; } if (IFCAnyHandleUtil.IsSubTypeOf(ifcFace, IFCEntityType.IfcFaceSurface)) return IFCFaceSurface.ProcessIFCFaceSurface(ifcFace); IFCEntity face; if (!IFCImportFile.TheFile.EntityMap.TryGetValue(ifcFace.StepId, out face)) face = new IFCFace(ifcFace); return (face as IFCFace); }