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
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
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
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
bool CNCVector::operator==( const CNCVector & rhs ) const { return(this->IsEqual(rhs, Tolerance(), Tolerance()) == Standard_True); } // End equivalence operator