Salome HOME
Delete key regression corrections: in previous implementation sketch entities did...
[modules/shaper.git] / src / GeomAPI / GeomAPI_Pln.cpp
index 4947170e9358aaef1dbb5996fbe5439318b60ea0..dfb7e9bd773534d588c2a355cf7188eaf134c743 100644 (file)
@@ -45,3 +45,14 @@ void GeomAPI_Pln::coefficients(double& theA, double& theB, double& theC, double&
 {
   impl<gp_Pln>().Coefficients(theA, theB, theC, theD);
 }
+
+bool GeomAPI_Pln::isCoincident(const std::shared_ptr<GeomAPI_Pln> thePlane, const double theTolerance)
+{
+  if(!thePlane.get()) {
+    return false;
+  }
+
+  const gp_Pln& aMyPln = impl<gp_Pln>();
+  const gp_Pln& anOtherPln = thePlane->impl<gp_Pln>();
+  return (aMyPln.Contains(anOtherPln.Location(), theTolerance) && aMyPln.Axis().IsParallel(anOtherPln.Axis(), theTolerance));
+}