/// <summary> /// Check if two IFCPresentationLayerAssignments are equivalent, and warn if they aren't/ /// </summary> /// <param name="originalAssignment">The original layer assignment in this representation.</param> /// <param name="layerAssignment">The layer assignment to add to this representation.</param> /// <returns>True if the layer assignments are consistent; false otherwise.</returns> static public bool CheckLayerAssignmentConsistency(IFCPresentationLayerAssignment originalAssignment, IFCPresentationLayerAssignment layerAssignment, int id) { if ((originalAssignment != null) && (!originalAssignment.IsEquivalentTo(layerAssignment))) { Importer.TheLog.LogWarning(id, "Multiple inconsistent layer assignment items found for this item; using first one.", false); return(false); } return(true); }
/// <summary> /// The constructor. /// </summary> /// <param name="scope">The associated shape edit scope.</param> /// <param name="item">The current styled item.</param> public IFCMaterialStack(IFCImportShapeEditScope scope, IFCStyledItem styledItem, IFCPresentationLayerAssignment layerAssignment) { m_Scope = scope; if (styledItem != null) { m_MaterialElementId = styledItem.GetMaterialElementId(scope); } else if (layerAssignment != null) { m_MaterialElementId = layerAssignment.GetMaterialElementId(scope); } if (m_MaterialElementId != ElementId.InvalidElementId) { m_Scope.PushMaterialId(m_MaterialElementId); } }