Ejemplo n.º 1
0
        public override string WhereRule()
        {
            IfcProfileDef pDef = _profiles.FirstOrDefault();
            string        err  = "";

            if (pDef != null)
            {
                IfcProfileTypeEnum pType = pDef.ProfileType;
                foreach (IfcProfileDef profile in _profiles)
                {
                    if (pType != profile.ProfileType)
                    {
                        err += "WR1 CompositeProfileDef : Either all profiles are areas or all profiles are curves\n";
                        break;
                    }
                }
            }
            if (_profiles.OfType <IfcCompositeProfileDef>().Count() > 0)
            {
                err +=
                    "WR2 CompositeProfileDef :   A composite profile should not include another composite profile, i.e. no recursive definitions should be allowed.\n";
            }
            return(err);
        }