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 ifcOrientedEdge) { base.Process(ifcOrientedEdge); IFCAnyHandle edgeElement = IFCImportHandleUtil.GetRequiredInstanceAttribute(ifcOrientedEdge, "EdgeElement", true); EdgeElement = IFCEdge.ProcessIFCEdge(edgeElement); bool found = false; bool orientation = IFCImportHandleUtil.GetRequiredBooleanAttribute(ifcOrientedEdge, "Orientation", out found); if (found) { Orientation = orientation; } else { Importer.TheLog.LogWarning(ifcOrientedEdge.StepId, "Cannot find Orientation attribute, defaulting to true", false); Orientation = true; } }
override protected void Process(IFCAnyHandle ifcOrientedEdge) { base.Process(ifcOrientedEdge); IFCAnyHandle edgeElement = IFCImportHandleUtil.GetRequiredInstanceAttribute(ifcOrientedEdge, "EdgeElement", true); EdgeElement = IFCEdge.ProcessIFCEdge(edgeElement); bool found = false; bool orientation = IFCImportHandleUtil.GetRequiredBooleanAttribute(ifcOrientedEdge, "Orientation", out found); if (found) { Orientation = orientation; } else { Importer.TheLog.LogWarning(ifcOrientedEdge.StepId, "Cannot find Orientation attribute, defaulting to true", false); Orientation = true; } // ODA Toolkit doesn't support derived attributes. Set EdgeStart and EdgeEnd // if they haven't been set. if (EdgeStart == null) { EdgeStart = Orientation ? EdgeElement.EdgeStart : EdgeElement.EdgeEnd; if (EdgeStart == null) { Importer.TheLog.LogError(ifcOrientedEdge.StepId, "Cannot find the starting vertex", true); } } if (EdgeEnd == null) { EdgeEnd = Orientation ? EdgeElement.EdgeEnd : EdgeElement.EdgeStart; if (EdgeEnd == null) { Importer.TheLog.LogError(ifcOrientedEdge.StepId, "Cannot find the ending vertex", true); } } }