Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'xs/src/libslic3r/Line.cpp')
-rw-r--r--xs/src/libslic3r/Line.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/xs/src/libslic3r/Line.cpp b/xs/src/libslic3r/Line.cpp
index c7afc80c7..a4d36d38b 100644
--- a/xs/src/libslic3r/Line.cpp
+++ b/xs/src/libslic3r/Line.cpp
@@ -218,6 +218,20 @@ Line::ccw(const Point& point) const
return point.ccw(*this);
}
+//############################################################################################################
+#if ENRICO_GCODE_PREVIEW
+double Line3::length() const
+{
+ return a.distance_to(b);
+}
+
+Vector3 Line3::vector() const
+{
+ return Vector3(b.x - a.x, b.y - a.y, b.z - a.z);
+}
+#endif // ENRICO_GCODE_PREVIEW
+//############################################################################################################
+
Pointf3
Linef3::intersect_plane(double z) const
{