Пример #1
0
    public bool IsMatch(BranchIndex _BranchIndex)
    {
        if (!IsTheLevelTheSame(_BranchIndex))
        {
            return(false);                                  //不属于同一级的枝干
        }
        switch (Convert.ToInt32(IsFirstBranchInBranch()) + Convert.ToInt32(_BranchIndex.IsFirstBranchInBranch()))
        {
        case 0:
            return(IsTheSameIndex(_BranchIndex));

        case 1:
            return(false);

        case 2:
            return(IsTheSameRelativeRotationAngles(_BranchIndex));

        default:
            throw new Exception("Unknown Exception.");
        }
    }