コード例 #1
0
 /// <summary>
 /// Compares two objects for geomtric equality
 /// </summary>
 /// <param name="a"></param>
 /// <param name="b">object to compare with</param>
 /// <returns></returns>
 public static bool GeometricEquals(this IfcRepresentation a, IfcRepresentation b)
 {           
     if (a.Equals(b)) return true;
     List<IfcRepresentationItem> aRep = a.Items.ToList();
     List<IfcRepresentationItem> bRep = b.Items.ToList();
     for (int i = 0; i < aRep.Count; i++)
     {
         if(!aRep[i].GeometricEquals(bRep[i])) return false;
     }
     return true;
 }
コード例 #2
0
        public override bool Equals(object obj)
        {
            // Check for null
            if (obj == null)
            {
                return(false);
            }

            // Check for type
            if (this.GetType() != obj.GetType())
            {
                return(false);
            }

            // Cast as IfcRoot
            IfcRepresentation root = (IfcRepresentation)obj;

            return(this == root);
        }
コード例 #3
0
ファイル: IfcProduct.cs プロジェクト: Artoymyp/XbimEssentials
 public void AddRepresentation(IfcRepresentation representation)
 {
     if (this.Representation == null)
         this.Representation = new IfcProductDefinitionShape();
     this.Representation.Representations.Add(representation);
 }