コード例 #1
0
ファイル: CNCPoint.cpp プロジェクト: play113/swer
bool CNCVector::operator<( const CNCVector & rhs ) const
{
    for (int offset=1; offset <=3; offset++)
    {
        if (fabs(Coord(offset) - rhs.Coord(offset)) < Tolerance()) continue;

        if (Coord(offset) > rhs.Coord(offset)) return(false);
        if (Coord(offset) < rhs.Coord(offset)) return(true);
    }

    return(false);	// They're equal
} // End equivalence operator
コード例 #2
0
ファイル: SketchTools.cpp プロジェクト: CarlosGS/heekscad
bool SimplifySketchTool::SortPoint::operator<( const SimplifySketchTool::SortPoint & rhs ) const
{
    if (*this == rhs) return(false);

    if (fabs(X() - rhs.X()) > Tolerance())
    {
        if (X() > rhs.X()) return(false);
        if (X() < rhs.X()) return(true);
    }

    if (fabs(Y() - rhs.Y()) > Tolerance())
    {
        if (Y() > rhs.Y()) return(false);
        if (Y() < rhs.Y()) return(true);
    }

    if (fabs(Z() - rhs.Z()) > Tolerance())
    {
        if (Z() > rhs.Z()) return(false);
        if (Z() < rhs.Z()) return(true);
    }

    return(false);	// They're equal
} // End equivalence operator
コード例 #3
0
ファイル: SketchTools.cpp プロジェクト: CarlosGS/heekscad
bool SimplifySketchTool::SortPoint::operator==( const SimplifySketchTool::SortPoint & rhs ) const
{
    // We use the sum of both point's tolerance values.
    return(Distance(rhs) < (Tolerance() + rhs.Tolerance()));
} // End equivalence operator
コード例 #4
0
ファイル: CNCPoint.cpp プロジェクト: play113/swer
bool CNCPoint::operator==( const CNCPoint & rhs ) const
{
    // We use the sum of both point's tolerance values.
    return(Distance(rhs) < (Tolerance() + rhs.Tolerance()));
} // End equivalence operator
コード例 #5
0
ファイル: CNCPoint.cpp プロジェクト: play113/swer
bool CNCVector::operator==( const CNCVector & rhs ) const
{
    return(this->IsEqual(rhs, Tolerance(), Tolerance()) == Standard_True);
} // End equivalence operator