Salome HOME
Issue #1649: Added options to create plane by two parallel planes;
[modules/shaper.git] / src / GeomAPI / GeomAPI_Pln.cpp
index 4c26557cfe13d693aeb49dfe28dbf25b80e9efa4..b162e51f8253139ce455121ae8f006b1aa93f6ea 100644 (file)
@@ -104,3 +104,11 @@ std::shared_ptr<GeomAPI_Pnt> GeomAPI_Pln::project(const std::shared_ptr<GeomAPI_
       aLocation->added(aVec->decreased(aNormal->multiplied(aDot)));
   return std::shared_ptr<GeomAPI_Pnt>(new GeomAPI_Pnt(aProjection));
 }
+
+double GeomAPI_Pln::distance(const std::shared_ptr<GeomAPI_Pln> thePlane) const
+{
+  const gp_Pln& aMyPln = impl<gp_Pln>();
+  const gp_Pln& anOtherPln = thePlane->impl<gp_Pln>();
+
+  return aMyPln.Distance(anOtherPln);
+}