/// <summary> /// Creates a creator from IFCOpeningData. /// </summary> /// <param name="exporterIFC">The exporter.</param> /// <param name="openingData">The IFCOpeningData.</param> /// <param name="scaledHostWidth">The scaled host width.</param> /// <param name="hostId">The host id.</param> /// <param name="hostHnd">The host handle.</param> /// <param name="levelId">The base level id.</param> /// <returns>The creator.</returns> public static DoorWindowDelayedOpeningCreator Create(ExporterIFC exporterIFC, IFCOpeningData openingData, double scaledHostWidth, ElementId hostId, IFCAnyHandle hostHnd, ElementId levelId) { DoorWindowDelayedOpeningCreator creator = new DoorWindowDelayedOpeningCreator(); creator.InsertId = openingData.OpeningElementId; creator.HostId = hostId; creator.HostHnd = hostHnd; creator.ExtrusionData = openingData.GetExtrusionData(); // We can't be guaranteed that the GetOpeningSolids data won't be stale by the time we are ready // to use it. As such, we will clone the geometry here. IList <Solid> openingSolids = openingData.GetOpeningSolids(); IList <Solid> creatorSolids = new List <Solid>(); foreach (Solid openingSolid in openingSolids) { creatorSolids.Add(SolidUtils.Clone(openingSolid)); } creator.Solids = creatorSolids; creator.IsRecess = openingData.IsRecess; creator.CreatedFromDoorWindowInfo = false; creator.ScaledHostWidth = scaledHostWidth; creator.LevelId = levelId; if ((creator.ExtrusionData != null && creator.ExtrusionData.Count > 0) || (creator.Solids != null && creator.Solids.Count > 0)) { creator.HasValidGeometry = true; } return(creator); }
/// <summary> /// Creates a creator from IFCOpeningData. /// </summary> /// <param name="exporterIFC">The exporter.</param> /// <param name="openingData">The IFCOpeningData.</param> /// <param name="scaledHostWidth">The scaled host width.</param> /// <param name="hostId">The host id.</param> /// <param name="hostHnd">The host handle.</param> /// <param name="levelId">The base level id.</param> /// <returns>The creator.</returns> public static DoorWindowDelayedOpeningCreator Create(ExporterIFC exporterIFC, IFCOpeningData openingData, double scaledHostWidth, ElementId hostId, IFCAnyHandle hostHnd, ElementId levelId) { DoorWindowDelayedOpeningCreator creator = new DoorWindowDelayedOpeningCreator(); creator.InsertId = openingData.OpeningElementId; creator.HostId = hostId; creator.HostHnd = hostHnd; creator.ExtrusionData = openingData.GetExtrusionData(); creator.Solids = openingData.GetOpeningSolids(); creator.IsRecess = openingData.IsRecess; creator.CreatedFromDoorWindowInfo = false; creator.ScaledHostWidth = scaledHostWidth; creator.LevelId = levelId; if ((creator.ExtrusionData != null && creator.ExtrusionData.Count > 0) || (creator.Solids != null && creator.Solids.Count > 0)) { creator.HasValidGeometry = true; } return(creator); }
/// <summary> /// Creates a creator from IFCOpeningData. /// </summary> /// <param name="exporterIFC">The exporter.</param> /// <param name="openingData">The IFCOpeningData.</param> /// <param name="scaledHostWidth">The scaled host width.</param> /// <param name="hostId">The host id.</param> /// <param name="hostHnd">The host handle.</param> /// <param name="levelId">The base level id.</param> /// <returns>The creator.</returns> public static DoorWindowDelayedOpeningCreator Create(ExporterIFC exporterIFC, IFCOpeningData openingData, double scaledHostWidth, ElementId hostId, IFCAnyHandle hostHnd, ElementId levelId) { DoorWindowDelayedOpeningCreator creator = new DoorWindowDelayedOpeningCreator(); creator.InsertId = openingData.OpeningElementId; creator.HostId = hostId; creator.HostHnd = hostHnd; creator.ExtrusionData = openingData.GetExtrusionData(); creator.Solids = openingData.GetOpeningSolids(); creator.IsRecess = openingData.IsRecess; creator.CreatedFromDoorWindowInfo = false; creator.ScaledHostWidth = scaledHostWidth; creator.LevelId = levelId; if ((creator.ExtrusionData != null && creator.ExtrusionData.Count > 0) || (creator.Solids != null && creator.Solids.Count >0)) creator.HasValidGeometry = true; return creator; }