/// <summary> /// 判断两个剖面不同是否因为牛腿下方存在水平的板; /// </summary> /// <param name="mrSection"></param> /// <returns></returns> private bool IsHaveThePlatePart(CMrSection mrSection) { List <CMrPart> tempPartList = new List <CMrPart>(); int nCount1 = mrSection.mSectionPartList.Count; int nCount2 = mSectionPartList.Count; if (nCount1 == nCount2 + 1) { foreach (CMrPart mrPart in mrSection.GetMrPartList()) { if (!CDimTools.GetInstance().IsTwoVectorParallel(mrPart.mNormal, new Vector(0, 0, 1))) { continue; } foreach (CMrPart mrSectionPart in mSectionPartList) { if (!IsTwoCylinderPartSame(mrPart, mrSectionPart)) { tempPartList.Add(mrPart); } } } } return(true); }
/// <summary> /// 判断两个剖面是否相同; /// </summary> /// <param name="mrSection"></param> /// <returns></returns> public bool IsSameSection(CMrSection mrSection) { if (mSectionType == MrSectionType.MrSectionBeam) { List <CMrPart> mrPartList = mrSection.GetMrPartList(); if (mrPartList.Count != mSectionPartList.Count || mrSection.mSectionType != mSectionType) { return(false); } foreach (CMrPart mrPart in mrPartList) { bool bRes = IsThePartSameWithSectionParts(mrPart); if (!bRes) { return(false); } } } else if (mSectionType == MrSectionType.MrSectionCylinder) { List <CMrPart> mrPartList = mrSection.GetMrPartList(); if (mrPartList.Count != mSectionPartList.Count || mrSection.mSectionType != mSectionType) { return(false); } foreach (CMrPart mrPart in mrPartList) { bool bRes = IsThePartSameWithSectionParts(mrPart); if (!bRes) { return(false); } } } else if (mSectionType == MrSectionType.MrSectionBeamDoor) { List <CMrPart> mrPartList = mrSection.GetMrPartList(); if (mrPartList.Count != mSectionPartList.Count || mrSection.mSectionType != mSectionType) { return(false); } foreach (CMrPart mrPart in mrPartList) { bool bRes = IsThePartSameWithSectionParts(mrPart); if (!bRes) { return(false); } } } else if (mSectionType == MrSectionType.MrSectionCylinderDoor) { List <CMrPart> mrPartList = mrSection.GetMrPartList(); if (mrPartList.Count != mSectionPartList.Count || mrSection.mSectionType != mSectionType) { return(false); } foreach (CMrPart mrPart in mrPartList) { bool bRes = IsThePartSameWithSectionParts(mrPart); if (!bRes) { return(false); } } } return(true); }