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); }
protected override void Process(IFCAnyHandle ifcEdge) { base.Process(ifcEdge); IFCAnyHandle edgeStart = IFCImportHandleUtil.GetRequiredInstanceAttribute(ifcEdge, "EdgeStart", false); if (IFCAnyHandleUtil.IsNullOrHasNoValue(edgeStart)) { Importer.TheLog.LogError(ifcEdge.StepId, "Cannot find the starting vertex", true); return; } IFCAnyHandle edgeEnd = IFCImportHandleUtil.GetRequiredInstanceAttribute(ifcEdge, "EdgeEnd", false); if (IFCAnyHandleUtil.IsNullOrHasNoValue(edgeEnd)) { Importer.TheLog.LogError(ifcEdge.StepId, "Cannot find the ending vertex", true); return; } EdgeStart = IFCVertex.ProcessIFCVertex(edgeStart); EdgeEnd = IFCVertex.ProcessIFCVertex(edgeEnd); }
protected override void Process(IFCAnyHandle ifcEdge) { base.Process(ifcEdge); // The ODA toolkit doesn't support derived attributes. As such, we will // let IfcOrientedEdge compute them. IFCAnyHandle edgeStart = IFCImportHandleUtil.GetOptionalInstanceAttribute(ifcEdge, "EdgeStart"); if (IFCAnyHandleUtil.IsNullOrHasNoValue(edgeStart)) { if (!(this is IFCOrientedEdge)) { Importer.TheLog.LogError(ifcEdge.StepId, "Cannot find the starting vertex", true); return; } } else { EdgeStart = IFCVertex.ProcessIFCVertex(edgeStart); } IFCAnyHandle edgeEnd = IFCImportHandleUtil.GetOptionalInstanceAttribute(ifcEdge, "EdgeEnd"); if (IFCAnyHandleUtil.IsNullOrHasNoValue(edgeEnd)) { if (!(this is IFCOrientedEdge)) { Importer.TheLog.LogError(ifcEdge.StepId, "Cannot find the ending vertex", true); return; } } else { EdgeEnd = IFCVertex.ProcessIFCVertex(edgeEnd); } }