]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/GeomAPI/GeomAPI_Lin.cpp
Salome HOME
Added option to create Construction Point by intersection of two lines.
[modules/shaper.git] / src / GeomAPI / GeomAPI_Lin.cpp
index a9fe074d086af9cb2df9e840bde3c8aa070163bb..b76131aa32695a01c70e5b2f54010de1b78dc173 100644 (file)
@@ -105,3 +105,16 @@ const std::shared_ptr<GeomAPI_Pnt> GeomAPI_Lin::project(
   return std::shared_ptr<GeomAPI_Pnt>(new GeomAPI_Pnt(aResult.X(), aResult.Y(), aResult.Z()));
 }
 
+bool GeomAPI_Lin::isParallel(const std::shared_ptr<GeomAPI_Lin> theLin) const
+{
+  return MY_LIN->Direction().IsParallel(theLin->impl<gp_Lin>().Direction(), Precision::Confusion()) == Standard_True;
+}
+
+bool GeomAPI_Lin::isCoplanar(const std::shared_ptr<GeomAPI_Lin> theLin) const
+{
+  if(MY_LIN->SquareDistance(theLin->impl<gp_Lin>()) > Precision::Confusion()) {
+    return false;
+  }
+
+  return true;
+}