/// <summary> /// Reverses door panel position. /// </summary> /// <param name="originalPosition"> /// The original position. /// </param> /// <returns> /// The string represents the reversed door panel position. /// </returns> public static IFCDoorPanelPosition ReverseDoorPanelPosition(IFCDoorPanelPosition? originalPosition) { if (originalPosition == null) return IFCDoorPanelPosition.NotDefined; else if (originalPosition == IFCDoorPanelPosition.Left) return IFCDoorPanelPosition.Right; else if (originalPosition == IFCDoorPanelPosition.Right) return IFCDoorPanelPosition.Left; return (IFCDoorPanelPosition)originalPosition; }
/// <summary> /// Creates an IfcDoorPanelProperties, and assigns it to the file. /// </summary> /// <param name="file">The file.</param> /// <param name="guid">The GUID.</param> /// <param name="ownerHistory">The owner history.</param> /// <param name="name">The name.</param> /// <param name="description">The description.</param> /// <param name="panelDepth">The depth of the panel.</param> /// <param name="panelOperation">The panel operation.</param> /// <param name="panelWidth">The width of the panel.</param> /// <param name="panelPosition">The panel position.</param> /// <param name="shapeAspectStyle">The shape aspect for the door style.</param> /// <returns>The handle.</returns> public static IFCAnyHandle CreateDoorPanelProperties(IFCFile file, string guid, IFCAnyHandle ownerHistory, string name, string description, double? panelDepth, IFCDoorPanelOperation panelOperation, double? panelWidth, IFCDoorPanelPosition panelPosition, IFCAnyHandle shapeAspectStyle) { ValidatePropertySetDefinition(guid, ownerHistory, name, description); IFCAnyHandleUtil.ValidateSubTypeOf(shapeAspectStyle, true, IFCEntityType.IfcShapeAspect); IFCAnyHandle doorPanelProperties = CreateInstance(file, IFCEntityType.IfcDoorPanelProperties); IFCAnyHandleUtil.SetAttribute(doorPanelProperties, "PanelDepth", panelDepth); IFCAnyHandleUtil.SetAttribute(doorPanelProperties, "PanelOperation", panelOperation); IFCAnyHandleUtil.SetAttribute(doorPanelProperties, "PanelWidth", panelWidth); IFCAnyHandleUtil.SetAttribute(doorPanelProperties, "PanelPosition", panelPosition); IFCAnyHandleUtil.SetAttribute(doorPanelProperties, "ShapeAspectStyle", shapeAspectStyle); SetPropertySetDefinition(doorPanelProperties, guid, ownerHistory, name, description); return doorPanelProperties; }