/// <summary>
        /// Registers a connection between a wall and another element.
        /// </summary>
        /// <param name="firstId">
        /// The first element id. This can be a wall or a column.
        /// </param>
        /// <param name="secondId">
        /// The second element id.  This can be a wall or a column.
        /// </param>
        /// <param name="firstConnectionType">
        /// The connection type for the first connected element.
        /// </param>
        /// <param name="secondConnectionType">
        /// The connection type for the second connected element.
        /// </param>
        /// <param name="connectionGeometry">
        /// The IfcConnectionGeometry handle related to the connection.  A valueless handle is also permitted.
        /// </param>
        public WallConnectionData(ElementId firstId, ElementId secondId, IFCConnectionType firstConnectionType,
           IFCConnectionType secondConnectionType, IFCAnyHandle connectionGeometry)
        {
            if (firstId < secondId)
            {
                this.m_FirstId = firstId;
                this.m_SecondId = secondId;
                this.m_FirstConnectionType = firstConnectionType;
                this.m_SecondConnectionType = secondConnectionType;
            }
            else
            {
                this.m_FirstId = secondId;
                this.m_SecondId = firstId;
                this.m_FirstConnectionType = secondConnectionType;
                this.m_SecondConnectionType = firstConnectionType;
            }

            this.m_ConnectionGeometry = connectionGeometry;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Registers a connection between a wall and another element.
        /// </summary>
        /// <param name="firstId">
        /// The first element id. This can be a wall or a column.
        /// </param>
        /// <param name="secondId">
        /// The second element id.  This can be a wall or a column.
        /// </param>
        /// <param name="firstConnectionType">
        /// The connection type for the first connected element.
        /// </param>
        /// <param name="secondConnectionType">
        /// The connection type for the second connected element.
        /// </param>
        /// <param name="connectionGeometry">
        /// The IfcConnectionGeometry handle related to the connection.  A valueless handle is also permitted.
        /// </param>
        public WallConnectionData(ElementId firstId, ElementId secondId, IFCConnectionType firstConnectionType,
                                  IFCConnectionType secondConnectionType, IFCAnyHandle connectionGeometry)
        {
            if (firstId < secondId)
            {
                this.m_FirstId              = firstId;
                this.m_SecondId             = secondId;
                this.m_FirstConnectionType  = firstConnectionType;
                this.m_SecondConnectionType = secondConnectionType;
            }
            else
            {
                this.m_FirstId              = secondId;
                this.m_SecondId             = firstId;
                this.m_FirstConnectionType  = secondConnectionType;
                this.m_SecondConnectionType = firstConnectionType;
            }

            this.m_ConnectionGeometry = connectionGeometry;
        }
      /// <summary>
      /// Creates a handle representing an IfcRelConnectsPathElements 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="connectionGeometry">The geometric shape representation of the connection geometry.</param>
      /// <param name="relatingElement">Reference to a subtype of IfcElement that is connected by the connection relationship in the role of RelatingElement.</param>
      /// <param name="relatedElement">Reference to a subtype of IfcElement that is connected by the connection relationship in the role of RelatedElement.</param>
      /// <param name="relatingPriorities">Priorities for connection.</param>
      /// <param name="relatedPriorities">Priorities for connection.</param>
      /// <param name="relatedConnectionType">The connection type in relation to the path of the RelatingObject.</param>
      /// <param name="relatingConnectionType">The connection type in relation to the path of the RelatingObject.</param>
      /// <returns>The handle.</returns>
      public static IFCAnyHandle CreateRelConnectsPathElements(IFCFile file, string guid, IFCAnyHandle ownerHistory,
          string name, string description, IFCAnyHandle connectionGeometry, IFCAnyHandle relatingElement, IFCAnyHandle relatedElement,
          IList<int> relatingPriorities, IList<int> relatedPriorities, IFCConnectionType relatedConnectionType, IFCConnectionType relatingConnectionType)
      {
         if (relatingPriorities == null)
            throw new ArgumentNullException("relatingPriorities");
         if (relatedPriorities == null)
            throw new ArgumentNullException("relatedPriorities");

         ValidateRelConnectsElements(guid, ownerHistory, name, description, connectionGeometry, relatingElement, relatedElement);

         IFCAnyHandle relConnectsPathElements = CreateInstance(file, IFCEntityType.IfcRelConnectsPathElements);
         IFCAnyHandleUtil.SetAttribute(relConnectsPathElements, "RelatingPriorities", relatingPriorities);
         IFCAnyHandleUtil.SetAttribute(relConnectsPathElements, "RelatedPriorities", relatedPriorities);
         IFCAnyHandleUtil.SetAttribute(relConnectsPathElements, "RelatedConnectionType", relatedConnectionType);
         IFCAnyHandleUtil.SetAttribute(relConnectsPathElements, "RelatingConnectionType", relatingConnectionType);
         SetRelConnectsElements(relConnectsPathElements, guid, ownerHistory, name, description, connectionGeometry, relatingElement, relatedElement);
         return relConnectsPathElements;
      }